@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.
- package/README.md +4 -4
- package/dist/src/add.js +29 -0
- package/dist/src/build/component-libs.js +6 -0
- package/dist/src/build/core.js +25 -0
- package/dist/src/build/stacks.js +8 -0
- package/dist/src/build.js +226 -0
- package/dist/src/bump.js +8 -0
- package/dist/src/changelog.js +9 -0
- package/dist/src/clean.js +6 -0
- package/dist/src/commit.js +17 -0
- package/dist/{copy-types.mjs → src/copy-types.js} +7 -4
- package/dist/src/database/seed.js +4 -0
- package/dist/src/deploy/index.js +31 -0
- package/dist/src/dev/components.js +11 -0
- package/dist/src/dev/docs.js +7 -0
- package/dist/src/dev/index.js +90 -0
- package/dist/{examples.mjs → src/examples.js} +18 -8
- package/dist/src/fresh.js +18 -0
- package/dist/src/generate/component-meta.js +57 -0
- package/dist/src/generate/ide-helpers.js +83 -0
- package/dist/src/generate/index.js +161 -0
- package/dist/src/generate/lib-entries.js +168 -0
- package/dist/src/generate/vscode-custom-data.js +82 -0
- package/dist/src/generate/vue-compat.js +18 -0
- package/dist/{helpers/component-meta.mjs → src/helpers/component-meta.js} +13 -13
- package/dist/src/helpers/index.js +56 -0
- package/dist/src/helpers/lib-entries.js +160 -0
- package/dist/src/helpers/package-json.js +135 -0
- package/dist/src/helpers/utils.js +56 -0
- package/dist/src/helpers/vscode-custom-data.js +75 -0
- package/dist/src/helpers/vue-compat.js +16 -0
- package/dist/src/index.js +577 -0
- package/dist/src/key-generate.js +10 -0
- package/dist/src/lint/fix.js +8 -0
- package/dist/src/lint/index.js +21 -0
- package/dist/{make.mjs → src/make.js} +71 -49
- package/dist/src/prepublish.js +14 -0
- package/dist/src/release.js +545 -0
- package/dist/src/test/coverage.js +6 -0
- package/dist/src/test/feature.js +6 -0
- package/dist/src/test/ui.js +6 -0
- package/dist/src/test/unit.js +6 -0
- package/dist/src/test.js +6 -0
- package/dist/src/tinker.js +5 -0
- package/dist/src/typecheck.js +6 -0
- package/dist/src/types.js +21 -0
- package/dist/src/upgrade/dependencies.js +6 -0
- package/dist/src/upgrade/framework.js +1 -0
- package/dist/src/upgrade/index.js +1 -0
- package/dist/src/upgrade.js +39 -0
- package/package.json +53 -239
- package/LICENSE.md +0 -21
- package/dist/add.d.ts +0 -11
- package/dist/add.mjs +0 -20
- package/dist/build/component-libs.d.ts +0 -1
- package/dist/build/component-libs.mjs +0 -4
- package/dist/build/core.d.ts +0 -1
- package/dist/build/core.mjs +0 -6
- package/dist/build/stacks.d.ts +0 -1
- package/dist/build/stacks.mjs +0 -12
- package/dist/build.d.ts +0 -14
- package/dist/build.mjs +0 -68
- package/dist/build.ts.d.ts +0 -1
- package/dist/build.ts.mjs +0 -13
- package/dist/bump.d.ts +0 -1
- package/dist/bump.mjs +0 -6
- package/dist/changelog.d.ts +0 -1
- package/dist/changelog.mjs +0 -6
- package/dist/clean.d.ts +0 -1
- package/dist/clean.mjs +0 -10
- package/dist/commit.d.ts +0 -8
- package/dist/commit.mjs +0 -11
- package/dist/copy-types.d.ts +0 -5
- package/dist/deploy/domains.d.ts +0 -1
- package/dist/deploy/domains.mjs +0 -3
- package/dist/deploy/index.d.ts +0 -1
- package/dist/deploy/index.mjs +0 -3
- package/dist/dev/components.d.ts +0 -1
- package/dist/dev/components.mjs +0 -4
- package/dist/dev/docs.d.ts +0 -1
- package/dist/dev/docs.mjs +0 -4
- package/dist/dev/index.d.ts +0 -5
- package/dist/dev/index.mjs +0 -20
- package/dist/examples.d.ts +0 -10
- package/dist/fresh.d.ts +0 -1
- package/dist/fresh.mjs +0 -6
- package/dist/generate/component-meta.d.ts +0 -5
- package/dist/generate/component-meta.mjs +0 -8
- package/dist/generate/ide-helpers.d.ts +0 -6
- package/dist/generate/ide-helpers.mjs +0 -9
- package/dist/generate/index.d.ts +0 -17
- package/dist/generate/index.mjs +0 -93
- package/dist/generate/lib-entries.d.ts +0 -2
- package/dist/generate/lib-entries.mjs +0 -14
- package/dist/generate/settings.d.ts +0 -1
- package/dist/generate/settings.mjs +0 -1
- package/dist/generate/vscode-custom-data.d.ts +0 -6
- package/dist/generate/vscode-custom-data.mjs +0 -8
- package/dist/generate/vue-compat.d.ts +0 -6
- package/dist/generate/vue-compat.mjs +0 -3
- package/dist/helpers/component-meta.d.ts +0 -22
- package/dist/helpers/index.d.ts +0 -6
- package/dist/helpers/index.mjs +0 -6
- package/dist/helpers/lib-entries.d.ts +0 -13
- package/dist/helpers/lib-entries.mjs +0 -101
- package/dist/helpers/package-json.d.ts +0 -3
- package/dist/helpers/package-json.mjs +0 -82
- package/dist/helpers/utils.d.ts +0 -19
- package/dist/helpers/utils.mjs +0 -40
- package/dist/helpers/vscode-custom-data.d.ts +0 -1
- package/dist/helpers/vscode-custom-data.mjs +0 -22
- package/dist/helpers/vue-compat.d.ts +0 -1
- package/dist/helpers/vue-compat.mjs +0 -12
- package/dist/index.d.ts +0 -1
- package/dist/index.mjs +0 -1
- package/dist/key-generate.d.ts +0 -1
- package/dist/key-generate.mjs +0 -8
- package/dist/lint/fix.d.ts +0 -1
- package/dist/lint/fix.mjs +0 -4
- package/dist/lint/index.d.ts +0 -1
- package/dist/lint/index.mjs +0 -14
- package/dist/make.d.ts +0 -25
- package/dist/migrate.d.ts +0 -1
- package/dist/migrate.mjs +0 -2
- package/dist/preinstall.d.ts +0 -8
- package/dist/preinstall.mjs +0 -17
- package/dist/prepublish.d.ts +0 -1
- package/dist/prepublish.mjs +0 -11
- package/dist/release.d.ts +0 -2
- package/dist/release.mjs +0 -16
- package/dist/seed.d.ts +0 -1
- package/dist/seed.mjs +0 -2
- package/dist/test/coverage.d.ts +0 -1
- package/dist/test/coverage.mjs +0 -4
- package/dist/test/feature.d.ts +0 -1
- package/dist/test/feature.mjs +0 -4
- package/dist/test/ui.d.ts +0 -1
- package/dist/test/ui.mjs +0 -4
- package/dist/test/unit.d.ts +0 -1
- package/dist/test/unit.mjs +0 -4
- package/dist/test.d.ts +0 -1
- package/dist/test.mjs +0 -4
- package/dist/test.ts.d.ts +0 -2
- package/dist/test.ts.mjs +0 -6
- package/dist/tinker.d.ts +0 -1
- package/dist/tinker.mjs +0 -3
- package/dist/typecheck.d.ts +0 -1
- package/dist/typecheck.mjs +0 -4
- package/dist/types.d.ts +0 -8
- package/dist/types.mjs +0 -14
- package/dist/upgrade/dependencies.d.ts +0 -0
- package/dist/upgrade/dependencies.mjs +0 -0
- package/dist/upgrade/framework.d.ts +0 -0
- package/dist/upgrade/framework.mjs +0 -0
- package/dist/upgrade/index.d.ts +0 -0
- package/dist/upgrade/index.mjs +0 -0
- package/dist/upgrade/node.d.ts +0 -0
- package/dist/upgrade/node.mjs +0 -0
- package/dist/upgrade/package-manager.d.ts +0 -0
- package/dist/upgrade/package-manager.mjs +0 -0
- package/dist/upgrade.d.ts +0 -5
- package/dist/upgrade.mjs +0 -55
- package/dist/upgrade.ts.d.ts +0 -1
- 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
package/dist/preinstall.d.ts
DELETED
|
@@ -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>;
|
package/dist/preinstall.mjs
DELETED
|
@@ -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
|
-
}
|
package/dist/prepublish.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/dist/prepublish.mjs
DELETED
|
@@ -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
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
package/dist/test/coverage.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/dist/test/coverage.mjs
DELETED
package/dist/test/feature.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/dist/test/feature.mjs
DELETED
package/dist/test/ui.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/dist/test/ui.mjs
DELETED
package/dist/test/unit.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/dist/test/unit.mjs
DELETED
package/dist/test.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/dist/test.mjs
DELETED
package/dist/test.ts.d.ts
DELETED
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
package/dist/typecheck.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/dist/typecheck.mjs
DELETED
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
|
package/dist/upgrade/index.d.ts
DELETED
|
File without changes
|
package/dist/upgrade/index.mjs
DELETED
|
File without changes
|
package/dist/upgrade/node.d.ts
DELETED
|
File without changes
|
package/dist/upgrade/node.mjs
DELETED
|
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
|
-
}
|
package/dist/upgrade.ts.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "/home/runner/work/stacks/stacks/.stacks/core/actions/src/upgrade";
|
package/dist/upgrade.ts.mjs
DELETED
|
@@ -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;
|