stacks 0.58.21 → 0.58.24
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/core/README.md +0 -1
- package/core/custom-elements.json +1 -11
- package/core/src/actions/build.ts +1 -1
- package/core/src/actions/dist/src/build.js +9 -14
- package/core/src/actions/dist/src/generate/component-meta.js +2 -0
- package/core/src/actions/dist/src/generate/ide-helpers.js +8 -1
- package/core/src/actions/dist/src/generate/index.js +9 -15
- package/core/src/actions/dist/src/generate/vscode-custom-data.js +9 -1
- package/core/src/actions/dist/src/helpers/vscode-custom-data.js +8 -1
- package/core/src/actions/dist/src/index.js +11 -17
- package/core/src/actions/dist/src/release.js +11 -16
- package/core/src/actions/dist/src/upgrade.js +1 -1
- package/core/src/actions/package.json +1 -1
- package/core/src/actions/src/generate/component-meta.ts +4 -0
- package/core/src/actions/src/generate/ide-helpers.ts +2 -4
- package/core/src/actions/src/generate/index.ts +10 -19
- package/core/src/actions/src/generate/types.ts +6 -0
- package/core/src/actions/src/generate/vscode-custom-data.ts +5 -2
- package/core/src/actions/src/generate/web-types.ts +2 -0
- package/core/src/actions/src/helpers/vscode-custom-data.ts +8 -1
- package/core/src/ai/package.json +1 -1
- package/core/src/alias/package.json +1 -1
- package/core/src/analytics/package.json +1 -1
- package/core/src/api/package.json +1 -1
- package/core/src/arrays/package.json +1 -1
- package/core/src/auth/package.json +1 -1
- package/core/src/buddy/README.md +0 -1
- package/core/src/buddy/dist/{chunk-815e657d8c6ba584.js → chunk-fd47b42fb923a4be.js} +3 -9
- package/core/src/buddy/dist/cli.js +6 -4
- package/core/src/buddy/dist/index.js +1 -1
- package/core/src/buddy/package.json +1 -1
- package/core/src/buddy/src/cli.ts +7 -7
- package/core/src/buddy/src/commands/generate.ts +2 -13
- package/core/src/build/package.json +1 -1
- package/core/src/bun-create/bud/package.json +1 -2
- package/core/src/bun-create/buddy/package.json +1 -2
- package/core/src/bun-create/stack/package.json +1 -2
- package/core/src/bun-create/stacks/package.json +1 -2
- package/core/src/bun-create/stx/package.json +1 -2
- package/core/src/bun-plugin-yaml/package.json +1 -1
- package/core/src/cache/package.json +1 -1
- package/core/src/chat/package.json +1 -1
- package/core/src/cli/dist/index.js +1 -1
- package/core/src/cli/package.json +1 -1
- package/core/src/cloud/package.json +1 -1
- package/core/src/cloud/src/cloud/aws-sdk-layer/nodejs/package.json +1 -1
- package/core/src/cloud/src/server/package.json +1 -1
- package/core/src/collections/package.json +1 -1
- package/core/src/config/package.json +1 -1
- package/core/src/database/package.json +1 -1
- package/core/src/datetime/package.json +1 -1
- package/core/src/desktop/package.json +1 -1
- package/core/src/development/package.json +1 -1
- package/core/src/dns/package.json +1 -1
- package/core/src/docs/package.json +1 -1
- package/core/src/email/package.json +1 -1
- package/core/src/enums/dist/index.js +0 -1
- package/core/src/enums/package.json +1 -1
- package/core/src/enums/src/index.ts +0 -1
- package/core/src/env/package.json +1 -1
- package/core/src/error-handling/package.json +1 -1
- package/core/src/eslint-config/package.json +1 -1
- package/core/src/events/package.json +1 -1
- package/core/src/faker/package.json +1 -1
- package/core/src/git/package.json +1 -1
- package/core/src/health/package.json +1 -1
- package/core/src/http/package.json +1 -1
- package/core/src/lint/package.json +1 -1
- package/core/src/logging/package.json +1 -1
- package/core/src/music/package.json +1 -1
- package/core/src/notifications/package.json +1 -1
- package/core/src/objects/package.json +1 -1
- package/core/src/orm/package.json +1 -1
- package/core/src/path/dist/index.js +1 -1
- package/core/src/path/package.json +1 -1
- package/core/src/path/src/index.ts +1 -1
- package/core/src/payments/package.json +1 -1
- package/core/src/push/package.json +1 -1
- package/core/src/query-builder/package.json +1 -1
- package/core/src/queue/package.json +1 -1
- package/core/src/realtime/package.json +1 -1
- package/core/src/repl/package.json +1 -1
- package/core/src/router/dist/index.js +1 -1
- package/core/src/router/package.json +1 -1
- package/core/src/scheduler/package.json +1 -1
- package/core/src/search-engine/package.json +1 -1
- package/core/src/security/package.json +1 -1
- package/core/src/server/package.json +1 -1
- package/core/src/signals/package.json +1 -1
- package/core/src/slug/package.json +1 -1
- package/core/src/sms/package.json +1 -1
- package/core/src/storage/package.json +1 -1
- package/core/src/strings/package.json +1 -1
- package/core/src/tables/package.json +1 -1
- package/core/src/testing/package.json +1 -1
- package/core/src/tinker/package.json +1 -1
- package/core/src/tunnel/package.json +1 -1
- package/core/src/types/package.json +1 -1
- package/core/src/types/src/cli.ts +1 -1
- package/core/src/ui/package.json +2 -2
- package/core/src/utils/dist/index.js +2 -2
- package/core/src/utils/package.json +1 -1
- package/core/src/utils/src/helpers.ts +1 -1
- package/core/src/validation/package.json +1 -1
- package/core/src/vite/dist/index.js +1 -1
- package/core/src/vite/package.json +1 -1
- package/core/src/vite-plugin-vue-layouts/package.json +1 -1
- package/core/src/whois/package.json +1 -1
- package/core/src/x-ray/package.json +1 -1
- package/ide/vscode/package.json +1 -1
- package/package.json +6 -6
- package/core/src/actions/dist/src/generate/vue-compat.js +0 -18
- package/core/src/actions/dist/src/helpers/vue-compat.js +0 -16
- package/core/src/actions/src/generate/vue-compat.ts +0 -10
- package/core/src/actions/src/helpers/vue-compat.ts +0 -16
package/core/README.md
CHANGED
|
@@ -237,7 +237,6 @@ buddy example:web-components # runs the Web Component example
|
|
|
237
237
|
# you likely won't need to run these commands as they are auto-triggered, but they are available
|
|
238
238
|
buddy generate # prompts you to select which generator to run
|
|
239
239
|
buddy generate:entries # generates entry files for components, functions, & views
|
|
240
|
-
buddy generate:vue-compat # generates Vue 2 compatibility layer
|
|
241
240
|
buddy generate:web-types # generates Web Component types
|
|
242
241
|
buddy generate:vscode-custom-data # generates VSCode custom data
|
|
243
242
|
buddy generate:ide-helpers # generates IDE helpers
|
|
@@ -1,14 +1,4 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 1.1,
|
|
3
|
-
"tags": [{
|
|
4
|
-
"name": ["HelloWorld", "AppHelloWorld"],
|
|
5
|
-
"description": "The Hello World custom element, built via this framework.",
|
|
6
|
-
"attributes": [{
|
|
7
|
-
"name": "greeting",
|
|
8
|
-
"description": "The greeting."
|
|
9
|
-
}]
|
|
10
|
-
}, {
|
|
11
|
-
"name": "Demo",
|
|
12
|
-
"description": "A Demo components."
|
|
13
|
-
}]
|
|
3
|
+
"tags": [{ "name": ["HelloWorld", "AppHelloWorld"], "description": "The Hello World custom element, built via this framework.", "attributes": [{ "name": "greeting", "description": "The greeting." }] }]
|
|
14
4
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { runCommand } from '@stacksjs/cli'
|
|
2
2
|
|
|
3
|
-
await runCommand('bun build ./src/index.ts ./src/build/component-libs.ts ./src/build/core.ts ./src/build/stacks.ts ./src/dev/index.ts ./src/dev/components.ts ./src/dev/docs.ts ./src/generate/index.ts ./src/generate/component-meta.ts ./src/generate/ide-helpers.ts ./src/generate/lib-entries.ts ./src/generate/vscode-custom-data.ts ./src/
|
|
3
|
+
await runCommand('bun build ./src/index.ts ./src/build/component-libs.ts ./src/build/core.ts ./src/build/stacks.ts ./src/dev/index.ts ./src/dev/components.ts ./src/dev/docs.ts ./src/generate/index.ts ./src/generate/component-meta.ts ./src/generate/ide-helpers.ts ./src/generate/lib-entries.ts ./src/generate/vscode-custom-data.ts ./src/helpers/index.ts ./src/helpers/component-meta.ts ./src/helpers/lib-entries.ts ./src/helpers/package-json.ts ./src/helpers/utils.ts ./src/helpers/vscode-custom-data.ts ./src/lint/index.ts ./src/lint/fix.ts ./src/test/coverage.ts ./src/test/feature.ts ./src/test/ui.ts ./src/test/unit.ts ./src/upgrade/dependencies.ts ./src/upgrade/framework.ts ./src/upgrade/index.ts ./src/index.ts ./src/add.ts ./src/build.ts ./src/bump.ts ./src/changelog.ts ./src/clean.ts ./src/commit.ts ./src/copy-types.ts ./src/deploy/index.ts ./src/examples.ts ./src/fresh.ts ./src/key-generate.ts ./src/make.ts ./src/prepublish.ts ./src/release.ts ./src/database/seed.ts ./src/test.ts ./src/tinker.ts ./src/typecheck.ts ./src/types.ts ./src/upgrade.ts --target bun --external @stacksjs/path --external @stacksjs/cli --external @stacksjs/types --external @stacksjs/logging --external @stacksjs/enums --external @stacksjs/storage --external @stacksjs/utils --external markdown-it --external vue-component-meta --external @stacksjs/strings --external @stacksjs/config --external @stacksjs/error-handling --external @stacksjs/env --external @stacksjs/security --external @stacksjs/database --outdir ./dist', {
|
|
4
4
|
cwd: import.meta.dir,
|
|
5
5
|
})
|
|
@@ -54,7 +54,7 @@ import process from "process";
|
|
|
54
54
|
import {log as log2} from "@stacksjs/logging";
|
|
55
55
|
import {Action, NpmScript} from "@stacksjs/enums";
|
|
56
56
|
import {runNpmScript} from "@stacksjs/utils";
|
|
57
|
-
import {projectPath as projectPath2} from "@stacksjs/path";
|
|
57
|
+
import {frameworkPath, projectPath as projectPath2} from "@stacksjs/path";
|
|
58
58
|
async function invoke(options) {
|
|
59
59
|
if (options?.types)
|
|
60
60
|
await generateTypes(options);
|
|
@@ -66,8 +66,6 @@ async function invoke(options) {
|
|
|
66
66
|
await generateVsCodeCustomData(options);
|
|
67
67
|
else if (options?.ideHelpers)
|
|
68
68
|
await generateIdeHelpers(options);
|
|
69
|
-
else if (options?.vueCompatibility)
|
|
70
|
-
await generateVueCompat(options);
|
|
71
69
|
else if (options?.componentMeta)
|
|
72
70
|
await generateComponentMeta(options);
|
|
73
71
|
}
|
|
@@ -77,7 +75,6 @@ function generate(options) {
|
|
|
77
75
|
async function generateLibEntries(options) {
|
|
78
76
|
const result = await runAction(Action.GenerateLibraryEntries, {
|
|
79
77
|
...options,
|
|
80
|
-
verbose: true,
|
|
81
78
|
cwd: projectPath2()
|
|
82
79
|
});
|
|
83
80
|
if (result.isErr()) {
|
|
@@ -86,14 +83,6 @@ async function generateLibEntries(options) {
|
|
|
86
83
|
}
|
|
87
84
|
log2.success("Library entry points generated successfully");
|
|
88
85
|
}
|
|
89
|
-
async function generateVueCompat(options) {
|
|
90
|
-
const result = await runNpmScript(NpmScript.GenerateVueCompat, options);
|
|
91
|
-
if (result.isErr()) {
|
|
92
|
-
log2.error("There was an error generating Vue 2 compatibility.", result.error);
|
|
93
|
-
process.exit();
|
|
94
|
-
}
|
|
95
|
-
log2.success("Libraries are now Vue 2 & 3 compatible");
|
|
96
|
-
}
|
|
97
86
|
async function generateWebTypes(options) {
|
|
98
87
|
const result = await runNpmScript(NpmScript.GenerateWebTypes, options);
|
|
99
88
|
if (result.isErr()) {
|
|
@@ -103,7 +92,10 @@ async function generateWebTypes(options) {
|
|
|
103
92
|
log2.success("Successfully generated the web-types.json file");
|
|
104
93
|
}
|
|
105
94
|
async function generateVsCodeCustomData(options) {
|
|
106
|
-
const result = await runNpmScript(NpmScript.GenerateVsCodeCustomData,
|
|
95
|
+
const result = await runNpmScript(NpmScript.GenerateVsCodeCustomData, {
|
|
96
|
+
cwd: frameworkPath(),
|
|
97
|
+
...options
|
|
98
|
+
});
|
|
107
99
|
if (result.isErr()) {
|
|
108
100
|
log2.error("There was an error generating the custom-elements.json file.", result.error);
|
|
109
101
|
process.exit();
|
|
@@ -130,7 +122,10 @@ async function generateComponentMeta(options) {
|
|
|
130
122
|
log2.success("Successfully generated component meta information");
|
|
131
123
|
}
|
|
132
124
|
async function generateTypes(options) {
|
|
133
|
-
const result = await runNpmScript(NpmScript.GenerateTypes,
|
|
125
|
+
const result = await runNpmScript(NpmScript.GenerateTypes, {
|
|
126
|
+
cwd: frameworkPath(),
|
|
127
|
+
...options
|
|
128
|
+
});
|
|
134
129
|
if (result.isErr()) {
|
|
135
130
|
log2.error("There was an error generating your types.", result.error);
|
|
136
131
|
process.exit();
|
|
@@ -51,7 +51,9 @@ function generateComponentMeta() {
|
|
|
51
51
|
// src/generate/component-meta.ts
|
|
52
52
|
import {log} from "@stacksjs/logging";
|
|
53
53
|
import {hasComponents} from "@stacksjs/storage";
|
|
54
|
+
log.info("Generating component meta...");
|
|
54
55
|
if (hasComponents())
|
|
55
56
|
generateComponentMeta();
|
|
56
57
|
else
|
|
57
58
|
log.info("No components found. Skipping component meta generation.");
|
|
59
|
+
log.success("Generated component meta.");
|
|
@@ -56,14 +56,20 @@ var library_default = {
|
|
|
56
56
|
// src/helpers/vscode-custom-data.ts
|
|
57
57
|
async function generateVsCodeCustomData() {
|
|
58
58
|
try {
|
|
59
|
+
log.info("Generating custom-elements.json...");
|
|
59
60
|
await writeTextFile({
|
|
60
61
|
path: customElementsDataPath(),
|
|
61
62
|
data: generateComponentInfoData()
|
|
62
63
|
});
|
|
64
|
+
log.success("Generated custom-elements.json for IDEs.");
|
|
63
65
|
} catch (err) {
|
|
64
|
-
log.error("There was an error generating the
|
|
66
|
+
log.error("There was an error generating the custom-elements.json file.", err);
|
|
65
67
|
}
|
|
66
68
|
}
|
|
69
|
+
async function generateWebTypes() {
|
|
70
|
+
log.info("Generating web-types.json...");
|
|
71
|
+
log.info("This feature is not yet implemented.");
|
|
72
|
+
}
|
|
67
73
|
var generateComponentInfoData = function() {
|
|
68
74
|
const componentsData = JSON.stringify(library_default.vueComponents?.tags);
|
|
69
75
|
return `{
|
|
@@ -77,6 +83,7 @@ var generateComponentInfoData = function() {
|
|
|
77
83
|
import {log as log2} from "@stacksjs/logging";
|
|
78
84
|
import {hasComponents} from "@stacksjs/storage";
|
|
79
85
|
if (hasComponents()) {
|
|
86
|
+
await generateWebTypes();
|
|
80
87
|
await generateVsCodeCustomData();
|
|
81
88
|
} else {
|
|
82
89
|
log2.info("No components found. Skipping IDE helper generation.");
|
|
@@ -54,7 +54,7 @@ import process from "process";
|
|
|
54
54
|
import {log as log2} from "@stacksjs/logging";
|
|
55
55
|
import {Action, NpmScript} from "@stacksjs/enums";
|
|
56
56
|
import {runNpmScript} from "@stacksjs/utils";
|
|
57
|
-
import {projectPath as projectPath2} from "@stacksjs/path";
|
|
57
|
+
import {frameworkPath, projectPath as projectPath2} from "@stacksjs/path";
|
|
58
58
|
async function invoke(options) {
|
|
59
59
|
if (options?.types)
|
|
60
60
|
await generateTypes(options);
|
|
@@ -66,8 +66,6 @@ async function invoke(options) {
|
|
|
66
66
|
await generateVsCodeCustomData(options);
|
|
67
67
|
else if (options?.ideHelpers)
|
|
68
68
|
await generateIdeHelpers(options);
|
|
69
|
-
else if (options?.vueCompatibility)
|
|
70
|
-
await generateVueCompat(options);
|
|
71
69
|
else if (options?.componentMeta)
|
|
72
70
|
await generateComponentMeta(options);
|
|
73
71
|
}
|
|
@@ -77,7 +75,6 @@ function generate(options) {
|
|
|
77
75
|
async function generateLibEntries(options) {
|
|
78
76
|
const result = await runAction(Action.GenerateLibraryEntries, {
|
|
79
77
|
...options,
|
|
80
|
-
verbose: true,
|
|
81
78
|
cwd: projectPath2()
|
|
82
79
|
});
|
|
83
80
|
if (result.isErr()) {
|
|
@@ -86,14 +83,6 @@ async function generateLibEntries(options) {
|
|
|
86
83
|
}
|
|
87
84
|
log2.success("Library entry points generated successfully");
|
|
88
85
|
}
|
|
89
|
-
async function generateVueCompat(options) {
|
|
90
|
-
const result = await runNpmScript(NpmScript.GenerateVueCompat, options);
|
|
91
|
-
if (result.isErr()) {
|
|
92
|
-
log2.error("There was an error generating Vue 2 compatibility.", result.error);
|
|
93
|
-
process.exit();
|
|
94
|
-
}
|
|
95
|
-
log2.success("Libraries are now Vue 2 & 3 compatible");
|
|
96
|
-
}
|
|
97
86
|
async function generateWebTypes(options) {
|
|
98
87
|
const result = await runNpmScript(NpmScript.GenerateWebTypes, options);
|
|
99
88
|
if (result.isErr()) {
|
|
@@ -103,7 +92,10 @@ async function generateWebTypes(options) {
|
|
|
103
92
|
log2.success("Successfully generated the web-types.json file");
|
|
104
93
|
}
|
|
105
94
|
async function generateVsCodeCustomData(options) {
|
|
106
|
-
const result = await runNpmScript(NpmScript.GenerateVsCodeCustomData,
|
|
95
|
+
const result = await runNpmScript(NpmScript.GenerateVsCodeCustomData, {
|
|
96
|
+
cwd: frameworkPath(),
|
|
97
|
+
...options
|
|
98
|
+
});
|
|
107
99
|
if (result.isErr()) {
|
|
108
100
|
log2.error("There was an error generating the custom-elements.json file.", result.error);
|
|
109
101
|
process.exit();
|
|
@@ -130,7 +122,10 @@ async function generateComponentMeta(options) {
|
|
|
130
122
|
log2.success("Successfully generated component meta information");
|
|
131
123
|
}
|
|
132
124
|
async function generateTypes(options) {
|
|
133
|
-
const result = await runNpmScript(NpmScript.GenerateTypes,
|
|
125
|
+
const result = await runNpmScript(NpmScript.GenerateTypes, {
|
|
126
|
+
cwd: frameworkPath(),
|
|
127
|
+
...options
|
|
128
|
+
});
|
|
134
129
|
if (result.isErr()) {
|
|
135
130
|
log2.error("There was an error generating your types.", result.error);
|
|
136
131
|
process.exit();
|
|
@@ -148,7 +143,6 @@ async function generateSeeder() {
|
|
|
148
143
|
export {
|
|
149
144
|
invoke,
|
|
150
145
|
generateWebTypes,
|
|
151
|
-
generateVueCompat,
|
|
152
146
|
generateVsCodeCustomData,
|
|
153
147
|
generateTypes,
|
|
154
148
|
generateSeeder,
|
|
@@ -56,14 +56,20 @@ var library_default = {
|
|
|
56
56
|
// src/helpers/vscode-custom-data.ts
|
|
57
57
|
async function generateVsCodeCustomData() {
|
|
58
58
|
try {
|
|
59
|
+
log.info("Generating custom-elements.json...");
|
|
59
60
|
await writeTextFile({
|
|
60
61
|
path: customElementsDataPath(),
|
|
61
62
|
data: generateComponentInfoData()
|
|
62
63
|
});
|
|
64
|
+
log.success("Generated custom-elements.json for IDEs.");
|
|
63
65
|
} catch (err) {
|
|
64
|
-
log.error("There was an error generating the
|
|
66
|
+
log.error("There was an error generating the custom-elements.json file.", err);
|
|
65
67
|
}
|
|
66
68
|
}
|
|
69
|
+
async function generateWebTypes() {
|
|
70
|
+
log.info("Generating web-types.json...");
|
|
71
|
+
log.info("This feature is not yet implemented.");
|
|
72
|
+
}
|
|
67
73
|
var generateComponentInfoData = function() {
|
|
68
74
|
const componentsData = JSON.stringify(library_default.vueComponents?.tags);
|
|
69
75
|
return `{
|
|
@@ -76,7 +82,9 @@ var generateComponentInfoData = function() {
|
|
|
76
82
|
// src/generate/vscode-custom-data.ts
|
|
77
83
|
import {log as log2} from "@stacksjs/logging";
|
|
78
84
|
import {hasComponents} from "@stacksjs/storage";
|
|
85
|
+
log2.info("Generating VS Code custom data...");
|
|
79
86
|
if (hasComponents())
|
|
80
87
|
await generateVsCodeCustomData();
|
|
81
88
|
else
|
|
82
89
|
log2.info("No components found. Skipping VS Code custom data generation.");
|
|
90
|
+
log2.success("Generated VS Code custom data.");
|
|
@@ -54,14 +54,20 @@ var library_default = {
|
|
|
54
54
|
// src/helpers/vscode-custom-data.ts
|
|
55
55
|
async function generateVsCodeCustomData() {
|
|
56
56
|
try {
|
|
57
|
+
log.info("Generating custom-elements.json...");
|
|
57
58
|
await writeTextFile({
|
|
58
59
|
path: customElementsDataPath(),
|
|
59
60
|
data: generateComponentInfoData()
|
|
60
61
|
});
|
|
62
|
+
log.success("Generated custom-elements.json for IDEs.");
|
|
61
63
|
} catch (err) {
|
|
62
|
-
log.error("There was an error generating the
|
|
64
|
+
log.error("There was an error generating the custom-elements.json file.", err);
|
|
63
65
|
}
|
|
64
66
|
}
|
|
67
|
+
async function generateWebTypes() {
|
|
68
|
+
log.info("Generating web-types.json...");
|
|
69
|
+
log.info("This feature is not yet implemented.");
|
|
70
|
+
}
|
|
65
71
|
var generateComponentInfoData = function() {
|
|
66
72
|
const componentsData = JSON.stringify(library_default.vueComponents?.tags);
|
|
67
73
|
return `{
|
|
@@ -71,5 +77,6 @@ var generateComponentInfoData = function() {
|
|
|
71
77
|
`;
|
|
72
78
|
};
|
|
73
79
|
export {
|
|
80
|
+
generateWebTypes,
|
|
74
81
|
generateVsCodeCustomData
|
|
75
82
|
};
|
|
@@ -85,7 +85,7 @@ import process from "process";
|
|
|
85
85
|
import {log as log3} from "@stacksjs/logging";
|
|
86
86
|
import {Action as Action2, NpmScript} from "@stacksjs/enums";
|
|
87
87
|
import {runNpmScript} from "@stacksjs/utils";
|
|
88
|
-
import {projectPath as projectPath2} from "@stacksjs/path";
|
|
88
|
+
import {frameworkPath, projectPath as projectPath2} from "@stacksjs/path";
|
|
89
89
|
async function invoke(options) {
|
|
90
90
|
if (options?.types)
|
|
91
91
|
await generateTypes(options);
|
|
@@ -97,8 +97,6 @@ async function invoke(options) {
|
|
|
97
97
|
await generateVsCodeCustomData(options);
|
|
98
98
|
else if (options?.ideHelpers)
|
|
99
99
|
await generateIdeHelpers(options);
|
|
100
|
-
else if (options?.vueCompatibility)
|
|
101
|
-
await generateVueCompat(options);
|
|
102
100
|
else if (options?.componentMeta)
|
|
103
101
|
await generateComponentMeta(options);
|
|
104
102
|
}
|
|
@@ -108,7 +106,6 @@ function generate(options) {
|
|
|
108
106
|
async function generateLibEntries(options) {
|
|
109
107
|
const result = await runAction(Action2.GenerateLibraryEntries, {
|
|
110
108
|
...options,
|
|
111
|
-
verbose: true,
|
|
112
109
|
cwd: projectPath2()
|
|
113
110
|
});
|
|
114
111
|
if (result.isErr()) {
|
|
@@ -117,14 +114,6 @@ async function generateLibEntries(options) {
|
|
|
117
114
|
}
|
|
118
115
|
log3.success("Library entry points generated successfully");
|
|
119
116
|
}
|
|
120
|
-
async function generateVueCompat(options) {
|
|
121
|
-
const result = await runNpmScript(NpmScript.GenerateVueCompat, options);
|
|
122
|
-
if (result.isErr()) {
|
|
123
|
-
log3.error("There was an error generating Vue 2 compatibility.", result.error);
|
|
124
|
-
process.exit();
|
|
125
|
-
}
|
|
126
|
-
log3.success("Libraries are now Vue 2 & 3 compatible");
|
|
127
|
-
}
|
|
128
117
|
async function generateWebTypes(options) {
|
|
129
118
|
const result = await runNpmScript(NpmScript.GenerateWebTypes, options);
|
|
130
119
|
if (result.isErr()) {
|
|
@@ -134,7 +123,10 @@ async function generateWebTypes(options) {
|
|
|
134
123
|
log3.success("Successfully generated the web-types.json file");
|
|
135
124
|
}
|
|
136
125
|
async function generateVsCodeCustomData(options) {
|
|
137
|
-
const result = await runNpmScript(NpmScript.GenerateVsCodeCustomData,
|
|
126
|
+
const result = await runNpmScript(NpmScript.GenerateVsCodeCustomData, {
|
|
127
|
+
cwd: frameworkPath(),
|
|
128
|
+
...options
|
|
129
|
+
});
|
|
138
130
|
if (result.isErr()) {
|
|
139
131
|
log3.error("There was an error generating the custom-elements.json file.", result.error);
|
|
140
132
|
process.exit();
|
|
@@ -161,7 +153,10 @@ async function generateComponentMeta(options) {
|
|
|
161
153
|
log3.success("Successfully generated component meta information");
|
|
162
154
|
}
|
|
163
155
|
async function generateTypes(options) {
|
|
164
|
-
const result = await runNpmScript(NpmScript.GenerateTypes,
|
|
156
|
+
const result = await runNpmScript(NpmScript.GenerateTypes, {
|
|
157
|
+
cwd: frameworkPath(),
|
|
158
|
+
...options
|
|
159
|
+
});
|
|
165
160
|
if (result.isErr()) {
|
|
166
161
|
log3.error("There was an error generating your types.", result.error);
|
|
167
162
|
process.exit();
|
|
@@ -254,7 +249,7 @@ import process3 from "process";
|
|
|
254
249
|
import {italic as italic2} from "@stacksjs/cli";
|
|
255
250
|
import {log as log6} from "@stacksjs/logging";
|
|
256
251
|
import {createFolder, doesFolderExist, writeTextFile} from "@stacksjs/storage";
|
|
257
|
-
import {frameworkPath, projectPath as projectPath3, resolve} from "@stacksjs/path";
|
|
252
|
+
import {frameworkPath as frameworkPath2, projectPath as projectPath3, resolve} from "@stacksjs/path";
|
|
258
253
|
async function invoke5(options) {
|
|
259
254
|
if (options.component)
|
|
260
255
|
await makeComponent(options);
|
|
@@ -464,7 +459,7 @@ async function createMigration(options) {
|
|
|
464
459
|
const optionName = options.name;
|
|
465
460
|
const table = "dummy-name";
|
|
466
461
|
const name = optionName[0].toUpperCase() + optionName.slice(1);
|
|
467
|
-
const path3 =
|
|
462
|
+
const path3 = frameworkPath2(`database/migrations/${name}.ts`);
|
|
468
463
|
try {
|
|
469
464
|
await writeTextFile({
|
|
470
465
|
path: `${path3}`,
|
|
@@ -554,7 +549,6 @@ export {
|
|
|
554
549
|
invoke,
|
|
555
550
|
hasAction,
|
|
556
551
|
generateWebTypes,
|
|
557
|
-
generateVueCompat,
|
|
558
552
|
generateVsCodeCustomData,
|
|
559
553
|
generateTypes,
|
|
560
554
|
generateSeeder,
|
|
@@ -87,7 +87,7 @@ import process from "process";
|
|
|
87
87
|
import {log as log3} from "@stacksjs/logging";
|
|
88
88
|
import {Action as Action2, NpmScript} from "@stacksjs/enums";
|
|
89
89
|
import {runNpmScript} from "@stacksjs/utils";
|
|
90
|
-
import {projectPath as projectPath2} from "@stacksjs/path";
|
|
90
|
+
import {frameworkPath, projectPath as projectPath2} from "@stacksjs/path";
|
|
91
91
|
async function invoke(options) {
|
|
92
92
|
if (options?.types)
|
|
93
93
|
await generateTypes(options);
|
|
@@ -99,8 +99,6 @@ async function invoke(options) {
|
|
|
99
99
|
await generateVsCodeCustomData(options);
|
|
100
100
|
else if (options?.ideHelpers)
|
|
101
101
|
await generateIdeHelpers(options);
|
|
102
|
-
else if (options?.vueCompatibility)
|
|
103
|
-
await generateVueCompat(options);
|
|
104
102
|
else if (options?.componentMeta)
|
|
105
103
|
await generateComponentMeta(options);
|
|
106
104
|
}
|
|
@@ -110,7 +108,6 @@ function generate(options) {
|
|
|
110
108
|
async function generateLibEntries(options) {
|
|
111
109
|
const result = await runAction(Action2.GenerateLibraryEntries, {
|
|
112
110
|
...options,
|
|
113
|
-
verbose: true,
|
|
114
111
|
cwd: projectPath2()
|
|
115
112
|
});
|
|
116
113
|
if (result.isErr()) {
|
|
@@ -119,14 +116,6 @@ async function generateLibEntries(options) {
|
|
|
119
116
|
}
|
|
120
117
|
log3.success("Library entry points generated successfully");
|
|
121
118
|
}
|
|
122
|
-
async function generateVueCompat(options) {
|
|
123
|
-
const result = await runNpmScript(NpmScript.GenerateVueCompat, options);
|
|
124
|
-
if (result.isErr()) {
|
|
125
|
-
log3.error("There was an error generating Vue 2 compatibility.", result.error);
|
|
126
|
-
process.exit();
|
|
127
|
-
}
|
|
128
|
-
log3.success("Libraries are now Vue 2 & 3 compatible");
|
|
129
|
-
}
|
|
130
119
|
async function generateWebTypes(options) {
|
|
131
120
|
const result = await runNpmScript(NpmScript.GenerateWebTypes, options);
|
|
132
121
|
if (result.isErr()) {
|
|
@@ -136,7 +125,10 @@ async function generateWebTypes(options) {
|
|
|
136
125
|
log3.success("Successfully generated the web-types.json file");
|
|
137
126
|
}
|
|
138
127
|
async function generateVsCodeCustomData(options) {
|
|
139
|
-
const result = await runNpmScript(NpmScript.GenerateVsCodeCustomData,
|
|
128
|
+
const result = await runNpmScript(NpmScript.GenerateVsCodeCustomData, {
|
|
129
|
+
cwd: frameworkPath(),
|
|
130
|
+
...options
|
|
131
|
+
});
|
|
140
132
|
if (result.isErr()) {
|
|
141
133
|
log3.error("There was an error generating the custom-elements.json file.", result.error);
|
|
142
134
|
process.exit();
|
|
@@ -163,7 +155,10 @@ async function generateComponentMeta(options) {
|
|
|
163
155
|
log3.success("Successfully generated component meta information");
|
|
164
156
|
}
|
|
165
157
|
async function generateTypes(options) {
|
|
166
|
-
const result = await runNpmScript(NpmScript.GenerateTypes,
|
|
158
|
+
const result = await runNpmScript(NpmScript.GenerateTypes, {
|
|
159
|
+
cwd: frameworkPath(),
|
|
160
|
+
...options
|
|
161
|
+
});
|
|
167
162
|
if (result.isErr()) {
|
|
168
163
|
log3.error("There was an error generating your types.", result.error);
|
|
169
164
|
process.exit();
|
|
@@ -256,7 +251,7 @@ import process3 from "process";
|
|
|
256
251
|
import {italic as italic2} from "@stacksjs/cli";
|
|
257
252
|
import {log as log6} from "@stacksjs/logging";
|
|
258
253
|
import {createFolder, doesFolderExist, writeTextFile} from "@stacksjs/storage";
|
|
259
|
-
import {frameworkPath, projectPath as projectPath3, resolve} from "@stacksjs/path";
|
|
254
|
+
import {frameworkPath as frameworkPath2, projectPath as projectPath3, resolve} from "@stacksjs/path";
|
|
260
255
|
async function invoke5(options) {
|
|
261
256
|
if (options.component)
|
|
262
257
|
await makeComponent(options);
|
|
@@ -466,7 +461,7 @@ async function createMigration(options) {
|
|
|
466
461
|
const optionName = options.name;
|
|
467
462
|
const table = "dummy-name";
|
|
468
463
|
const name = optionName[0].toUpperCase() + optionName.slice(1);
|
|
469
|
-
const path3 =
|
|
464
|
+
const path3 = frameworkPath2(`database/migrations/${name}.ts`);
|
|
470
465
|
try {
|
|
471
466
|
await writeTextFile({
|
|
472
467
|
path: `${path3}`,
|
|
@@ -6,7 +6,7 @@ import {log} from "@stacksjs/logging";
|
|
|
6
6
|
import {projectPath} from "@stacksjs/path";
|
|
7
7
|
import * as storage from "@stacksjs/storage";
|
|
8
8
|
// package.json
|
|
9
|
-
var version = "0.58.
|
|
9
|
+
var version = "0.58.24";
|
|
10
10
|
|
|
11
11
|
// src/upgrade.ts
|
|
12
12
|
function checkForUncommittedChanges(options) {
|
|
@@ -8,8 +8,12 @@ import { log } from '@stacksjs/logging'
|
|
|
8
8
|
import { hasComponents } from '@stacksjs/storage'
|
|
9
9
|
import { generateComponentMeta } from '../helpers/component-meta'
|
|
10
10
|
|
|
11
|
+
log.info('Generating component meta...')
|
|
12
|
+
|
|
11
13
|
if (hasComponents())
|
|
12
14
|
generateComponentMeta()
|
|
13
15
|
|
|
14
16
|
else
|
|
15
17
|
log.info('No components found. Skipping component meta generation.')
|
|
18
|
+
|
|
19
|
+
log.success('Generated component meta.')
|
|
@@ -7,12 +7,10 @@
|
|
|
7
7
|
|
|
8
8
|
import { log } from '@stacksjs/logging'
|
|
9
9
|
import { hasComponents } from '@stacksjs/storage'
|
|
10
|
-
import { generateVsCodeCustomData } from '../helpers/vscode-custom-data'
|
|
11
|
-
|
|
12
|
-
// import { generateVsCodeCustomData, generateWebTypes } from './generate/vscode-custom-data'
|
|
10
|
+
import { generateVsCodeCustomData, generateWebTypes } from '../helpers/vscode-custom-data'
|
|
13
11
|
|
|
14
12
|
if (hasComponents()) {
|
|
15
|
-
|
|
13
|
+
await generateWebTypes()
|
|
16
14
|
await generateVsCodeCustomData()
|
|
17
15
|
}
|
|
18
16
|
else {
|
|
@@ -3,10 +3,10 @@ import { log } from '@stacksjs/logging'
|
|
|
3
3
|
import { Action, NpmScript } from '@stacksjs/enums'
|
|
4
4
|
import type { GeneratorOptions } from '@stacksjs/types'
|
|
5
5
|
import { runNpmScript } from '@stacksjs/utils'
|
|
6
|
+
import { frameworkPath, projectPath } from '@stacksjs/path'
|
|
7
|
+
import { runAction } from '../helpers'
|
|
6
8
|
|
|
7
9
|
// import { files } from '@stacksjs/storage'
|
|
8
|
-
import { projectPath } from '@stacksjs/path'
|
|
9
|
-
import { runAction } from '../helpers'
|
|
10
10
|
|
|
11
11
|
export async function invoke(options?: GeneratorOptions) {
|
|
12
12
|
if (options?.types)
|
|
@@ -24,9 +24,6 @@ export async function invoke(options?: GeneratorOptions) {
|
|
|
24
24
|
else if (options?.ideHelpers)
|
|
25
25
|
await generateIdeHelpers(options)
|
|
26
26
|
|
|
27
|
-
else if (options?.vueCompatibility)
|
|
28
|
-
await generateVueCompat(options)
|
|
29
|
-
|
|
30
27
|
else if (options?.componentMeta)
|
|
31
28
|
await generateComponentMeta(options)
|
|
32
29
|
}
|
|
@@ -38,7 +35,6 @@ export function generate(options: GeneratorOptions) {
|
|
|
38
35
|
export async function generateLibEntries(options: GeneratorOptions) {
|
|
39
36
|
const result = await runAction(Action.GenerateLibraryEntries, {
|
|
40
37
|
...options,
|
|
41
|
-
verbose: true,
|
|
42
38
|
cwd: projectPath(),
|
|
43
39
|
})
|
|
44
40
|
|
|
@@ -50,17 +46,6 @@ export async function generateLibEntries(options: GeneratorOptions) {
|
|
|
50
46
|
log.success('Library entry points generated successfully')
|
|
51
47
|
}
|
|
52
48
|
|
|
53
|
-
export async function generateVueCompat(options?: GeneratorOptions) {
|
|
54
|
-
const result = await runNpmScript(NpmScript.GenerateVueCompat, options)
|
|
55
|
-
|
|
56
|
-
if (result.isErr()) {
|
|
57
|
-
log.error('There was an error generating Vue 2 compatibility.', result.error)
|
|
58
|
-
process.exit()
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
log.success('Libraries are now Vue 2 & 3 compatible')
|
|
62
|
-
}
|
|
63
|
-
|
|
64
49
|
export async function generateWebTypes(options?: GeneratorOptions) {
|
|
65
50
|
const result = await runNpmScript(NpmScript.GenerateWebTypes, options)
|
|
66
51
|
|
|
@@ -73,7 +58,10 @@ export async function generateWebTypes(options?: GeneratorOptions) {
|
|
|
73
58
|
}
|
|
74
59
|
|
|
75
60
|
export async function generateVsCodeCustomData(options?: GeneratorOptions) {
|
|
76
|
-
const result = await runNpmScript(NpmScript.GenerateVsCodeCustomData,
|
|
61
|
+
const result = await runNpmScript(NpmScript.GenerateVsCodeCustomData, {
|
|
62
|
+
cwd: frameworkPath(),
|
|
63
|
+
...options,
|
|
64
|
+
})
|
|
77
65
|
|
|
78
66
|
if (result.isErr()) {
|
|
79
67
|
log.error('There was an error generating the custom-elements.json file.', result.error)
|
|
@@ -109,7 +97,10 @@ export async function generateComponentMeta(options?: GeneratorOptions) {
|
|
|
109
97
|
}
|
|
110
98
|
|
|
111
99
|
export async function generateTypes(options?: GeneratorOptions) {
|
|
112
|
-
const result = await runNpmScript(NpmScript.GenerateTypes,
|
|
100
|
+
const result = await runNpmScript(NpmScript.GenerateTypes, {
|
|
101
|
+
cwd: frameworkPath(),
|
|
102
|
+
...options,
|
|
103
|
+
})
|
|
113
104
|
|
|
114
105
|
if (result.isErr()) {
|
|
115
106
|
log.error('There was an error generating your types.', result.error)
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
// generate types for ./resources/components & ./resources/function
|
|
2
|
+
// currently triggered via buddy dev / vite
|
|
3
|
+
import { log } from '@stacksjs/cli'
|
|
4
|
+
|
|
5
|
+
log.info('Generating types for ./resources/components & ./resources/function')
|
|
6
|
+
log.info('Generated types saved in ./storage/framework/types/*')
|
|
@@ -9,8 +9,11 @@ import { log } from '@stacksjs/logging'
|
|
|
9
9
|
import { hasComponents } from '@stacksjs/storage'
|
|
10
10
|
import { generateVsCodeCustomData } from '../helpers/vscode-custom-data'
|
|
11
11
|
|
|
12
|
+
log.info('Generating VS Code custom data...')
|
|
13
|
+
|
|
12
14
|
if (hasComponents())
|
|
13
15
|
await generateVsCodeCustomData()
|
|
14
16
|
|
|
15
|
-
else
|
|
16
|
-
|
|
17
|
+
else log.info('No components found. Skipping VS Code custom data generation.')
|
|
18
|
+
|
|
19
|
+
log.success('Generated VS Code custom data.')
|
|
@@ -5,18 +5,25 @@ import library from '~/config/library'
|
|
|
5
5
|
|
|
6
6
|
export async function generateVsCodeCustomData() {
|
|
7
7
|
try {
|
|
8
|
+
log.info('Generating custom-elements.json...')
|
|
8
9
|
// the version does not have to be set here,
|
|
9
10
|
// it will be set automatically by the release script
|
|
10
11
|
await writeTextFile({
|
|
11
12
|
path: customElementsDataPath(),
|
|
12
13
|
data: generateComponentInfoData(),
|
|
13
14
|
})
|
|
15
|
+
log.success('Generated custom-elements.json for IDEs.')
|
|
14
16
|
}
|
|
15
17
|
catch (err) {
|
|
16
|
-
log.error('There was an error generating the
|
|
18
|
+
log.error('There was an error generating the custom-elements.json file.', err)
|
|
17
19
|
}
|
|
18
20
|
}
|
|
19
21
|
|
|
22
|
+
export async function generateWebTypes() {
|
|
23
|
+
log.info('Generating web-types.json...')
|
|
24
|
+
log.info('This feature is not yet implemented.')
|
|
25
|
+
}
|
|
26
|
+
|
|
20
27
|
function generateComponentInfoData() {
|
|
21
28
|
const componentsData = JSON.stringify(library.vueComponents?.tags)
|
|
22
29
|
|
package/core/src/ai/package.json
CHANGED