@stacksjs/actions 0.52.9 → 0.53.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.
- package/dist/clean.mjs +1 -1
- package/dist/dev/index.d.ts +0 -6
- package/dist/dev/index.mjs +0 -3
- package/dist/generate/index.mjs +3 -3
- package/dist/generate/settings.d.ts +0 -1
- package/dist/generate/settings.mjs +0 -2
- package/dist/helpers/lib-entries.mjs +11 -10
- package/dist/helpers/utils.mjs +1 -1
- package/dist/make.mjs +1 -1
- package/dist/release.mjs +5 -2
- package/dist/upgrade/framework.d.ts +0 -1
- package/dist/upgrade/framework.mjs +0 -18
- package/dist/upgrade/index.d.ts +0 -1
- package/dist/upgrade/index.mjs +0 -11
- package/dist/upgrade/node.d.ts +0 -1
- package/dist/upgrade/node.mjs +0 -3
- package/dist/upgrade/package-manager.d.ts +0 -1
- package/dist/upgrade/package-manager.mjs +0 -3
- package/dist/upgrade.mjs +1 -1
- package/package.json +25 -29
- package/dist/generate/package-jsons.d.ts +0 -2
- package/dist/generate/package-jsons.mjs +0 -9
package/dist/clean.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { log } from "@stacksjs/cli";
|
|
2
2
|
import { projectPath } from "@stacksjs/path";
|
|
3
3
|
import { del } from "@stacksjs/utils";
|
|
4
|
-
log.info("Running clean command..."
|
|
4
|
+
log.info("Running clean command...");
|
|
5
5
|
await del([
|
|
6
6
|
projectPath("pnpm-lock.yaml"),
|
|
7
7
|
projectPath("node_modules/"),
|
package/dist/dev/index.d.ts
CHANGED
|
@@ -1,10 +1,4 @@
|
|
|
1
1
|
import type { DevOptions } from '@stacksjs/types';
|
|
2
|
-
/**
|
|
3
|
-
* An alias of the invoke method.
|
|
4
|
-
* @param options
|
|
5
|
-
* @returns
|
|
6
|
-
*/
|
|
7
|
-
export declare function dev(options: DevOptions): Promise<any>;
|
|
8
2
|
export declare function components(options: DevOptions): Promise<void>;
|
|
9
3
|
export declare function desktop(options: DevOptions): Promise<void>;
|
|
10
4
|
export declare function pages(options: DevOptions): Promise<void>;
|
package/dist/dev/index.mjs
CHANGED
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import { log } from "@stacksjs/logging";
|
|
2
2
|
import { runNpmScript } from "@stacksjs/utils";
|
|
3
3
|
import { NpmScript } from "@stacksjs/types";
|
|
4
|
-
export async function dev(options) {
|
|
5
|
-
return invoke(options);
|
|
6
|
-
}
|
|
7
4
|
export async function components(options) {
|
|
8
5
|
log.info("Starting your components dev server...");
|
|
9
6
|
await runNpmScript(NpmScript.DevComponents, options);
|
package/dist/generate/index.mjs
CHANGED
|
@@ -3,7 +3,7 @@ import { seed } from "@stacksjs/database";
|
|
|
3
3
|
import { Action, NpmScript } from "@stacksjs/types";
|
|
4
4
|
import { runNpmScript } from "@stacksjs/utils";
|
|
5
5
|
import { runCommand } from "@stacksjs/cli";
|
|
6
|
-
import { frameworkPath } from "@stacksjs/path";
|
|
6
|
+
import { frameworkPath, projectPath } from "@stacksjs/path";
|
|
7
7
|
import { runAction } from "../helpers/index.mjs";
|
|
8
8
|
export async function invoke(options) {
|
|
9
9
|
if (options?.types)
|
|
@@ -25,12 +25,12 @@ export async function generate(options) {
|
|
|
25
25
|
return invoke(options);
|
|
26
26
|
}
|
|
27
27
|
export async function libEntries(options) {
|
|
28
|
-
const result = await
|
|
28
|
+
const result = await runAction(Action.GeneratePackageJsons, { ...options, verbose: true, cwd: projectPath() });
|
|
29
29
|
if (result.isErr()) {
|
|
30
30
|
log.error("There was an error generating your library entry points.", result.error);
|
|
31
31
|
process.exit();
|
|
32
32
|
}
|
|
33
|
-
log.success("Library entry points
|
|
33
|
+
log.success("Library entry points generated successfully");
|
|
34
34
|
}
|
|
35
35
|
export async function vueCompat(options) {
|
|
36
36
|
const result = await runNpmScript(NpmScript.GenerateVueCompat, options);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { log } from "@stacksjs/logging";
|
|
2
|
+
import { kebabCase } from "@stacksjs/strings";
|
|
2
3
|
import { libraryEntryPath } from "@stacksjs/path";
|
|
3
4
|
import { writeTextFile } from "@stacksjs/storage";
|
|
4
5
|
import { determineResetPreset } from "@stacksjs/utils";
|
|
@@ -12,7 +13,7 @@ export async function generateLibEntry(type) {
|
|
|
12
13
|
if (type === "functions")
|
|
13
14
|
await createFunctionLibraryEntryPoint();
|
|
14
15
|
} catch (err) {
|
|
15
|
-
log.error("There was an error generating the library entry point
|
|
16
|
+
log.error("There was an error generating the library entry point", err);
|
|
16
17
|
process.exit();
|
|
17
18
|
}
|
|
18
19
|
}
|
|
@@ -22,7 +23,7 @@ export async function createVueLibraryEntryPoint() {
|
|
|
22
23
|
path: libraryEntryPath("vue-components"),
|
|
23
24
|
data: generateEntryPointData("vue-components")
|
|
24
25
|
});
|
|
25
|
-
log.success("Created the Vue component library entry point
|
|
26
|
+
log.success("Created the Vue component library entry point");
|
|
26
27
|
}
|
|
27
28
|
export async function createWebComponentLibraryEntryPoint() {
|
|
28
29
|
log.info("Creating the Web Component library entry point...");
|
|
@@ -30,7 +31,7 @@ export async function createWebComponentLibraryEntryPoint() {
|
|
|
30
31
|
path: libraryEntryPath("web-components"),
|
|
31
32
|
data: generateEntryPointData("web-components")
|
|
32
33
|
});
|
|
33
|
-
log.success("Created Web Component library entry point
|
|
34
|
+
log.success("Created Web Component library entry point");
|
|
34
35
|
}
|
|
35
36
|
export async function createFunctionLibraryEntryPoint() {
|
|
36
37
|
log.info("Creating the Function library entry point...");
|
|
@@ -38,7 +39,7 @@ export async function createFunctionLibraryEntryPoint() {
|
|
|
38
39
|
path: libraryEntryPath("functions"),
|
|
39
40
|
data: generateEntryPointData("functions")
|
|
40
41
|
});
|
|
41
|
-
log.success("Created Functions library entry point
|
|
42
|
+
log.success("Created Functions library entry point");
|
|
42
43
|
}
|
|
43
44
|
export function generateEntryPointData(type) {
|
|
44
45
|
let arr = [];
|
|
@@ -49,9 +50,9 @@ export function generateEntryPointData(type) {
|
|
|
49
50
|
}
|
|
50
51
|
for (const fx of library.functions?.functions) {
|
|
51
52
|
if (Array.isArray(fx))
|
|
52
|
-
arr.push(`export * as ${fx[1]} from '../../../functions/${fx[0]}'`);
|
|
53
|
+
arr.push(`export * as ${fx[1]} from '../../../resources/functions/${fx[0]}'`);
|
|
53
54
|
else
|
|
54
|
-
arr.push(`export * from '../../../functions/${fx}'`);
|
|
55
|
+
arr.push(`export * from '../../../resources/functions/${fx}'`);
|
|
55
56
|
}
|
|
56
57
|
return arr.join("\r\n");
|
|
57
58
|
}
|
|
@@ -63,9 +64,9 @@ export function generateEntryPointData(type) {
|
|
|
63
64
|
arr = determineResetPreset();
|
|
64
65
|
for (const component of library.vueComponents?.tags.map((tag) => tag.name)) {
|
|
65
66
|
if (Array.isArray(component))
|
|
66
|
-
arr.push(`export { default as ${component[1]} } from '../../../components/${component[0]}.vue'`);
|
|
67
|
+
arr.push(`export { default as ${component[1]} } from '../../../resources/components/${component[0]}.vue'`);
|
|
67
68
|
else
|
|
68
|
-
arr.push(`export { default as ${component} } from '../../../components/${component}.vue'`);
|
|
69
|
+
arr.push(`export { default as ${component} } from '../../../resources/components/${component}.vue'`);
|
|
69
70
|
}
|
|
70
71
|
return arr.join("\r\n");
|
|
71
72
|
}
|
|
@@ -79,11 +80,11 @@ export function generateEntryPointData(type) {
|
|
|
79
80
|
}
|
|
80
81
|
for (const component of library.webComponents?.tags.map((tag) => tag.name)) {
|
|
81
82
|
if (Array.isArray(component)) {
|
|
82
|
-
imports.push(`import ${component[1]} from '../../../components/${component[0]}.vue'`);
|
|
83
|
+
imports.push(`import ${component[1]} from '../../../resources/components/${component[0]}.vue'`);
|
|
83
84
|
declarations.push(`const ${component[1]}CustomElement = defineCustomElement(${component[1]})`);
|
|
84
85
|
definitions.push(`customElements.define('${kebabCase(component[1])}', ${component[1]}CustomElement)`);
|
|
85
86
|
} else {
|
|
86
|
-
imports.push(`import ${component} from '../../../components/${component}.vue'`);
|
|
87
|
+
imports.push(`import ${component} from '../../../resources/components/${component}.vue'`);
|
|
87
88
|
declarations.push(`const ${component}CustomElement = defineCustomElement(${component})`);
|
|
88
89
|
definitions.push(`customElements.define('${kebabCase(component)}', ${component}CustomElement)`);
|
|
89
90
|
}
|
package/dist/helpers/utils.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import storage from "@stacksjs/storage";
|
|
1
|
+
import { storage } from "@stacksjs/storage";
|
|
2
2
|
import { italic, log, runCommand, runCommands } from "@stacksjs/cli";
|
|
3
3
|
import { actionsPath, functionsPath } from "@stacksjs/path";
|
|
4
4
|
import { err } from "@stacksjs/error-handling";
|
package/dist/make.mjs
CHANGED
package/dist/release.mjs
CHANGED
|
@@ -2,12 +2,15 @@
|
|
|
2
2
|
import { frameworkPath } from "@stacksjs/path";
|
|
3
3
|
import { runActions } from "@stacksjs/actions";
|
|
4
4
|
import { Action } from "@stacksjs/types";
|
|
5
|
+
import { log } from "@stacksjs/cli";
|
|
6
|
+
import { app } from "@stacksjs/config";
|
|
5
7
|
await runActions([
|
|
6
|
-
Action.
|
|
7
|
-
//
|
|
8
|
+
Action.GenerateLibraryEntries,
|
|
9
|
+
// generates the package/library entry points
|
|
8
10
|
Action.LintFix,
|
|
9
11
|
// ensure there are no lint errors
|
|
10
12
|
// Action.Test, // run the tests
|
|
11
13
|
Action.Bump
|
|
12
14
|
// bump the versions, create the git tag, generate the changelog, commit & push the changes
|
|
13
15
|
], { verbose: true, cwd: frameworkPath(), shell: true });
|
|
16
|
+
log.success(`Successfully released ${app.name}`);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { log, outro } from "@stacksjs/cli";
|
|
2
|
-
import storage from "@stacksjs/storage";
|
|
3
|
-
import { determineDebugLevel, loop } from "@stacksjs/utils";
|
|
4
|
-
import { frameworkPath, projectPath } from "@stacksjs/path";
|
|
5
|
-
await checkForUncommittedChanges("./.stacks", options);
|
|
6
|
-
await downloadFrameworkUpdate(options);
|
|
7
|
-
log.info("Updating framework...");
|
|
8
|
-
const exclude = ["functions/package.json", "components/vue/package.json", "components/web/package.json", "auto-imports.d.ts", "components.d.ts", "dist"];
|
|
9
|
-
await storage.deleteFiles(frameworkPath(), exclude);
|
|
10
|
-
loop(5, async () => {
|
|
11
|
-
await storage.deleteEmptyFolders(frameworkPath());
|
|
12
|
-
});
|
|
13
|
-
await storage.copyFolder(frameworkPath(), projectPath("./updates/.stacks"), exclude);
|
|
14
|
-
if (determineDebugLevel(options))
|
|
15
|
-
log.info("Cleanup...");
|
|
16
|
-
await storage.deleteFolder(projectPath("updates"));
|
|
17
|
-
outro("Framework updated", { startTime: perf, useSeconds: true });
|
|
18
|
-
process.exit();
|
package/dist/upgrade/index.d.ts
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/dist/upgrade/index.mjs
CHANGED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { ExitCode, parseArgs } from "@stacksjs/cli";
|
|
2
|
-
import { Action } from "@stacksjs/types";
|
|
3
|
-
import { runAction } from "../helpers/index.mjs";
|
|
4
|
-
const options = parseArgs();
|
|
5
|
-
console.log("here is opt", options);
|
|
6
|
-
if (options?.packageManager || options?.all)
|
|
7
|
-
await runAction(Action.UpgradePackageManager, options);
|
|
8
|
-
if (options?.node || options?.all)
|
|
9
|
-
await runAction(Action.UpgradeNode, options);
|
|
10
|
-
else
|
|
11
|
-
process.exit(ExitCode.InvalidArgument);
|
package/dist/upgrade/node.d.ts
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/dist/upgrade/node.mjs
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/dist/upgrade.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { intro, log, outro, prompt, runCommand, spawn } from "@stacksjs/cli";
|
|
2
|
-
import storage from "@stacksjs/storage";
|
|
2
|
+
import { storage } from "@stacksjs/storage";
|
|
3
3
|
import { determineDebugLevel } from "@stacksjs/utils";
|
|
4
4
|
import { projectPath } from "@stacksjs/path";
|
|
5
5
|
import { ExitCode, NpmScript } from "@stacksjs/types";
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stacksjs/actions",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.53.1",
|
|
5
5
|
"packageManager": "pnpm@8.5.1",
|
|
6
6
|
"description": "The Stacks actions.",
|
|
7
7
|
"author": "Chris Breuer",
|
|
@@ -77,10 +77,6 @@
|
|
|
77
77
|
"types": "./dist/generate/lib-entries.d.ts",
|
|
78
78
|
"import": "./dist/generate/lib-entries.mjs"
|
|
79
79
|
},
|
|
80
|
-
"./generate/package-jsons": {
|
|
81
|
-
"types": "./dist/generate/package-jsons.d.ts",
|
|
82
|
-
"import": "./dist/generate/package-jsons.mjs"
|
|
83
|
-
},
|
|
84
80
|
"./generate/settings": {
|
|
85
81
|
"types": "./dist/generate/settings.d.ts",
|
|
86
82
|
"import": "./dist/generate/settings.mjs"
|
|
@@ -240,39 +236,39 @@
|
|
|
240
236
|
"peerDependencies": {
|
|
241
237
|
"markdown-it": "^13.0.1",
|
|
242
238
|
"vue-component-meta": "^1.6.5",
|
|
243
|
-
"@stacksjs/cli": "0.
|
|
244
|
-
"@stacksjs/config": "0.
|
|
245
|
-
"@stacksjs/database": "0.
|
|
246
|
-
"@stacksjs/error-handling": "0.
|
|
247
|
-
"@stacksjs/logging": "0.
|
|
248
|
-
"@stacksjs/pages": "0.
|
|
249
|
-
"@stacksjs/path": "0.
|
|
250
|
-
"@stacksjs/security": "0.
|
|
251
|
-
"@stacksjs/storage": "0.
|
|
252
|
-
"@stacksjs/types": "0.
|
|
253
|
-
"@stacksjs/utils": "0.
|
|
239
|
+
"@stacksjs/cli": "0.53.1",
|
|
240
|
+
"@stacksjs/config": "0.53.1",
|
|
241
|
+
"@stacksjs/database": "0.53.1",
|
|
242
|
+
"@stacksjs/error-handling": "0.53.1",
|
|
243
|
+
"@stacksjs/logging": "0.53.1",
|
|
244
|
+
"@stacksjs/pages": "0.53.1",
|
|
245
|
+
"@stacksjs/path": "0.53.1",
|
|
246
|
+
"@stacksjs/security": "0.53.1",
|
|
247
|
+
"@stacksjs/storage": "0.53.1",
|
|
248
|
+
"@stacksjs/types": "0.53.1",
|
|
249
|
+
"@stacksjs/utils": "0.53.1"
|
|
254
250
|
},
|
|
255
251
|
"dependencies": {
|
|
256
252
|
"fast-glob": "^3.2.12",
|
|
257
253
|
"fs-extra": "^11.1.1",
|
|
258
254
|
"markdown-it": "^13.0.1",
|
|
259
255
|
"vue-component-meta": "^1.6.5",
|
|
260
|
-
"@stacksjs/cli": "0.
|
|
261
|
-
"@stacksjs/config": "0.
|
|
262
|
-
"@stacksjs/database": "0.
|
|
263
|
-
"@stacksjs/error-handling": "0.
|
|
264
|
-
"@stacksjs/logging": "0.
|
|
265
|
-
"@stacksjs/pages": "0.
|
|
266
|
-
"@stacksjs/path": "0.
|
|
267
|
-
"@stacksjs/security": "0.
|
|
268
|
-
"@stacksjs/storage": "0.
|
|
269
|
-
"@stacksjs/strings": "0.
|
|
270
|
-
"@stacksjs/utils": "0.
|
|
256
|
+
"@stacksjs/cli": "0.53.1",
|
|
257
|
+
"@stacksjs/config": "0.53.1",
|
|
258
|
+
"@stacksjs/database": "0.53.1",
|
|
259
|
+
"@stacksjs/error-handling": "0.53.1",
|
|
260
|
+
"@stacksjs/logging": "0.53.1",
|
|
261
|
+
"@stacksjs/pages": "0.53.1",
|
|
262
|
+
"@stacksjs/path": "0.53.1",
|
|
263
|
+
"@stacksjs/security": "0.53.1",
|
|
264
|
+
"@stacksjs/storage": "0.53.1",
|
|
265
|
+
"@stacksjs/strings": "0.53.1",
|
|
266
|
+
"@stacksjs/utils": "0.53.1"
|
|
271
267
|
},
|
|
272
268
|
"devDependencies": {
|
|
273
269
|
"unbuild": "^1.2.1",
|
|
274
|
-
"@stacksjs/development": "0.
|
|
275
|
-
"@stacksjs/types": "0.
|
|
270
|
+
"@stacksjs/development": "0.53.1",
|
|
271
|
+
"@stacksjs/types": "0.53.1"
|
|
276
272
|
},
|
|
277
273
|
"scripts": {
|
|
278
274
|
"build": "unbuild",
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import { hasComponents, hasFunctions } from "@stacksjs/storage";
|
|
3
|
-
import { generatePackageJson } from "../helpers/package-json.mjs";
|
|
4
|
-
if (hasComponents()) {
|
|
5
|
-
await generatePackageJson("vue-components");
|
|
6
|
-
await generatePackageJson("web-components");
|
|
7
|
-
}
|
|
8
|
-
if (hasFunctions())
|
|
9
|
-
await generatePackageJson("functions");
|