@stacksjs/types 0.58.72 → 0.58.73
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/index.js +12 -12
- package/package.json +4 -4
- package/src/app.ts +0 -21
- package/src/cli.ts +21 -3
- package/src/email.ts +5 -2
- package/src/index.ts +1 -0
- package/src/ports.ts +19 -0
- package/src/router.ts +2 -2
- package/src/stacks.ts +10 -0
package/dist/index.js
CHANGED
|
@@ -28,7 +28,7 @@ var __export = (target, all) => {
|
|
|
28
28
|
var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
|
|
29
29
|
var __require = createRequire(import.meta.url);
|
|
30
30
|
|
|
31
|
-
//
|
|
31
|
+
// ../../../../node_modules/consola/dist/core.mjs
|
|
32
32
|
class Consola {
|
|
33
33
|
constructor(options = {}) {
|
|
34
34
|
const types = options.types || LogTypes;
|
|
@@ -409,7 +409,7 @@ var init_core = __esm(() => {
|
|
|
409
409
|
Consola.prototype.resume = Consola.prototype.resumeLogs;
|
|
410
410
|
});
|
|
411
411
|
|
|
412
|
-
//
|
|
412
|
+
// ../../../../node_modules/consola/dist/shared/consola.06ad8a64.mjs
|
|
413
413
|
import {formatWithOptions} from "node:util";
|
|
414
414
|
import {sep} from "node:path";
|
|
415
415
|
|
|
@@ -469,7 +469,7 @@ var init_consola_06ad8a64 = __esm(() => {
|
|
|
469
469
|
bracket = (x) => x ? `[${x}]` : "";
|
|
470
470
|
});
|
|
471
471
|
|
|
472
|
-
//
|
|
472
|
+
// ../../../../node_modules/consola/dist/utils.mjs
|
|
473
473
|
import * as tty from "node:tty";
|
|
474
474
|
var replaceClose, clearBleed, filterEmpty, init, createColors, getColor, stripAnsi, box, env, argv, platform, isDisabled, isForced, isWindows, isDumbTerminal, isCompatibleTerminal, isCI, isColorSupported, colorDefs, colors, ansiRegex, boxStylePresets, defaultStyle;
|
|
475
475
|
var init_utils = __esm(() => {
|
|
@@ -682,7 +682,7 @@ var init_utils = __esm(() => {
|
|
|
682
682
|
};
|
|
683
683
|
});
|
|
684
684
|
|
|
685
|
-
//
|
|
685
|
+
// ../../../../node_modules/consola/dist/chunks/prompt.mjs
|
|
686
686
|
var exports_prompt = {};
|
|
687
687
|
__export(exports_prompt, {
|
|
688
688
|
prompt: () => {
|
|
@@ -1440,7 +1440,7 @@ ${colors.cyan(S_BAR_END)}
|
|
|
1440
1440
|
};
|
|
1441
1441
|
});
|
|
1442
1442
|
|
|
1443
|
-
//
|
|
1443
|
+
// ../../../../node_modules/consola/dist/shared/consola.36c0034f.mjs
|
|
1444
1444
|
import process$1 from "node:process";
|
|
1445
1445
|
|
|
1446
1446
|
class FancyReporter extends BasicReporter {
|
|
@@ -1792,7 +1792,7 @@ var init_consola_36c0034f = __esm(() => {
|
|
|
1792
1792
|
consola = createConsola2();
|
|
1793
1793
|
});
|
|
1794
1794
|
|
|
1795
|
-
//
|
|
1795
|
+
// ../../../../node_modules/slugify/slugify.js
|
|
1796
1796
|
var require_slugify = __commonJS((exports, module) => {
|
|
1797
1797
|
(function(name, root, factory) {
|
|
1798
1798
|
if (typeof exports === "object") {
|
|
@@ -1843,7 +1843,7 @@ var require_slugify = __commonJS((exports, module) => {
|
|
|
1843
1843
|
});
|
|
1844
1844
|
});
|
|
1845
1845
|
|
|
1846
|
-
//
|
|
1846
|
+
// ../../../../node_modules/pluralize/pluralize.js
|
|
1847
1847
|
var require_pluralize = __commonJS((exports, module) => {
|
|
1848
1848
|
(function(root, pluralize) {
|
|
1849
1849
|
if (typeof __require === "function" && typeof exports === "object" && typeof module === "object") {
|
|
@@ -2207,14 +2207,14 @@ var ExitCode;
|
|
|
2207
2207
|
ExitCode2[ExitCode2["FatalError"] = 1] = "FatalError";
|
|
2208
2208
|
ExitCode2[ExitCode2["InvalidArgument"] = 9] = "InvalidArgument";
|
|
2209
2209
|
})(ExitCode || (ExitCode = {}));
|
|
2210
|
-
//
|
|
2210
|
+
// ../../../../node_modules/consola/dist/index.mjs
|
|
2211
2211
|
init_consola_36c0034f();
|
|
2212
2212
|
init_core();
|
|
2213
2213
|
init_consola_06ad8a64();
|
|
2214
2214
|
init_utils();
|
|
2215
|
-
//
|
|
2215
|
+
// ../strings/src/utils.ts
|
|
2216
2216
|
var import_slugify = __toESM(require_slugify(), 1);
|
|
2217
|
-
//
|
|
2217
|
+
// ../../../../node_modules/title-case/dist/index.js
|
|
2218
2218
|
var WORD_SEPARATORS = new Set(["\u2014", "\u2013", "-", "\u2015", "/"]);
|
|
2219
2219
|
var SENTENCE_TERMINATORS = new Set([".", "!", "?"]);
|
|
2220
2220
|
var TITLE_TERMINATORS = new Set([
|
|
@@ -2262,9 +2262,9 @@ var SMALL_WORDS = new Set([
|
|
|
2262
2262
|
"without",
|
|
2263
2263
|
"yet"
|
|
2264
2264
|
]);
|
|
2265
|
-
//
|
|
2265
|
+
// ../strings/src/pluralize.ts
|
|
2266
2266
|
var pluralize = __toESM(require_pluralize(), 1);
|
|
2267
|
-
//
|
|
2267
|
+
// ../strings/src/helpers.ts
|
|
2268
2268
|
function toString(v2) {
|
|
2269
2269
|
return Object.prototype.toString.call(v2);
|
|
2270
2270
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stacksjs/types",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.58.
|
|
4
|
+
"version": "0.58.73",
|
|
5
5
|
"description": "The Stacks framework types.",
|
|
6
6
|
"author": "Chris Breuer",
|
|
7
7
|
"license": "MIT",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"@stacksjs/validation": "latest",
|
|
57
57
|
"@types/aws4": "^1.11.6",
|
|
58
58
|
"@types/bcryptjs": "^2.4.6",
|
|
59
|
-
"@types/bun": "^1.0.
|
|
59
|
+
"@types/bun": "^1.0.6",
|
|
60
60
|
"@types/crypto-js": "^4.2.2",
|
|
61
61
|
"@types/eslint": "^8.56.2",
|
|
62
62
|
"@types/fs-extra": "^11.0.4",
|
|
@@ -75,9 +75,9 @@
|
|
|
75
75
|
"unplugin-vue-components": "^0.26.0",
|
|
76
76
|
"vite": "^5.1.3",
|
|
77
77
|
"vite-plugin-inspect": "^0.8.3",
|
|
78
|
-
"vite-plugin-pwa": "^0.
|
|
78
|
+
"vite-plugin-pwa": "^0.19.0",
|
|
79
79
|
"vite-ssg": "^0.23.6",
|
|
80
|
-
"vitepress": "1.0.0-rc.
|
|
80
|
+
"vitepress": "1.0.0-rc.44",
|
|
81
81
|
"vue": "^3.4.19"
|
|
82
82
|
},
|
|
83
83
|
"devDependencies": {
|
package/src/app.ts
CHANGED
|
@@ -1,17 +1,5 @@
|
|
|
1
1
|
export type AppEnvType = 'local' | 'dev' | 'stage' | 'prod' | string
|
|
2
2
|
|
|
3
|
-
interface Ports {
|
|
4
|
-
frontend: number
|
|
5
|
-
backend: number // proxies api
|
|
6
|
-
api: number // the Bun server
|
|
7
|
-
admin: number
|
|
8
|
-
library: number
|
|
9
|
-
desktop: number
|
|
10
|
-
email: number
|
|
11
|
-
docs: number
|
|
12
|
-
inspect: number
|
|
13
|
-
}
|
|
14
|
-
|
|
15
3
|
/**
|
|
16
4
|
* **Application Options**
|
|
17
5
|
*
|
|
@@ -104,15 +92,6 @@ export interface AppOptions {
|
|
|
104
92
|
*/
|
|
105
93
|
key: string
|
|
106
94
|
|
|
107
|
-
/**
|
|
108
|
-
* **Application Ports**
|
|
109
|
-
*
|
|
110
|
-
* This port is used by the Stacks servers when running your application, library, email services,
|
|
111
|
-
* and other services. You may change this port to any other port that is free
|
|
112
|
-
* on your machine, as long as the following 6 ports are also available.
|
|
113
|
-
*/
|
|
114
|
-
ports: Ports
|
|
115
|
-
|
|
116
95
|
/**
|
|
117
96
|
* **Application Timezone**
|
|
118
97
|
*
|
package/src/cli.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { BunFile } from 'bun'
|
|
2
|
+
import type { Ports } from './ports'
|
|
2
3
|
|
|
3
4
|
type ArrayBufferView = NodeJS.TypedArray | DataView
|
|
4
5
|
|
|
@@ -121,6 +122,16 @@ export interface CliOptions {
|
|
|
121
122
|
*/
|
|
122
123
|
silent?: boolean
|
|
123
124
|
|
|
125
|
+
/**
|
|
126
|
+
* **Quiet Mode**
|
|
127
|
+
*
|
|
128
|
+
* When you are using "quiet"-mode, the CLI will output minimally
|
|
129
|
+
* to the console.
|
|
130
|
+
*
|
|
131
|
+
* @default false
|
|
132
|
+
*/
|
|
133
|
+
quiet?: boolean
|
|
134
|
+
|
|
124
135
|
/**
|
|
125
136
|
* **Current Work Directory**
|
|
126
137
|
*
|
|
@@ -163,7 +174,7 @@ export interface CliOptions {
|
|
|
163
174
|
|
|
164
175
|
input?: string | ArrayBufferView | ReadableStream | Blob | Response | Request
|
|
165
176
|
|
|
166
|
-
|
|
177
|
+
project?: string // TODO: can create an action that automates creating a type for this
|
|
167
178
|
}
|
|
168
179
|
|
|
169
180
|
export type CliConfig = CliOptions
|
|
@@ -207,7 +218,7 @@ export type DevOptions = {
|
|
|
207
218
|
[key in DevOption]: boolean;
|
|
208
219
|
} & CliOptions
|
|
209
220
|
|
|
210
|
-
export type GeneratorOption = 'types' | 'entries' | 'webTypes' | 'customData' | 'ideHelpers' | 'componentMeta'
|
|
221
|
+
export type GeneratorOption = 'types' | 'entries' | 'webTypes' | 'customData' | 'ideHelpers' | 'componentMeta' | 'coreSymlink' | 'pkgxConfig'
|
|
211
222
|
export type GeneratorOptions = {
|
|
212
223
|
[key in GeneratorOption]?: boolean;
|
|
213
224
|
} & CliOptions
|
|
@@ -225,7 +236,8 @@ export type MakeOptions = {
|
|
|
225
236
|
[key in MakeStringOption]: string
|
|
226
237
|
} & CliOptions
|
|
227
238
|
|
|
228
|
-
export type UpgradeBoolean = 'framework' | 'dependencies' | '
|
|
239
|
+
export type UpgradeBoolean = 'framework' | 'dependencies' | 'bun' | 'shell' | 'binary' | 'all' | 'force'
|
|
240
|
+
|
|
229
241
|
export type UpgradeString = 'version'
|
|
230
242
|
|
|
231
243
|
export type UpgradeOptions = {
|
|
@@ -305,8 +317,14 @@ export interface InstallOptions extends CliOptions { }
|
|
|
305
317
|
export interface ReleaseOptions extends CliOptions {
|
|
306
318
|
dryRun?: boolean
|
|
307
319
|
}
|
|
320
|
+
export interface ProjectsOptions extends CliOptions {
|
|
321
|
+
list?: boolean
|
|
322
|
+
}
|
|
308
323
|
export interface PreinstallOptions extends CliOptions { }
|
|
309
324
|
export interface PrepublishOptions extends CliOptions { }
|
|
325
|
+
export interface CheckOptions extends CliOptions {
|
|
326
|
+
ports?: Partial<Ports>
|
|
327
|
+
}
|
|
310
328
|
export interface TinkerOptions extends CliOptions { }
|
|
311
329
|
export interface TypesOptions extends CliOptions { }
|
|
312
330
|
|
package/src/email.ts
CHANGED
|
@@ -2,12 +2,15 @@ import type { IEmailOptions } from '@novu/stateless'
|
|
|
2
2
|
|
|
3
3
|
export type EmailOptions = Omit<IEmailOptions, 'from'> & {
|
|
4
4
|
from: {
|
|
5
|
-
name
|
|
6
|
-
address
|
|
5
|
+
name: string
|
|
6
|
+
address: string
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
mailboxes: string[]
|
|
10
10
|
|
|
11
|
+
url: string
|
|
12
|
+
charset: string // e.g. UTF-8
|
|
13
|
+
|
|
11
14
|
server: {
|
|
12
15
|
scan?: boolean
|
|
13
16
|
}
|
package/src/index.ts
CHANGED
package/src/ports.ts
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* **Stacks Ports**
|
|
3
|
+
*
|
|
4
|
+
* This port is used by the Stacks servers when running your application, library, email services,
|
|
5
|
+
* and other services. You may change this port to any other port that is free
|
|
6
|
+
* on your machine, as long as the following 6 ports are also available.
|
|
7
|
+
*/
|
|
8
|
+
export interface Ports {
|
|
9
|
+
frontend: number
|
|
10
|
+
backend: number // proxies api
|
|
11
|
+
admin: number
|
|
12
|
+
library: number
|
|
13
|
+
desktop: number
|
|
14
|
+
email: number
|
|
15
|
+
docs: number
|
|
16
|
+
inspect: number
|
|
17
|
+
api: number // the bun server
|
|
18
|
+
systemTray: number
|
|
19
|
+
}
|
package/src/router.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { Action } from '@stacksjs/actions'
|
|
2
|
+
import type { ActionPath } from '~/storage/framework/types/actions'
|
|
2
3
|
|
|
3
4
|
export interface NitroEventHandler {
|
|
4
5
|
/**
|
|
@@ -36,14 +37,13 @@ export type HttpMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'before'
|
|
|
36
37
|
|
|
37
38
|
export type RouteCallback = (params?: Record<string, any>) => any | string | object
|
|
38
39
|
|
|
39
|
-
type ActionName = string
|
|
40
40
|
export interface Route {
|
|
41
41
|
name: string
|
|
42
42
|
uri: string
|
|
43
43
|
url: string // used synonymously with uri
|
|
44
44
|
method: HttpMethod
|
|
45
45
|
pattern: RegExp
|
|
46
|
-
callback: RouteCallback |
|
|
46
|
+
callback: RouteCallback | ActionPath | Action | Promise<any> // we may be able to improve the `Promise<any>` if we could narrow this type `import('../app/Actions/BuddyAction')`
|
|
47
47
|
paramNames: string[]
|
|
48
48
|
middleware?: string | string[]
|
|
49
49
|
statusCode?: StatusCode
|
package/src/stacks.ts
CHANGED
|
@@ -15,6 +15,7 @@ import type {
|
|
|
15
15
|
LoggerConfig,
|
|
16
16
|
NotificationConfig,
|
|
17
17
|
PaymentConfig,
|
|
18
|
+
Ports,
|
|
18
19
|
QueueConfig,
|
|
19
20
|
SearchEngineConfig,
|
|
20
21
|
SecurityConfig,
|
|
@@ -169,6 +170,15 @@ export interface StacksOptions {
|
|
|
169
170
|
*/
|
|
170
171
|
payment: PaymentConfig
|
|
171
172
|
|
|
173
|
+
/**
|
|
174
|
+
* **Ports**
|
|
175
|
+
*
|
|
176
|
+
* This configuration defines all of your Ports options. Because Stacks is fully-typed, you
|
|
177
|
+
* may hover any of the options below and the definitions will be provided. In case you
|
|
178
|
+
* have any questions, feel free to reach out via Discord or GitHub Discussions.
|
|
179
|
+
*/
|
|
180
|
+
ports: Ports
|
|
181
|
+
|
|
172
182
|
/**
|
|
173
183
|
* **Queue Options**
|
|
174
184
|
*
|