stacks 0.58.28 → 0.58.30
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 +1 -1
- package/core/actions/dist/src/deploy/index.js +1 -1
- package/core/actions/dist/src/dev/components.js +1 -1
- package/core/actions/dist/src/dev/index.js +10 -0
- package/core/actions/dist/src/generate/lib-entries.js +3 -3
- package/core/actions/dist/src/helpers/lib-entries.js +3 -3
- package/core/actions/dist/src/index.js +10 -0
- package/core/actions/dist/src/lint/fix.js +1 -1
- package/core/actions/dist/src/release.js +8 -0
- package/core/actions/dist/src/upgrade.js +1 -1
- package/core/actions/package.json +1 -1
- package/core/actions/src/build/docs.ts +7 -0
- package/core/actions/src/deploy/index.ts +1 -1
- package/core/actions/src/dev/api.ts +2 -2
- package/core/actions/src/dev/components.ts +1 -1
- package/core/actions/src/dev/dashboard.ts +7 -0
- package/core/actions/src/dev/desktop.ts +3 -3
- package/core/actions/src/dev/index.ts +10 -0
- package/core/actions/src/dev/system-tray.ts +6 -0
- package/core/actions/src/helpers/lib-entries.ts +3 -3
- package/core/actions/src/lint/fix.ts +1 -1
- package/core/ai/package.json +3 -3
- package/core/alias/package.json +1 -1
- package/core/analytics/package.json +1 -1
- package/core/api/package.json +1 -1
- package/core/arrays/package.json +1 -1
- package/core/auth/package.json +1 -1
- package/core/buddy/README.md +2 -2
- package/core/buddy/dist/{chunk-b75e6db0012faa55.js → chunk-0455e53fab4244b1.js} +1 -4
- package/core/buddy/dist/{chunk-fd47b42fb923a4be.js → chunk-61e8f138963fc709.js} +173 -137
- package/core/buddy/dist/cli.js +2 -2
- package/core/buddy/dist/index.js +2 -2
- package/core/buddy/package.json +1 -1
- package/core/buddy/src/commands/add.ts +4 -0
- package/core/buddy/src/commands/build.ts +12 -1
- package/core/buddy/src/commands/changelog.ts +2 -0
- package/core/buddy/src/commands/clean.ts +2 -0
- package/core/buddy/src/commands/cloud.ts +6 -0
- package/core/buddy/src/commands/commit.ts +2 -0
- package/core/buddy/src/commands/configure.ts +3 -0
- package/core/buddy/src/commands/create.ts +8 -8
- package/core/buddy/src/commands/deploy.ts +24 -23
- package/core/buddy/src/commands/dev.ts +50 -10
- package/core/buddy/src/commands/dns.ts +2 -0
- package/core/buddy/src/commands/domains.ts +2 -0
- package/core/buddy/src/commands/example.ts +4 -0
- package/core/buddy/src/commands/fresh.ts +2 -0
- package/core/buddy/src/commands/generate.ts +12 -3
- package/core/buddy/src/commands/http.ts +2 -0
- package/core/buddy/src/commands/install.ts +2 -0
- package/core/buddy/src/commands/key.ts +4 -2
- package/core/buddy/src/commands/lint.ts +3 -0
- package/core/buddy/src/commands/make.ts +11 -1
- package/core/buddy/src/commands/migrate.ts +3 -0
- package/core/buddy/src/commands/prepublish.ts +2 -0
- package/core/buddy/src/commands/release.ts +2 -0
- package/core/buddy/src/commands/seed.ts +2 -0
- package/core/buddy/src/commands/setup.ts +33 -34
- package/core/buddy/src/commands/test.ts +2 -0
- package/core/buddy/src/commands/tinker.ts +2 -0
- package/core/buddy/src/commands/types.ts +3 -0
- package/core/buddy/src/commands/upgrade.ts +6 -0
- package/core/build/package.json +1 -1
- package/core/bun-create/bud/package.json +3 -2
- package/core/bun-create/buddy/package.json +2 -2
- package/core/bun-create/stack/package.json +2 -2
- package/core/bun-create/stacks/package.json +2 -2
- package/core/bun-create/stx/package.json +2 -2
- package/core/bun-plugin-yaml/dist/index.js +1 -19
- package/core/bun-plugin-yaml/package.json +1 -1
- package/core/bun-plugin-yaml/src/index.ts +1 -1
- package/core/cache/package.json +2 -2
- package/core/chat/package.json +1 -1
- package/core/cli/dist/index.js +24 -23
- package/core/cli/package.json +1 -1
- package/core/cli/src/helpers.ts +21 -31
- package/core/cli/src/run.ts +9 -7
- package/core/cloud/buddy +2 -0
- package/core/cloud/package.json +33 -33
- package/core/cloud/src/cloud/ai.ts +45 -36
- package/core/cloud/src/cloud/aws-sdk-layer/nodejs/package-lock.json +10 -10
- package/core/cloud/src/cloud/aws-sdk-layer/nodejs/package.json +2 -2
- package/core/cloud/src/cloud/cdn.ts +44 -5
- package/core/cloud/src/cloud/cli.ts +45 -0
- package/core/cloud/src/cloud/compute.ts +1 -1
- package/core/cloud/src/cloud/index.ts +6 -1
- package/core/cloud/src/cloud/lambda/cli-setup/index.js +67 -0
- package/core/cloud/src/index.ts +1 -0
- package/core/cloud/src/runtime/example/lambda.ts +1 -1
- package/core/cloud/src/runtime/runtime.ts +1 -0
- package/core/cloud/src/runtime/server.ts +1 -1
- package/core/collections/package.json +1 -1
- package/core/config/dist/index.js +130 -122
- package/core/config/package.json +1 -1
- package/core/config/src/overrides.ts +0 -2
- package/core/database/package.json +2 -2
- package/core/database/src/kysely-bun-worker/driver.ts +1 -0
- package/core/database/src/kysely-bun-worker/worker.ts +1 -1
- package/core/datetime/package.json +1 -1
- package/core/desktop/dist/index.js +6 -0
- package/core/desktop/package.json +5 -5
- package/core/desktop/src/index.ts +2 -0
- package/core/desktop/src/system-tray.ts +1 -0
- package/core/development/package.json +1 -1
- package/core/dns/package.json +7 -7
- package/core/docs/build.ts +1 -1
- package/core/docs/dist/index.js +29878 -9995
- package/core/docs/package.json +6 -5
- package/core/docs/src/index.ts +7 -1
- package/core/docs/src/meta.ts +32 -0
- package/core/docs/src/scripts/pwa.ts +116 -0
- package/core/email/email-forwarder.cjs +1 -0
- package/core/email/package.json +3 -3
- package/core/email/src/server/converter.ts +1 -0
- package/core/email/src/server/inbound.ts +1 -0
- package/core/email/src/server/outbound.ts +6 -4
- package/core/enums/dist/index.js +4 -2
- package/core/enums/package.json +1 -1
- package/core/enums/src/index.ts +4 -2
- package/core/env/package.json +1 -1
- package/core/error-handling/package.json +1 -1
- package/core/eslint-config/package.json +18 -18
- package/core/eslint-config/src/configs/comments.ts +1 -1
- package/core/eslint-config/src/configs/imports.ts +9 -0
- package/core/eslint-config/src/configs/svelte.ts +1 -0
- package/core/eslint-config/src/configs/unicorn.ts +1 -1
- package/core/eslint-config/src/configs/vue.ts +0 -1
- package/core/eslint-config/src/factory.ts +2 -8
- package/core/events/package.json +1 -1
- package/core/faker/package.json +2 -2
- package/core/git/dist/index.js +40 -0
- package/core/git/package.json +3 -3
- package/core/git/src/index.ts +62 -0
- package/core/health/package.json +1 -1
- package/core/http/package.json +1 -1
- package/core/lint/package.json +1 -1
- package/core/logging/dist/index.js +0 -6
- package/core/logging/package.json +1 -1
- package/core/music/package.json +3 -3
- package/core/notifications/package.json +2 -2
- package/core/objects/package.json +1 -1
- package/core/orm/package.json +1 -1
- package/core/path/dist/index.js +6 -3
- package/core/path/package.json +1 -1
- package/core/path/src/index.ts +7 -3
- package/core/payments/dist/index.js +2 -5
- package/core/payments/package.json +3 -3
- package/core/push/package.json +1 -1
- package/core/query-builder/package.json +1 -1
- package/core/queue/package.json +1 -1
- package/core/raycast/package.json +5 -0
- package/core/raycast/src/index.ts +0 -0
- package/core/realtime/package.json +1 -1
- package/core/repl/package.json +1 -1
- package/core/router/dist/index.js +16 -496
- package/core/router/package.json +1 -1
- package/core/router/src/middleware.ts +16 -14
- package/core/scheduler/package.json +1 -1
- package/core/search-engine/package.json +2 -2
- package/core/security/dist/index.js +3 -6
- package/core/security/package.json +2 -2
- package/core/server/dist/index.js +6 -2
- package/core/server/package.json +2 -2
- package/core/server/src/config.ts +14 -9
- package/core/signals/package.json +1 -1
- package/core/slug/package.json +1 -1
- package/core/sms/package.json +1 -1
- package/core/storage/dist/index.js +28 -10
- package/core/storage/package.json +1 -1
- package/core/storage/src/files.ts +10 -2
- package/core/storage/src/zip.ts +1 -1
- package/core/strings/package.json +3 -3
- package/core/stx +2 -0
- package/core/tables/package.json +3 -3
- package/core/testing/package.json +3 -3
- package/core/tinker/package.json +1 -1
- package/core/tsconfig.json +4 -9
- package/core/tunnel/package.json +1 -1
- package/core/types/dist/index.js +3 -1
- package/core/types/package.json +13 -13
- package/core/types/src/cli.ts +3 -3
- package/core/types/src/cloud.ts +4 -1
- package/core/types/src/dns.ts +1 -1
- package/core/types/src/native.ts +0 -0
- package/core/types/src/stacks.ts +0 -10
- package/core/ui/package.json +8 -8
- package/core/utils/dist/index.js +1 -1
- package/core/utils/package.json +1 -1
- package/core/validation/package.json +1 -1
- package/core/vite/README.md +1 -1
- package/core/vite/build.ts +1 -1
- package/core/vite/dist/index.js +211 -203
- package/core/vite/package.json +5 -5
- package/core/vite/src/components.ts +1 -1
- package/core/vite/src/dashboard.ts +100 -0
- package/core/vite/src/desktop.ts +2 -58
- package/core/vite/src/example-vue.ts +1 -1
- package/core/vite/src/example-wc.ts +1 -1
- package/core/vite/src/functions.ts +1 -1
- package/core/vite/src/index.ts +9 -11
- package/core/vite/src/plugin/auto-imports.ts +1 -1
- package/core/vite/src/plugin/layouts.ts +6 -7
- package/core/vite/src/plugin/router.ts +3 -1
- package/core/vite/src/system-tray.ts +100 -0
- package/core/vite/src/views.ts +13 -2
- package/core/vite/src/web-components.ts +1 -1
- package/core/whois/dist/index.js +1 -2
- package/core/whois/package.json +1 -1
- package/core/whois/src/index.ts +10 -8
- package/core/x-ray/package.json +1 -1
- package/core/zsh-buddy/README.md +51 -0
- package/core/zsh-buddy/package.json +29 -0
- package/ide/dictionary.txt +12 -0
- package/ide/jetbrains/.idea/stacks.iml +0 -1
- package/ide/vscode/.vscode/settings.json +7 -2
- package/ide/vscode/package.json +2 -4
- package/package.json +12 -7
- package/core/cloud/src/server/.dockerignore +0 -15
- package/core/cloud/src/server/Dockerfile +0 -21
- package/core/cloud/src/server/index.ts +0 -3
- package/core/cloud/src/server/package.json +0 -12
- package/core/cloud/src/server/runtime.ts +0 -828
- package/core/scripts/build +0 -58
- package/core/scripts/ensure +0 -33
- package/core/scripts/fresh +0 -14
- package/core/scripts/link +0 -14
- package/core/scripts/move-built-src-files.ts +0 -28
- package/core/scripts/move-dts-files.ts +0 -35
- package/core/scripts/publish +0 -43
- package/core/scripts/setup +0 -176
- package/core/tables/vite.config.ts +0 -84
- package/core/vite/src/plugin/index.ts +0 -21
- /package/core/vite/src/{stacks.ts → plugins.ts} +0 -0
|
@@ -1,8 +1,4 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
// src/middleware.ts
|
|
3
|
-
import fs from "fs";
|
|
4
|
-
import {promisify} from "util";
|
|
5
|
-
|
|
6
2
|
// /home/runner/work/stacks/stacks/storage/framework/core/path/src/index.ts
|
|
7
3
|
import process2 from "process";
|
|
8
4
|
|
|
@@ -81,60 +77,7 @@ var normalizeString = function(path, allowAboveRoot) {
|
|
|
81
77
|
return res;
|
|
82
78
|
};
|
|
83
79
|
var _DRIVE_LETTER_START_RE = /^[A-Za-z]:\//;
|
|
84
|
-
var _UNC_REGEX = /^[/\\]{2}/;
|
|
85
80
|
var _IS_ABSOLUTE_RE = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/;
|
|
86
|
-
var _DRIVE_LETTER_RE = /^[A-Za-z]:$/;
|
|
87
|
-
var _ROOT_FOLDER_RE = /^\/([A-Za-z]:)?$/;
|
|
88
|
-
var sep = "/";
|
|
89
|
-
var delimiter = ":";
|
|
90
|
-
var normalize = function(path) {
|
|
91
|
-
if (path.length === 0) {
|
|
92
|
-
return ".";
|
|
93
|
-
}
|
|
94
|
-
path = normalizeWindowsPath(path);
|
|
95
|
-
const isUNCPath = path.match(_UNC_REGEX);
|
|
96
|
-
const isPathAbsolute = isAbsolute(path);
|
|
97
|
-
const trailingSeparator = path[path.length - 1] === "/";
|
|
98
|
-
path = normalizeString(path, !isPathAbsolute);
|
|
99
|
-
if (path.length === 0) {
|
|
100
|
-
if (isPathAbsolute) {
|
|
101
|
-
return "/";
|
|
102
|
-
}
|
|
103
|
-
return trailingSeparator ? "./" : ".";
|
|
104
|
-
}
|
|
105
|
-
if (trailingSeparator) {
|
|
106
|
-
path += "/";
|
|
107
|
-
}
|
|
108
|
-
if (_DRIVE_LETTER_RE.test(path)) {
|
|
109
|
-
path += "/";
|
|
110
|
-
}
|
|
111
|
-
if (isUNCPath) {
|
|
112
|
-
if (!isPathAbsolute) {
|
|
113
|
-
return `//./${path}`;
|
|
114
|
-
}
|
|
115
|
-
return `//${path}`;
|
|
116
|
-
}
|
|
117
|
-
return isPathAbsolute && !isAbsolute(path) ? `/${path}` : path;
|
|
118
|
-
};
|
|
119
|
-
var join = function(...arguments_) {
|
|
120
|
-
if (arguments_.length === 0) {
|
|
121
|
-
return ".";
|
|
122
|
-
}
|
|
123
|
-
let joined;
|
|
124
|
-
for (const argument of arguments_) {
|
|
125
|
-
if (argument && argument.length > 0) {
|
|
126
|
-
if (joined === undefined) {
|
|
127
|
-
joined = argument;
|
|
128
|
-
} else {
|
|
129
|
-
joined += `/${argument}`;
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
if (joined === undefined) {
|
|
134
|
-
return ".";
|
|
135
|
-
}
|
|
136
|
-
return normalize(joined.replace(/\/\/+/g, "/"));
|
|
137
|
-
};
|
|
138
81
|
var resolve = function(...arguments_) {
|
|
139
82
|
arguments_ = arguments_.map((argument) => normalizeWindowsPath(argument));
|
|
140
83
|
let resolvedPath = "";
|
|
@@ -156,443 +99,21 @@ var resolve = function(...arguments_) {
|
|
|
156
99
|
var isAbsolute = function(p) {
|
|
157
100
|
return _IS_ABSOLUTE_RE.test(p);
|
|
158
101
|
};
|
|
159
|
-
var toNamespacedPath = function(p) {
|
|
160
|
-
return normalizeWindowsPath(p);
|
|
161
|
-
};
|
|
162
|
-
var _EXTNAME_RE = /.(\.[^./]+)$/;
|
|
163
|
-
var extname = function(p) {
|
|
164
|
-
const match = _EXTNAME_RE.exec(normalizeWindowsPath(p));
|
|
165
|
-
return match && match[1] || "";
|
|
166
|
-
};
|
|
167
|
-
var relative = function(from, to) {
|
|
168
|
-
const _from = resolve(from).replace(_ROOT_FOLDER_RE, "$1").split("/");
|
|
169
|
-
const _to = resolve(to).replace(_ROOT_FOLDER_RE, "$1").split("/");
|
|
170
|
-
if (_to[0][1] === ":" && _from[0][1] === ":" && _from[0] !== _to[0]) {
|
|
171
|
-
return _to.join("/");
|
|
172
|
-
}
|
|
173
|
-
const _fromCopy = [..._from];
|
|
174
|
-
for (const segment of _fromCopy) {
|
|
175
|
-
if (_to[0] !== segment) {
|
|
176
|
-
break;
|
|
177
|
-
}
|
|
178
|
-
_from.shift();
|
|
179
|
-
_to.shift();
|
|
180
|
-
}
|
|
181
|
-
return [..._from.map(() => ".."), ..._to].join("/");
|
|
182
|
-
};
|
|
183
|
-
var dirname = function(p) {
|
|
184
|
-
const segments = normalizeWindowsPath(p).replace(/\/$/, "").split("/").slice(0, -1);
|
|
185
|
-
if (segments.length === 1 && _DRIVE_LETTER_RE.test(segments[0])) {
|
|
186
|
-
segments[0] += "/";
|
|
187
|
-
}
|
|
188
|
-
return segments.join("/") || (isAbsolute(p) ? "/" : ".");
|
|
189
|
-
};
|
|
190
|
-
var format = function(p) {
|
|
191
|
-
const segments = [p.root, p.dir, p.base ?? p.name + p.ext].filter(Boolean);
|
|
192
|
-
return normalizeWindowsPath(p.root ? resolve(...segments) : segments.join("/"));
|
|
193
|
-
};
|
|
194
|
-
var basename = function(p, extension) {
|
|
195
|
-
const lastSegment = normalizeWindowsPath(p).split("/").pop();
|
|
196
|
-
return extension && lastSegment.endsWith(extension) ? lastSegment.slice(0, -extension.length) : lastSegment;
|
|
197
|
-
};
|
|
198
|
-
var parse = function(p) {
|
|
199
|
-
const root = normalizeWindowsPath(p).split("/").shift() || "/";
|
|
200
|
-
const base = basename(p);
|
|
201
|
-
const extension = extname(base);
|
|
202
|
-
return {
|
|
203
|
-
root,
|
|
204
|
-
dir: dirname(p),
|
|
205
|
-
base,
|
|
206
|
-
ext: extension,
|
|
207
|
-
name: base.slice(0, base.length - extension.length)
|
|
208
|
-
};
|
|
209
|
-
};
|
|
210
102
|
// /home/runner/work/stacks/stacks/storage/framework/core/path/src/index.ts
|
|
211
|
-
function actionsPath(path2) {
|
|
212
|
-
return corePath(`actions/src/${path2 || ""}`);
|
|
213
|
-
}
|
|
214
|
-
function relativeActionsPath(path2) {
|
|
215
|
-
return relative(projectPath(), actionsPath(path2));
|
|
216
|
-
}
|
|
217
|
-
function aiPath(path2) {
|
|
218
|
-
return corePath(`ai/${path2 || ""}`);
|
|
219
|
-
}
|
|
220
|
-
function assetsPath(path2) {
|
|
221
|
-
return resourcesPath(`assets/${path2 || ""}`);
|
|
222
|
-
}
|
|
223
|
-
function aliasPath() {
|
|
224
|
-
return corePath("alias/src/index.ts");
|
|
225
|
-
}
|
|
226
|
-
function analyticsPath(path2) {
|
|
227
|
-
return corePath(`analytics/${path2 || ""}`);
|
|
228
|
-
}
|
|
229
|
-
function arraysPath(path2) {
|
|
230
|
-
return corePath(`arrays/${path2 || ""}`);
|
|
231
|
-
}
|
|
232
103
|
function appPath(path2) {
|
|
233
104
|
return projectPath(`app/${path2 || ""}`);
|
|
234
105
|
}
|
|
235
|
-
function authPath(path2) {
|
|
236
|
-
return corePath(`auth/${path2 || ""}`);
|
|
237
|
-
}
|
|
238
|
-
function buildPath(path2) {
|
|
239
|
-
return corePath(`build/${path2 || ""}`);
|
|
240
|
-
}
|
|
241
|
-
function buildEnginePath(path2) {
|
|
242
|
-
return buildPath(`${path2 || ""}`);
|
|
243
|
-
}
|
|
244
|
-
function libsPath(path2) {
|
|
245
|
-
return frameworkPath(`libs/${path2 || ""}`);
|
|
246
|
-
}
|
|
247
|
-
function libsEntriesPath(path2) {
|
|
248
|
-
return libsPath(`entries/${path2 || ""}`);
|
|
249
|
-
}
|
|
250
|
-
function cachePath(path2) {
|
|
251
|
-
return corePath(`cache/${path2 || ""}`);
|
|
252
|
-
}
|
|
253
|
-
function chatPath(path2) {
|
|
254
|
-
return corePath(`chat/${path2 || ""}`);
|
|
255
|
-
}
|
|
256
|
-
function cliPath(path2) {
|
|
257
|
-
return corePath(`cli/${path2 || ""}`);
|
|
258
|
-
}
|
|
259
|
-
function cloudPath(path2) {
|
|
260
|
-
return corePath(`cloud/${path2 || ""}`);
|
|
261
|
-
}
|
|
262
|
-
function collectionsPath(path2) {
|
|
263
|
-
return corePath(`collections/${path2 || ""}`);
|
|
264
|
-
}
|
|
265
|
-
function componentsPath(path2) {
|
|
266
|
-
return resourcesPath(`components/${path2 || ""}`);
|
|
267
|
-
}
|
|
268
|
-
function configPath(path2) {
|
|
269
|
-
return corePath(`config/${path2 || ""}`);
|
|
270
|
-
}
|
|
271
|
-
function corePath(path2) {
|
|
272
|
-
return frameworkPath(`core/${path2 || ""}`);
|
|
273
|
-
}
|
|
274
|
-
function customElementsDataPath() {
|
|
275
|
-
return frameworkPath("core/custom-elements.json");
|
|
276
|
-
}
|
|
277
|
-
function databasePath(path2) {
|
|
278
|
-
return corePath(`database/${path2 || ""}`);
|
|
279
|
-
}
|
|
280
|
-
function datetimePath(path2) {
|
|
281
|
-
return corePath(`datetime/${path2 || ""}`);
|
|
282
|
-
}
|
|
283
|
-
function developmentPath(path2) {
|
|
284
|
-
return corePath(`development/${path2 || ""}`);
|
|
285
|
-
}
|
|
286
|
-
function desktopPath(path2) {
|
|
287
|
-
return corePath(`desktop/${path2 || ""}`);
|
|
288
|
-
}
|
|
289
|
-
function docsPath(path2) {
|
|
290
|
-
return corePath(`docs/${path2 || ""}`);
|
|
291
|
-
}
|
|
292
|
-
function dnsPath(path2) {
|
|
293
|
-
return corePath(`domains/${path2 || ""}`);
|
|
294
|
-
}
|
|
295
|
-
function emailPath(path2) {
|
|
296
|
-
return notificationsPath(`email/${path2 || ""}`);
|
|
297
|
-
}
|
|
298
|
-
function enumsPath(path2) {
|
|
299
|
-
return corePath(`enums/${path2 || ""}`);
|
|
300
|
-
}
|
|
301
|
-
function errorHandlingPath(path2) {
|
|
302
|
-
return corePath(`error-handling/${path2 || ""}`);
|
|
303
|
-
}
|
|
304
|
-
function eventsPath(path2) {
|
|
305
|
-
return corePath(`events/${path2 || ""}`);
|
|
306
|
-
}
|
|
307
|
-
function coreEnvPath(path2) {
|
|
308
|
-
return corePath(`env/${path2 || ""}`);
|
|
309
|
-
}
|
|
310
|
-
function examplesPath(type) {
|
|
311
|
-
return frameworkPath(`examples/${type || ""}`);
|
|
312
|
-
}
|
|
313
|
-
function fakerPath(path2) {
|
|
314
|
-
return corePath(`faker/${path2 || ""}`);
|
|
315
|
-
}
|
|
316
|
-
function frameworkPath(path2) {
|
|
317
|
-
return projectStoragePath(`framework/${path2 || ""}`);
|
|
318
|
-
}
|
|
319
|
-
function healthPath(path2) {
|
|
320
|
-
return corePath(`health/${path2 || ""}`);
|
|
321
|
-
}
|
|
322
|
-
function functionsPath(path2) {
|
|
323
|
-
return resourcesPath(`functions/${path2 || ""}`);
|
|
324
|
-
}
|
|
325
|
-
function gitPath(path2) {
|
|
326
|
-
return corePath(`git/${path2 || ""}`);
|
|
327
|
-
}
|
|
328
|
-
function langPath(path2) {
|
|
329
|
-
return projectPath(`lang/${path2 || ""}`);
|
|
330
|
-
}
|
|
331
|
-
function layoutsPath(path2) {
|
|
332
|
-
return resourcesPath(`layouts/${path2 || ""}`);
|
|
333
|
-
}
|
|
334
|
-
function libraryEntryPath(type) {
|
|
335
|
-
return libsEntriesPath(`${type}.ts`);
|
|
336
|
-
}
|
|
337
|
-
function lintPath(path2) {
|
|
338
|
-
return corePath(`lint/${path2 || ""}`);
|
|
339
|
-
}
|
|
340
|
-
function loggingPath(path2) {
|
|
341
|
-
return corePath(`logging/${path2 || ""}`);
|
|
342
|
-
}
|
|
343
|
-
function modulesPath(path2) {
|
|
344
|
-
return resourcesPath(`modules/${path2 || ""}`);
|
|
345
|
-
}
|
|
346
|
-
function notificationsPath(path2) {
|
|
347
|
-
return corePath(`notifications/${path2 || ""}`);
|
|
348
|
-
}
|
|
349
|
-
function ormPath(path2) {
|
|
350
|
-
return corePath(`orm/${path2 || ""}`);
|
|
351
|
-
}
|
|
352
|
-
function objectsPath(path2) {
|
|
353
|
-
return corePath(`objects/${path2 || ""}`);
|
|
354
|
-
}
|
|
355
|
-
function onboardingPath(path2) {
|
|
356
|
-
return projectPath(`${path2 || "views/dashboard/onboarding"}`);
|
|
357
|
-
}
|
|
358
|
-
function packageJsonPath(type) {
|
|
359
|
-
if (type === "vue-components")
|
|
360
|
-
return frameworkPath("libs/components/vue/package.json");
|
|
361
|
-
if (type === "web-components")
|
|
362
|
-
return frameworkPath("libs/components/web/package.json");
|
|
363
|
-
return frameworkPath(`libs/${type}/package.json`);
|
|
364
|
-
}
|
|
365
|
-
function viewsPath(path2) {
|
|
366
|
-
return resourcesPath(`views/${path2 || ""}`);
|
|
367
|
-
}
|
|
368
|
-
function pathPath(path2) {
|
|
369
|
-
return corePath(`path/${path2 || ""}`);
|
|
370
|
-
}
|
|
371
|
-
function paymentsPath(path2) {
|
|
372
|
-
return corePath(`payments/${path2 || ""}`);
|
|
373
|
-
}
|
|
374
106
|
function projectPath(filePath = "") {
|
|
375
107
|
let path2 = process2.cwd();
|
|
376
108
|
while (path2.includes("storage"))
|
|
377
109
|
path2 = resolve(path2, "..");
|
|
378
110
|
return resolve(path2, filePath);
|
|
379
111
|
}
|
|
380
|
-
function projectConfigPath(path2) {
|
|
381
|
-
return projectPath(`config/${path2 || ""}`);
|
|
382
|
-
}
|
|
383
|
-
function projectStoragePath(path2) {
|
|
384
|
-
return projectPath(`storage/${path2 || ""}`);
|
|
385
|
-
}
|
|
386
|
-
function publicPath(path2) {
|
|
387
|
-
return projectPath(`public/${path2 || ""}`);
|
|
388
|
-
}
|
|
389
|
-
function pushPath(path2) {
|
|
390
|
-
return notificationsPath(`push/${path2 || ""}`);
|
|
391
|
-
}
|
|
392
|
-
function queryBuilderPath(path2) {
|
|
393
|
-
return corePath(`query-builder/${path2 || ""}`);
|
|
394
|
-
}
|
|
395
|
-
function queuePath(path2) {
|
|
396
|
-
return corePath(`queue/${path2 || ""}`);
|
|
397
|
-
}
|
|
398
|
-
function realtimePath(path2) {
|
|
399
|
-
return corePath(`realtime/${path2 || ""}`);
|
|
400
|
-
}
|
|
401
|
-
function resourcesPath(path2) {
|
|
402
|
-
return projectPath(`resources/${path2 || ""}`);
|
|
403
|
-
}
|
|
404
|
-
function replPath(path2) {
|
|
405
|
-
return corePath(`repl/${path2 || ""}`);
|
|
406
|
-
}
|
|
407
|
-
function routerPath(path2) {
|
|
408
|
-
return corePath(`router/${path2 || ""}`);
|
|
409
|
-
}
|
|
410
|
-
function routesPath(path2) {
|
|
411
|
-
return projectPath(`routes/${path2 || ""}`);
|
|
412
|
-
}
|
|
413
|
-
function searchEnginePath(path2) {
|
|
414
|
-
return corePath(`search-engine/${path2 || ""}`);
|
|
415
|
-
}
|
|
416
|
-
function settingsPath(path2) {
|
|
417
|
-
return projectPath(`${path2 || "views/dashboard/settings"}`);
|
|
418
|
-
}
|
|
419
|
-
function scriptsPath(path2) {
|
|
420
|
-
return frameworkPath(`core/scripts/${path2 || ""}`);
|
|
421
|
-
}
|
|
422
|
-
function schedulerPath(path2) {
|
|
423
|
-
return corePath(`scheduler/${path2 || ""}`);
|
|
424
|
-
}
|
|
425
|
-
function signalsPath(path2) {
|
|
426
|
-
return corePath(`signals/${path2 || ""}`);
|
|
427
|
-
}
|
|
428
|
-
function slugPath(path2) {
|
|
429
|
-
return corePath(`slug/${path2 || ""}`);
|
|
430
|
-
}
|
|
431
|
-
function smsPath(path2) {
|
|
432
|
-
return notificationsPath(`sms/${path2 || ""}`);
|
|
433
|
-
}
|
|
434
|
-
function storagePath(path2) {
|
|
435
|
-
return corePath(`storage/${path2 || ""}`);
|
|
436
|
-
}
|
|
437
|
-
function storesPath(path2) {
|
|
438
|
-
return resourcesPath(`stores/${path2 || ""}`);
|
|
439
|
-
}
|
|
440
|
-
function securityPath(path2) {
|
|
441
|
-
return corePath(`security/${path2 || ""}`);
|
|
442
|
-
}
|
|
443
|
-
function serverPath(path2) {
|
|
444
|
-
return corePath(`server/${path2 || ""}`);
|
|
445
|
-
}
|
|
446
|
-
function serverlessPath(path2) {
|
|
447
|
-
return corePath(`serverless/${path2 || ""}`);
|
|
448
|
-
}
|
|
449
|
-
function stacksPath(path2) {
|
|
450
|
-
return frameworkPath(`src/${path2 || ""}`);
|
|
451
|
-
}
|
|
452
|
-
function stringsPath(path2) {
|
|
453
|
-
return corePath(`strings/${path2 || ""}`);
|
|
454
|
-
}
|
|
455
|
-
function testingPath(path2) {
|
|
456
|
-
return corePath(`testing/${path2 || ""}`);
|
|
457
|
-
}
|
|
458
|
-
function tinkerPath(path2) {
|
|
459
|
-
return corePath(`tinker/${path2 || ""}`);
|
|
460
|
-
}
|
|
461
|
-
function testsPath(path2) {
|
|
462
|
-
return frameworkPath(`tests/${path2 || ""}`);
|
|
463
|
-
}
|
|
464
|
-
function typesPath(path2) {
|
|
465
|
-
return corePath(`types/${path2 || ""}`);
|
|
466
|
-
}
|
|
467
|
-
function uiPath(path2) {
|
|
468
|
-
return corePath(`ui/${path2 || ""}`);
|
|
469
|
-
}
|
|
470
|
-
function utilsPath(path2) {
|
|
471
|
-
return corePath(`utils/${path2 || ""}`);
|
|
472
|
-
}
|
|
473
|
-
function validationPath(path2) {
|
|
474
|
-
return corePath(`validation/${path2 || ""}`);
|
|
475
|
-
}
|
|
476
|
-
function vitePath(path2) {
|
|
477
|
-
return corePath(`vite/${path2 || ""}`);
|
|
478
|
-
}
|
|
479
|
-
function xRayPath(path2) {
|
|
480
|
-
return frameworkPath(`stacks/x-ray/${path2 || ""}`);
|
|
481
|
-
}
|
|
482
|
-
var path2 = {
|
|
483
|
-
actionsPath,
|
|
484
|
-
aiPath,
|
|
485
|
-
assetsPath,
|
|
486
|
-
relativeActionsPath,
|
|
487
|
-
aliasPath,
|
|
488
|
-
analyticsPath,
|
|
489
|
-
arraysPath,
|
|
490
|
-
appPath,
|
|
491
|
-
authPath,
|
|
492
|
-
buildEnginePath,
|
|
493
|
-
libsEntriesPath,
|
|
494
|
-
buildPath,
|
|
495
|
-
cachePath,
|
|
496
|
-
chatPath,
|
|
497
|
-
cliPath,
|
|
498
|
-
cloudPath,
|
|
499
|
-
collectionsPath,
|
|
500
|
-
componentsPath,
|
|
501
|
-
configPath,
|
|
502
|
-
projectConfigPath,
|
|
503
|
-
corePath,
|
|
504
|
-
customElementsDataPath,
|
|
505
|
-
databasePath,
|
|
506
|
-
datetimePath,
|
|
507
|
-
developmentPath,
|
|
508
|
-
desktopPath,
|
|
509
|
-
docsPath,
|
|
510
|
-
dnsPath,
|
|
511
|
-
emailPath,
|
|
512
|
-
enumsPath,
|
|
513
|
-
errorHandlingPath,
|
|
514
|
-
eventsPath,
|
|
515
|
-
coreEnvPath,
|
|
516
|
-
healthPath,
|
|
517
|
-
examplesPath,
|
|
518
|
-
fakerPath,
|
|
519
|
-
frameworkPath,
|
|
520
|
-
storagePath,
|
|
521
|
-
functionsPath,
|
|
522
|
-
gitPath,
|
|
523
|
-
langPath,
|
|
524
|
-
layoutsPath,
|
|
525
|
-
libsPath,
|
|
526
|
-
libraryEntryPath,
|
|
527
|
-
lintPath,
|
|
528
|
-
loggingPath,
|
|
529
|
-
modulesPath,
|
|
530
|
-
ormPath,
|
|
531
|
-
objectsPath,
|
|
532
|
-
onboardingPath,
|
|
533
|
-
notificationsPath,
|
|
534
|
-
packageJsonPath,
|
|
535
|
-
viewsPath,
|
|
536
|
-
pathPath,
|
|
537
|
-
paymentsPath,
|
|
538
|
-
projectPath,
|
|
539
|
-
projectStoragePath,
|
|
540
|
-
publicPath,
|
|
541
|
-
pushPath,
|
|
542
|
-
queryBuilderPath,
|
|
543
|
-
queuePath,
|
|
544
|
-
realtimePath,
|
|
545
|
-
resourcesPath,
|
|
546
|
-
replPath,
|
|
547
|
-
routerPath,
|
|
548
|
-
routesPath,
|
|
549
|
-
searchEnginePath,
|
|
550
|
-
schedulerPath,
|
|
551
|
-
settingsPath,
|
|
552
|
-
smsPath,
|
|
553
|
-
signalsPath,
|
|
554
|
-
slugPath,
|
|
555
|
-
scriptsPath,
|
|
556
|
-
securityPath,
|
|
557
|
-
serverPath,
|
|
558
|
-
serverlessPath,
|
|
559
|
-
stacksPath,
|
|
560
|
-
stringsPath,
|
|
561
|
-
storesPath,
|
|
562
|
-
testingPath,
|
|
563
|
-
testsPath,
|
|
564
|
-
tinkerPath,
|
|
565
|
-
typesPath,
|
|
566
|
-
uiPath,
|
|
567
|
-
utilsPath,
|
|
568
|
-
validationPath,
|
|
569
|
-
vitePath,
|
|
570
|
-
xRayPath,
|
|
571
|
-
basename,
|
|
572
|
-
delimiter,
|
|
573
|
-
dirname,
|
|
574
|
-
extname,
|
|
575
|
-
format,
|
|
576
|
-
isAbsolute,
|
|
577
|
-
join,
|
|
578
|
-
normalize,
|
|
579
|
-
normalizeString,
|
|
580
|
-
parse,
|
|
581
|
-
relative,
|
|
582
|
-
resolve,
|
|
583
|
-
sep,
|
|
584
|
-
toNamespacedPath
|
|
585
|
-
};
|
|
586
112
|
|
|
587
113
|
// src/middleware.ts
|
|
588
114
|
async function importMiddlewares(directory) {
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
for (const file of files) {
|
|
592
|
-
const imported = await import(path2.join(directory, file));
|
|
593
|
-
middlewares.push(imported.default);
|
|
594
|
-
}
|
|
595
|
-
return middlewares;
|
|
115
|
+
console.log("importMiddlewares", directory);
|
|
116
|
+
return [];
|
|
596
117
|
}
|
|
597
118
|
|
|
598
119
|
class Middleware {
|
|
@@ -605,7 +126,6 @@ class Middleware {
|
|
|
605
126
|
this.handle = data.handle;
|
|
606
127
|
}
|
|
607
128
|
}
|
|
608
|
-
var readdir = promisify(fs.readdir);
|
|
609
129
|
var middlewares = await importMiddlewares(appPath("middleware"));
|
|
610
130
|
// src/request.ts
|
|
611
131
|
class Request {
|
|
@@ -763,32 +283,32 @@ class Router {
|
|
|
763
283
|
paramNames: []
|
|
764
284
|
});
|
|
765
285
|
}
|
|
766
|
-
get(
|
|
767
|
-
this.addRoute("GET",
|
|
286
|
+
get(path4, callback) {
|
|
287
|
+
this.addRoute("GET", path4, callback, 200);
|
|
768
288
|
return this;
|
|
769
289
|
}
|
|
770
|
-
post(
|
|
771
|
-
this.addRoute("POST",
|
|
290
|
+
post(path4, callback) {
|
|
291
|
+
this.addRoute("POST", path4, callback, 201);
|
|
772
292
|
return this;
|
|
773
293
|
}
|
|
774
|
-
view(
|
|
775
|
-
this.addRoute("GET",
|
|
294
|
+
view(path4, callback) {
|
|
295
|
+
this.addRoute("GET", path4, callback, 200);
|
|
776
296
|
return this;
|
|
777
297
|
}
|
|
778
|
-
redirect(
|
|
779
|
-
this.addRoute("GET",
|
|
298
|
+
redirect(path4, callback, _status) {
|
|
299
|
+
this.addRoute("GET", path4, callback, 302);
|
|
780
300
|
return this;
|
|
781
301
|
}
|
|
782
|
-
delete(
|
|
783
|
-
this.addRoute("DELETE",
|
|
302
|
+
delete(path4, callback) {
|
|
303
|
+
this.addRoute("DELETE", path4, callback, 204);
|
|
784
304
|
return this;
|
|
785
305
|
}
|
|
786
|
-
patch(
|
|
787
|
-
this.addRoute("PATCH",
|
|
306
|
+
patch(path4, callback) {
|
|
307
|
+
this.addRoute("PATCH", path4, callback, 202);
|
|
788
308
|
return this;
|
|
789
309
|
}
|
|
790
|
-
put(
|
|
791
|
-
this.addRoute("PUT",
|
|
310
|
+
put(path4, callback) {
|
|
311
|
+
this.addRoute("PUT", path4, callback, 202);
|
|
792
312
|
return this;
|
|
793
313
|
}
|
|
794
314
|
group(options, callback) {
|
package/core/router/package.json
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { promisify } from 'node:util'
|
|
3
|
-
import { appPath, path } from '@stacksjs/path'
|
|
1
|
+
import { appPath } from '@stacksjs/path'
|
|
4
2
|
import type { MiddlewareType } from '@stacksjs/types'
|
|
5
3
|
|
|
6
4
|
export class Middleware implements MiddlewareType {
|
|
@@ -16,19 +14,23 @@ export class Middleware implements MiddlewareType {
|
|
|
16
14
|
}
|
|
17
15
|
}
|
|
18
16
|
|
|
19
|
-
const readdir = promisify(fs.readdir)
|
|
17
|
+
// const readdir = promisify(fs.readdir)
|
|
20
18
|
|
|
21
19
|
async function importMiddlewares(directory: string) {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
20
|
+
// eslint-disable-next-line no-console
|
|
21
|
+
console.log('importMiddlewares', directory)
|
|
22
|
+
// const middlewares = []
|
|
23
|
+
// TODO: somehow this breaks ./buddy dev
|
|
24
|
+
// const files = await readdir(directory)
|
|
25
|
+
|
|
26
|
+
// for (const file of files) {
|
|
27
|
+
// // Dynamically import the middleware
|
|
28
|
+
// const imported = await import(path.join(directory, file))
|
|
29
|
+
// middlewares.push(imported.default)
|
|
30
|
+
// }
|
|
31
|
+
|
|
32
|
+
// return middlewares
|
|
33
|
+
return []
|
|
32
34
|
}
|
|
33
35
|
|
|
34
36
|
export const middlewares = await importMiddlewares(appPath('middleware'))
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stacksjs/search-engine",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.58.
|
|
4
|
+
"version": "0.58.30",
|
|
5
5
|
"description": "The Stacks search engine integrations.",
|
|
6
6
|
"author": "Chris Breuer",
|
|
7
7
|
"license": "MIT",
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
},
|
|
59
59
|
"dependencies": {
|
|
60
60
|
"@opensearch-project/opensearch": "^2.5.0",
|
|
61
|
-
"meilisearch": "^0.
|
|
61
|
+
"meilisearch": "^0.37.0"
|
|
62
62
|
},
|
|
63
63
|
"devDependencies": {
|
|
64
64
|
"@stacksjs/config": "workspace:*",
|
|
@@ -16,9 +16,6 @@ var __toESM = (mod, isNodeMode, target) => {
|
|
|
16
16
|
return to;
|
|
17
17
|
};
|
|
18
18
|
var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
19
|
-
var __require = (id) => {
|
|
20
|
-
return import.meta.require(id);
|
|
21
|
-
};
|
|
22
19
|
|
|
23
20
|
// /home/runner/work/stacks/stacks/node_modules/crypto-js/core.js
|
|
24
21
|
var require_core = __commonJS((exports, module) => {
|
|
@@ -48,7 +45,7 @@ var require_core = __commonJS((exports, module) => {
|
|
|
48
45
|
if (!crypto && typeof global !== "undefined" && global.crypto) {
|
|
49
46
|
crypto = global.crypto;
|
|
50
47
|
}
|
|
51
|
-
if (!crypto && typeof require === "function") {
|
|
48
|
+
if (!crypto && typeof import.meta.require === "function") {
|
|
52
49
|
try {
|
|
53
50
|
crypto = import.meta.require("crypto");
|
|
54
51
|
} catch (err) {
|
|
@@ -1247,7 +1244,7 @@ var require_bcrypt = __commonJS((exports, module) => {
|
|
|
1247
1244
|
(function(global2, factory) {
|
|
1248
1245
|
if (typeof define === "function" && define["amd"])
|
|
1249
1246
|
define([], factory);
|
|
1250
|
-
else if (typeof require === "function" && typeof module === "object" && module && exports)
|
|
1247
|
+
else if (typeof import.meta.require === "function" && typeof module === "object" && module && exports)
|
|
1251
1248
|
module["exports"] = factory();
|
|
1252
1249
|
else
|
|
1253
1250
|
(global2["dcodeIO"] = global2["dcodeIO"] || {})["bcrypt"] = factory();
|
|
@@ -3082,7 +3079,7 @@ var decrypt = function(encrypted) {
|
|
|
3082
3079
|
var import_bcryptjs = __toESM(require_bcrypt(), 1);
|
|
3083
3080
|
|
|
3084
3081
|
// /home/runner/work/stacks/stacks/node_modules/js-base64/base64.mjs
|
|
3085
|
-
var version = "3.7.
|
|
3082
|
+
var version = "3.7.6";
|
|
3086
3083
|
var VERSION = version;
|
|
3087
3084
|
var _hasatob = typeof atob === "function";
|
|
3088
3085
|
var _hasbtoa = typeof btoa === "function";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stacksjs/security",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.58.
|
|
4
|
+
"version": "0.58.30",
|
|
5
5
|
"description": "The Stacks framework security.",
|
|
6
6
|
"author": "Chris Breuer",
|
|
7
7
|
"license": "MIT",
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"@stacksjs/validation": "workspace:*",
|
|
58
58
|
"bcryptjs": "^2.4.3",
|
|
59
59
|
"crypto-js": "^4.2.0",
|
|
60
|
-
"js-base64": "^3.7.
|
|
60
|
+
"js-base64": "^3.7.6"
|
|
61
61
|
},
|
|
62
62
|
"devDependencies": {
|
|
63
63
|
"@stacksjs/development": "workspace:*"
|