@stacksjs/actions 0.57.3 → 0.58.19

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 (164) hide show
  1. package/README.md +4 -4
  2. package/dist/src/add.js +29 -0
  3. package/dist/src/build/component-libs.js +6 -0
  4. package/dist/src/build/core.js +25 -0
  5. package/dist/src/build/stacks.js +8 -0
  6. package/dist/src/build.js +226 -0
  7. package/dist/src/bump.js +8 -0
  8. package/dist/src/changelog.js +9 -0
  9. package/dist/src/clean.js +6 -0
  10. package/dist/src/commit.js +17 -0
  11. package/dist/{copy-types.mjs → src/copy-types.js} +7 -4
  12. package/dist/src/database/seed.js +4 -0
  13. package/dist/src/deploy/index.js +31 -0
  14. package/dist/src/dev/components.js +11 -0
  15. package/dist/src/dev/docs.js +7 -0
  16. package/dist/src/dev/index.js +90 -0
  17. package/dist/{examples.mjs → src/examples.js} +18 -8
  18. package/dist/src/fresh.js +18 -0
  19. package/dist/src/generate/component-meta.js +57 -0
  20. package/dist/src/generate/ide-helpers.js +83 -0
  21. package/dist/src/generate/index.js +161 -0
  22. package/dist/src/generate/lib-entries.js +168 -0
  23. package/dist/src/generate/vscode-custom-data.js +82 -0
  24. package/dist/src/generate/vue-compat.js +18 -0
  25. package/dist/{helpers/component-meta.mjs → src/helpers/component-meta.js} +13 -13
  26. package/dist/src/helpers/index.js +56 -0
  27. package/dist/src/helpers/lib-entries.js +160 -0
  28. package/dist/src/helpers/package-json.js +135 -0
  29. package/dist/src/helpers/utils.js +56 -0
  30. package/dist/src/helpers/vscode-custom-data.js +75 -0
  31. package/dist/src/helpers/vue-compat.js +16 -0
  32. package/dist/src/index.js +577 -0
  33. package/dist/src/key-generate.js +10 -0
  34. package/dist/src/lint/fix.js +8 -0
  35. package/dist/src/lint/index.js +21 -0
  36. package/dist/{make.mjs → src/make.js} +71 -49
  37. package/dist/src/prepublish.js +14 -0
  38. package/dist/src/release.js +545 -0
  39. package/dist/src/test/coverage.js +6 -0
  40. package/dist/src/test/feature.js +6 -0
  41. package/dist/src/test/ui.js +6 -0
  42. package/dist/src/test/unit.js +6 -0
  43. package/dist/src/test.js +6 -0
  44. package/dist/src/tinker.js +5 -0
  45. package/dist/src/typecheck.js +6 -0
  46. package/dist/src/types.js +21 -0
  47. package/dist/src/upgrade/dependencies.js +6 -0
  48. package/dist/src/upgrade/framework.js +1 -0
  49. package/dist/src/upgrade/index.js +1 -0
  50. package/dist/src/upgrade.js +39 -0
  51. package/package.json +53 -239
  52. package/LICENSE.md +0 -21
  53. package/dist/add.d.ts +0 -11
  54. package/dist/add.mjs +0 -20
  55. package/dist/build/component-libs.d.ts +0 -1
  56. package/dist/build/component-libs.mjs +0 -4
  57. package/dist/build/core.d.ts +0 -1
  58. package/dist/build/core.mjs +0 -6
  59. package/dist/build/stacks.d.ts +0 -1
  60. package/dist/build/stacks.mjs +0 -12
  61. package/dist/build.d.ts +0 -14
  62. package/dist/build.mjs +0 -68
  63. package/dist/build.ts.d.ts +0 -1
  64. package/dist/build.ts.mjs +0 -13
  65. package/dist/bump.d.ts +0 -1
  66. package/dist/bump.mjs +0 -6
  67. package/dist/changelog.d.ts +0 -1
  68. package/dist/changelog.mjs +0 -6
  69. package/dist/clean.d.ts +0 -1
  70. package/dist/clean.mjs +0 -10
  71. package/dist/commit.d.ts +0 -8
  72. package/dist/commit.mjs +0 -11
  73. package/dist/copy-types.d.ts +0 -5
  74. package/dist/deploy/domains.d.ts +0 -1
  75. package/dist/deploy/domains.mjs +0 -3
  76. package/dist/deploy/index.d.ts +0 -1
  77. package/dist/deploy/index.mjs +0 -3
  78. package/dist/dev/components.d.ts +0 -1
  79. package/dist/dev/components.mjs +0 -4
  80. package/dist/dev/docs.d.ts +0 -1
  81. package/dist/dev/docs.mjs +0 -4
  82. package/dist/dev/index.d.ts +0 -5
  83. package/dist/dev/index.mjs +0 -20
  84. package/dist/examples.d.ts +0 -10
  85. package/dist/fresh.d.ts +0 -1
  86. package/dist/fresh.mjs +0 -6
  87. package/dist/generate/component-meta.d.ts +0 -5
  88. package/dist/generate/component-meta.mjs +0 -8
  89. package/dist/generate/ide-helpers.d.ts +0 -6
  90. package/dist/generate/ide-helpers.mjs +0 -9
  91. package/dist/generate/index.d.ts +0 -17
  92. package/dist/generate/index.mjs +0 -93
  93. package/dist/generate/lib-entries.d.ts +0 -2
  94. package/dist/generate/lib-entries.mjs +0 -14
  95. package/dist/generate/settings.d.ts +0 -1
  96. package/dist/generate/settings.mjs +0 -1
  97. package/dist/generate/vscode-custom-data.d.ts +0 -6
  98. package/dist/generate/vscode-custom-data.mjs +0 -8
  99. package/dist/generate/vue-compat.d.ts +0 -6
  100. package/dist/generate/vue-compat.mjs +0 -3
  101. package/dist/helpers/component-meta.d.ts +0 -22
  102. package/dist/helpers/index.d.ts +0 -6
  103. package/dist/helpers/index.mjs +0 -6
  104. package/dist/helpers/lib-entries.d.ts +0 -13
  105. package/dist/helpers/lib-entries.mjs +0 -101
  106. package/dist/helpers/package-json.d.ts +0 -3
  107. package/dist/helpers/package-json.mjs +0 -82
  108. package/dist/helpers/utils.d.ts +0 -19
  109. package/dist/helpers/utils.mjs +0 -40
  110. package/dist/helpers/vscode-custom-data.d.ts +0 -1
  111. package/dist/helpers/vscode-custom-data.mjs +0 -22
  112. package/dist/helpers/vue-compat.d.ts +0 -1
  113. package/dist/helpers/vue-compat.mjs +0 -12
  114. package/dist/index.d.ts +0 -1
  115. package/dist/index.mjs +0 -1
  116. package/dist/key-generate.d.ts +0 -1
  117. package/dist/key-generate.mjs +0 -8
  118. package/dist/lint/fix.d.ts +0 -1
  119. package/dist/lint/fix.mjs +0 -4
  120. package/dist/lint/index.d.ts +0 -1
  121. package/dist/lint/index.mjs +0 -14
  122. package/dist/make.d.ts +0 -25
  123. package/dist/migrate.d.ts +0 -1
  124. package/dist/migrate.mjs +0 -2
  125. package/dist/preinstall.d.ts +0 -8
  126. package/dist/preinstall.mjs +0 -17
  127. package/dist/prepublish.d.ts +0 -1
  128. package/dist/prepublish.mjs +0 -11
  129. package/dist/release.d.ts +0 -2
  130. package/dist/release.mjs +0 -16
  131. package/dist/seed.d.ts +0 -1
  132. package/dist/seed.mjs +0 -2
  133. package/dist/test/coverage.d.ts +0 -1
  134. package/dist/test/coverage.mjs +0 -4
  135. package/dist/test/feature.d.ts +0 -1
  136. package/dist/test/feature.mjs +0 -4
  137. package/dist/test/ui.d.ts +0 -1
  138. package/dist/test/ui.mjs +0 -4
  139. package/dist/test/unit.d.ts +0 -1
  140. package/dist/test/unit.mjs +0 -4
  141. package/dist/test.d.ts +0 -1
  142. package/dist/test.mjs +0 -4
  143. package/dist/test.ts.d.ts +0 -2
  144. package/dist/test.ts.mjs +0 -6
  145. package/dist/tinker.d.ts +0 -1
  146. package/dist/tinker.mjs +0 -3
  147. package/dist/typecheck.d.ts +0 -1
  148. package/dist/typecheck.mjs +0 -4
  149. package/dist/types.d.ts +0 -8
  150. package/dist/types.mjs +0 -14
  151. package/dist/upgrade/dependencies.d.ts +0 -0
  152. package/dist/upgrade/dependencies.mjs +0 -0
  153. package/dist/upgrade/framework.d.ts +0 -0
  154. package/dist/upgrade/framework.mjs +0 -0
  155. package/dist/upgrade/index.d.ts +0 -0
  156. package/dist/upgrade/index.mjs +0 -0
  157. package/dist/upgrade/node.d.ts +0 -0
  158. package/dist/upgrade/node.mjs +0 -0
  159. package/dist/upgrade/package-manager.d.ts +0 -0
  160. package/dist/upgrade/package-manager.mjs +0 -0
  161. package/dist/upgrade.d.ts +0 -5
  162. package/dist/upgrade.mjs +0 -55
  163. package/dist/upgrade.ts.d.ts +0 -1
  164. package/dist/upgrade.ts.mjs +0 -9
package/dist/make.d.ts DELETED
@@ -1,25 +0,0 @@
1
- import type { MakeOptions } from '@stacksjs/types';
2
- export declare function invoke(options: MakeOptions): Promise<void>;
3
- /**
4
- * An alias of the invoke method.
5
- * @param options
6
- * @returns
7
- */
8
- export declare function make(options: MakeOptions): Promise<void>;
9
- export declare function component(options: MakeOptions): Promise<void>;
10
- export declare function createComponent(options: MakeOptions): Promise<void>;
11
- export declare function database(options: MakeOptions): Promise<void>;
12
- export declare function createDatabase(options: MakeOptions): Promise<void>;
13
- export declare function factory(options: MakeOptions): Promise<void>;
14
- export declare function createFactory(options: MakeOptions): Promise<void>;
15
- export declare function notification(options: MakeOptions): Promise<void>;
16
- export declare function page(options: MakeOptions): Promise<void>;
17
- export declare function createPage(options: MakeOptions): Promise<void>;
18
- export declare function fx(options: MakeOptions): Promise<void>;
19
- export declare function createFunction(options: MakeOptions): Promise<void>;
20
- export declare function language(options: MakeOptions): Promise<void>;
21
- export declare function createLanguage(options: MakeOptions): Promise<void>;
22
- export declare function stack(options: MakeOptions): Promise<void>;
23
- export declare function createNotification(options: MakeOptions): Promise<boolean>;
24
- export declare function createMigration(options: MakeOptions): Promise<void>;
25
- export declare function createModel(options: MakeOptions): Promise<void>;
package/dist/migrate.d.ts DELETED
@@ -1 +0,0 @@
1
- export {};
package/dist/migrate.mjs DELETED
@@ -1,2 +0,0 @@
1
- import { migrations as generateMigrations } from "./generate/index.mjs";
2
- await generateMigrations();
@@ -1,8 +0,0 @@
1
- import type { PreinstallOptions } from '@stacksjs/types';
2
- export declare function invoke(options?: PreinstallOptions): Promise<void>;
3
- /**
4
- * An alias of the invoke method.
5
- * @param options
6
- * @returns
7
- */
8
- export declare function preinstall(options: PreinstallOptions): Promise<void>;
@@ -1,17 +0,0 @@
1
- import { log, spawn } from "@stacksjs/cli";
2
- import { projectPath } from "@stacksjs/path";
3
- import { determineDebugLevel } from "@stacksjs/utils";
4
- export async function invoke(options) {
5
- try {
6
- const stdio = determineDebugLevel(options) ? "inherit" : "ignore";
7
- log.info("Preinstall check...");
8
- await spawn("npx only-allow pnpm", { stdio, cwd: projectPath() });
9
- log.success("Environment ready");
10
- } catch (error) {
11
- log.error("There was an error pre-installing your stack.", error);
12
- process.exit();
13
- }
14
- }
15
- export async function preinstall(options) {
16
- return invoke(options);
17
- }
@@ -1 +0,0 @@
1
- export {};
@@ -1,11 +0,0 @@
1
- import { log } from "@stacksjs/logging";
2
- import { runtimePath } from "@stacksjs/path";
3
- import { runNpmScript } from "@stacksjs/utils";
4
- import { NpmScript } from "@stacksjs/types";
5
- log.info("Running prepublish command...");
6
- const result = await runNpmScript(NpmScript.BuildStacks, { verbose: true, cwd: runtimePath() });
7
- if (result.isErr()) {
8
- log.error(new Error("There was an error while prepublishing your stack"), result.error);
9
- process.exit();
10
- }
11
- log.success("Prepublishing completed");
package/dist/release.d.ts DELETED
@@ -1,2 +0,0 @@
1
- #!/usr/bin/env node
2
- export {};
package/dist/release.mjs DELETED
@@ -1,16 +0,0 @@
1
- #!/usr/bin/env node
2
- import { frameworkPath } from "@stacksjs/path";
3
- import { Action } from "@stacksjs/types";
4
- import { log } from "@stacksjs/cli";
5
- import { app } from "@stacksjs/config";
6
- import { runActions } from ".//index.mjs";
7
- await runActions([
8
- Action.GenerateLibraryEntries,
9
- // generates the package/library entry points
10
- Action.LintFix,
11
- // ensure there are no lint errors
12
- // Action.Test, // run the tests
13
- Action.Bump
14
- // bump the versions, create the git tag, generate the changelog, commit & push the changes
15
- ], { verbose: true, cwd: frameworkPath(), shell: true });
16
- log.success(`Successfully released ${app.name}`);
package/dist/seed.d.ts DELETED
@@ -1 +0,0 @@
1
- export {};
package/dist/seed.mjs DELETED
@@ -1,2 +0,0 @@
1
- import { seeder } from "./generate/index.mjs";
2
- await seeder();
@@ -1 +0,0 @@
1
- export {};
@@ -1,4 +0,0 @@
1
- import { NpmScript } from "@stacksjs/types";
2
- import { runCommand } from "@stacksjs/cli";
3
- import { frameworkPath } from "@stacksjs/path";
4
- await runCommand(NpmScript.TestCoverage, { cwd: frameworkPath(), verbose: true });
@@ -1 +0,0 @@
1
- export {};
@@ -1,4 +0,0 @@
1
- import { NpmScript } from "@stacksjs/types";
2
- import { runCommand } from "@stacksjs/cli";
3
- import { frameworkPath } from "@stacksjs/path";
4
- await runCommand(NpmScript.TestFeature, { verbose: true, cwd: frameworkPath() });
package/dist/test/ui.d.ts DELETED
@@ -1 +0,0 @@
1
- export {};
package/dist/test/ui.mjs DELETED
@@ -1,4 +0,0 @@
1
- import { NpmScript } from "@stacksjs/types";
2
- import { runCommand } from "@stacksjs/cli";
3
- import { frameworkPath } from "@stacksjs/path";
4
- await runCommand(NpmScript.TestUi, { verbose: true, cwd: frameworkPath() });
@@ -1 +0,0 @@
1
- export {};
@@ -1,4 +0,0 @@
1
- import { NpmScript } from "@stacksjs/types";
2
- import { runCommand } from "@stacksjs/cli";
3
- import { frameworkPath } from "@stacksjs/path";
4
- await runCommand(NpmScript.TestUnit, { verbose: true, cwd: frameworkPath() });
package/dist/test.d.ts DELETED
@@ -1 +0,0 @@
1
- export {};
package/dist/test.mjs DELETED
@@ -1,4 +0,0 @@
1
- import { NpmScript } from "@stacksjs/types";
2
- import { runCommand } from "@stacksjs/cli";
3
- import { frameworkPath } from "@stacksjs/path";
4
- await runCommand(NpmScript.Test, { verbose: true, cwd: frameworkPath() });
package/dist/test.ts.d.ts DELETED
@@ -1,2 +0,0 @@
1
- export * from "/home/runner/work/stacks/stacks/.stacks/core/actions/src/test";
2
- export { default } from "/home/runner/work/stacks/stacks/.stacks/core/actions/src/test";
package/dist/test.ts.mjs DELETED
@@ -1,6 +0,0 @@
1
- import jiti from "file:///home/runner/work/stacks/stacks/node_modules/.pnpm/jiti@1.18.2/node_modules/jiti/lib/index.js";
2
-
3
- /** @type {import("/home/runner/work/stacks/stacks/.stacks/core/actions/src/test")} */
4
- const _module = jiti(null, { interopDefault: true, esmResolve: true })("/home/runner/work/stacks/stacks/.stacks/core/actions/src/test.ts");
5
-
6
- export default _module;
package/dist/tinker.d.ts DELETED
@@ -1 +0,0 @@
1
- export {};
package/dist/tinker.mjs DELETED
@@ -1,3 +0,0 @@
1
- import { parseArgs } from "@stacksjs/cli";
2
- const options = parseArgs();
3
- console.log("options are:", options);
@@ -1 +0,0 @@
1
- export {};
@@ -1,4 +0,0 @@
1
- import { NpmScript } from "@stacksjs/types";
2
- import { runCommands } from "@stacksjs/cli";
3
- import { projectPath } from "@stacksjs/path";
4
- await runCommands([NpmScript.TestTypes], { cwd: projectPath(), spinnerText: "Type checking...", verbose: true });
package/dist/types.d.ts DELETED
@@ -1,8 +0,0 @@
1
- import { type TypesOptions } from '@stacksjs/types';
2
- export declare function invoke(options?: TypesOptions): Promise<void>;
3
- /**
4
- * An alias of the invoke method.
5
- * @param options
6
- * @returns
7
- */
8
- export declare function types(options: TypesOptions): Promise<void>;
package/dist/types.mjs DELETED
@@ -1,14 +0,0 @@
1
- import { log } from "@stacksjs/logging";
2
- import { runNpmScript } from "@stacksjs/utils";
3
- import { NpmScript } from "@stacksjs/types";
4
- export async function invoke(options) {
5
- const results = await runNpmScript(NpmScript.TypesFix, options);
6
- if (results.isErr()) {
7
- log.error("There was an error fixing your types.", results.error);
8
- process.exit();
9
- }
10
- log.success("Types are set");
11
- }
12
- export async function types(options) {
13
- return invoke(options);
14
- }
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
package/dist/upgrade.d.ts DELETED
@@ -1,5 +0,0 @@
1
- import type { UpgradeOptions } from '@stacksjs/types';
2
- export declare function checkForUncommittedChanges(path: string | undefined, options: UpgradeOptions): Promise<void>;
3
- export declare function downloadFrameworkUpdate(options: UpgradeOptions): Promise<void>;
4
- export declare function updateDependencies(options: UpgradeOptions): Promise<void>;
5
- export declare function updatePackageManager(options: UpgradeOptions): Promise<void>;
package/dist/upgrade.mjs DELETED
@@ -1,55 +0,0 @@
1
- import { intro, log, outro, runCommand, spawn } from "@stacksjs/cli";
2
- import * as storage from "@stacksjs/storage";
3
- import { determineDebugLevel } from "@stacksjs/utils";
4
- import { projectPath } from "@stacksjs/path";
5
- import { ExitCode, NpmScript } from "@stacksjs/types";
6
- export async function checkForUncommittedChanges(path = "./.stacks", options) {
7
- try {
8
- const stdio = determineDebugLevel(options) ? "inherit" : "ignore";
9
- await spawn(`git diff --quiet HEAD -- ${path}`, { stdio, cwd: projectPath() });
10
- } catch (error) {
11
- if (error.status === 1) {
12
- if (!options?.force) {
13
- const confirmed = await log.prompt("We detected there are uncommitted in the ./stacks folder. Do you want to overwrite those?", {
14
- type: "confirm"
15
- });
16
- if (!confirmed) {
17
- log.info("Aborted. Stacks did not update itself.");
18
- log.info("Note: if you commit your changes and replay the update, you can see what changed.");
19
- process.exit(ExitCode.Success);
20
- }
21
- }
22
- }
23
- }
24
- }
25
- export async function downloadFrameworkUpdate(options) {
26
- const tempFolderName = "updates";
27
- const tempUpdatePath = projectPath(tempFolderName);
28
- if (storage.doesFolderExist(tempUpdatePath))
29
- await deleteFolder(tempUpdatePath);
30
- log.info("Downloading framework updates...");
31
- await runCommand(`giget stacks ${tempFolderName}`, options);
32
- const version = (await storage.readJsonFile(projectPath(`${tempFolderName}/.stacks/version`))).data;
33
- log.success("Your framework updated correctly to version: ", version);
34
- }
35
- export async function updateDependencies(options) {
36
- const perf = await intro("buddy upgrade:dependencies");
37
- const result = await runCommand(NpmScript.UpgradeDependencies, options);
38
- if (result.isErr()) {
39
- outro("While running the upgrade:dependencies command, there was an issue", { startTime: perf, useSeconds: true, isError: true }, result.error);
40
- process.exit();
41
- }
42
- outro("Freshly updated your dependencies.", { startTime: perf, useSeconds: true });
43
- process.exit();
44
- }
45
- export async function updatePackageManager(options) {
46
- const perf = await intro("buddy upgrade:package-manager");
47
- const version = options?.version || "latest";
48
- const result = await runCommand(`corepack prepare pnpm@${version} --activate`, options);
49
- if (result.isErr()) {
50
- outro("While running the upgrade:package-manager command, there was an issue", { startTime: perf, useSeconds: true, isError: true }, result.error);
51
- process.exit();
52
- }
53
- outro(`Updated to version: ${version}`, { startTime: perf, useSeconds: true });
54
- process.exit();
55
- }
@@ -1 +0,0 @@
1
- export * from "/home/runner/work/stacks/stacks/.stacks/core/actions/src/upgrade";
@@ -1,9 +0,0 @@
1
- import jiti from "file:///home/runner/work/stacks/stacks/node_modules/.pnpm/jiti@1.18.2/node_modules/jiti/lib/index.js";
2
-
3
- /** @type {import("/home/runner/work/stacks/stacks/.stacks/core/actions/src/upgrade")} */
4
- const _module = jiti(null, { interopDefault: true, esmResolve: true })("/home/runner/work/stacks/stacks/.stacks/core/actions/src/upgrade.ts");
5
-
6
- export const checkForUncommittedChanges = _module.checkForUncommittedChanges;
7
- export const downloadFrameworkUpdate = _module.downloadFrameworkUpdate;
8
- export const updateDependencies = _module.updateDependencies;
9
- export const updatePackageManager = _module.updatePackageManager;