@uniflowed/config 0.0.0-alpha.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/index.js ADDED
@@ -0,0 +1,12 @@
1
+ // @flow
2
+ //
3
+ // `@uniflowed/config`.
4
+
5
+ export type {
6
+ CapabilityJsHost,
7
+ RuleLevel,
8
+ TaskDefinition,
9
+ UniflowedConfig,
10
+ } from "./internal/schema.js";
11
+
12
+ export { defineConfig } from "./internal/schema.js";
@@ -0,0 +1,313 @@
1
+ // @flow
2
+ //
3
+ // Owns the Flow shape of `uf.config.js`; `index.js` keeps the public package
4
+ // entry point thin.
5
+
6
+ export type RuleLevel = "off" | "warn" | "error" | 0 | 1 | 2 | boolean;
7
+
8
+ export type TaskDefinition =
9
+ | string
10
+ | {
11
+ +command: string,
12
+ +cwd?: string,
13
+ +dependsOn?: $ReadOnlyArray<string>,
14
+ +env?: { +[string]: string },
15
+ };
16
+
17
+ export type CapabilityJsHost = "node" | "deno" | "bun";
18
+
19
+ export type UniflowedConfig = {
20
+ +app?: {
21
+ +orm?: {
22
+ +enabled?: boolean,
23
+ +module?: "@uniflowed/orm",
24
+ +native?: true,
25
+ +generatedFlowTypes?: true,
26
+ +preparedByDefault?: true,
27
+ },
28
+ +builtins?: {
29
+ +fetch?: {
30
+ +module?: "@uniflowed/fetch",
31
+ +overrideGlobalFetch?: false,
32
+ },
33
+ +cell?: boolean,
34
+ +reactCompiler?: {
35
+ +enabled?: boolean,
36
+ +implementation?: "official-rust",
37
+ +mode?: "syntax",
38
+ },
39
+ +graphql?: {
40
+ +module?: "@uniflowed/graphql",
41
+ +relayBase?: true,
42
+ },
43
+ +loader?: {
44
+ +module?: "@uniflowed/loader",
45
+ +stateModule?: "@uniflowed/state",
46
+ +cache?: "opt-in",
47
+ },
48
+ +markdown?: {
49
+ +module?: "@uniflowed/markdown",
50
+ +engine?: "ox-content-wasm",
51
+ +mdx?: {
52
+ +enabled?: boolean,
53
+ +extensions?: $ReadOnlyArray<".mdx">,
54
+ +jsxImportSource?: "@uniflowed/jsx-runtime",
55
+ +pipelinePlugin?: "built-in",
56
+ },
57
+ +cache?: "opt-in",
58
+ },
59
+ +motion?: {
60
+ +module?: "@uniflowed/motion",
61
+ +engine?: "uf-native",
62
+ +compilerSafe?: true,
63
+ +serverComponentSafe?: true,
64
+ +reducedMotionDefault?: true,
65
+ },
66
+ +tui?: {
67
+ +module?: "@uniflowed/tui",
68
+ +stdModule?: "@uniflowed/std/tui",
69
+ +standard?: "open-tui",
70
+ +nativeRenderer?: true,
71
+ +beatReactInk?: true,
72
+ +richMedia?: true,
73
+ +inMemoryTests?: true,
74
+ },
75
+ +pwa?: {
76
+ +module?: "@uniflowed/pwa",
77
+ +enabledByDefault?: false,
78
+ +cache?: "opt-in",
79
+ },
80
+ +temporal?: {
81
+ +module?: "@uniflowed/temporal",
82
+ +lite?: true,
83
+ },
84
+ +web?: {
85
+ +module?: "@uniflowed/web",
86
+ +typedRoutes?: true,
87
+ +linkPrefetch?: "off" | "intent" | "render",
88
+ +cache?: "opt-in",
89
+ },
90
+ },
91
+ +runtime?: {
92
+ +default?: "node" | "deno" | "bun" | "uf",
93
+ +compatibility?: $ReadOnlyArray<
94
+ "node" | "bun" | "deno" | "edge" | "serverless" | "container",
95
+ >,
96
+ +capabilityJsHost?: {
97
+ +default?: CapabilityJsHost,
98
+ +hosts?: $ReadOnlyArray<CapabilityJsHost>,
99
+ +autoDetect?: boolean,
100
+ },
101
+ +deploy?: {
102
+ +enabled?: boolean,
103
+ +adapters?: $ReadOnlyArray<
104
+ "node" | "bun" | "deno" | "edge" | "serverless" | "static" | "container",
105
+ >,
106
+ },
107
+ },
108
+ +router?: {
109
+ +entry?: string,
110
+ +root?: string,
111
+ +manifest?: string,
112
+ },
113
+ +rendering?: {
114
+ +modes?: $ReadOnlyArray<"ppr" | "ssr" | "ssg" | "isr">,
115
+ +cache?: {
116
+ +actions?: boolean,
117
+ +data?: boolean,
118
+ +fetch?: boolean,
119
+ +route?: boolean,
120
+ },
121
+ },
122
+ },
123
+ +build?: {
124
+ +entries?: $ReadOnlyArray<string>,
125
+ +outDir?: string,
126
+ +staticBuild?: boolean,
127
+ +sourcemap?: boolean,
128
+ },
129
+ +dev?: {
130
+ +host?: string,
131
+ +port?: number,
132
+ +strictPort?: boolean,
133
+ },
134
+ +docs?: {
135
+ +enabled?: boolean,
136
+ +app?: string,
137
+ +source?: string,
138
+ +outDir?: string,
139
+ +staticBuild?: boolean,
140
+ +deploy?: "void",
141
+ },
142
+ +lint?: {
143
+ +engine?: "rust",
144
+ +flow?: {
145
+ +builtins?: "mixed",
146
+ +parser?: "official-flow-rust",
147
+ },
148
+ +rules?: { +[string]: RuleLevel },
149
+ },
150
+ +fmt?: {
151
+ +indentWidth?: number,
152
+ +lineWidth?: number,
153
+ +maxBlankLines?: number,
154
+ +flow?: {
155
+ +parser?: "official-flow-rust",
156
+ +printer?: "uf-rust",
157
+ },
158
+ +nonFlow?: {
159
+ +formatter?: "biome",
160
+ },
161
+ +quotes?: "single" | "double",
162
+ +semicolons?: boolean,
163
+ },
164
+ +package?: {
165
+ +generator?: "napi-rs",
166
+ +targets?: $ReadOnlyArray<
167
+ "node-napi" | "bun-napi" | "deno-napi" | "edge-wasm" | "serverless-napi",
168
+ >,
169
+ +typescriptDeclarationsToFlow?: true,
170
+ },
171
+ +pm?: {
172
+ +module?: "@uniflowed/pm",
173
+ +resolver?: "uf-native",
174
+ +lockfile?: "uf.lock",
175
+ +storeDir?: string,
176
+ +allowLifecycleScripts?: false,
177
+ },
178
+ +rm?: {
179
+ +module?: "@uniflowed/rm",
180
+ +inferFromConfig?: true,
181
+ +version?: "node@system" | string,
182
+ +autoSwitch?: boolean,
183
+ +acquisition?: "auto",
184
+ +apply?: "config-and-host",
185
+ +doctor?: boolean,
186
+ },
187
+ +server?: {
188
+ +engine?: "native-rust",
189
+ +native?: {
190
+ +streaming?: boolean,
191
+ +zeroCopyHttp?: boolean,
192
+ +adapters?: $ReadOnlyArray<
193
+ "uf" | "node" | "bun" | "deno" | "edge" | "serverless" | "container",
194
+ >,
195
+ },
196
+ },
197
+ +std?: {
198
+ +module?: "@uniflowed/std",
199
+ +wintertcAligned?: true,
200
+ +nativeBindings?: boolean,
201
+ +modules?: $ReadOnlyArray<
202
+ | "vfs"
203
+ | "fs"
204
+ | "types"
205
+ | "pipeline"
206
+ | "effect"
207
+ | "env"
208
+ | "format"
209
+ | "stdio"
210
+ | "hash"
211
+ | "debug"
212
+ | "defs"
213
+ | "lock"
214
+ | "colors"
215
+ | "qs"
216
+ | "equality"
217
+ | "http"
218
+ | "buffer"
219
+ | "ws"
220
+ | "sql"
221
+ | "json"
222
+ | "yaml"
223
+ | "toml"
224
+ | "collections"
225
+ | "crypto"
226
+ | "dotenv"
227
+ | "math"
228
+ | "os"
229
+ | "net"
230
+ | "dns"
231
+ | "path"
232
+ | "stream"
233
+ | "url"
234
+ | "wasm"
235
+ | "glob"
236
+ | "motion"
237
+ | "tui"
238
+ | "cron"
239
+ | "s3"
240
+ | "sigv4"
241
+ | "functions"
242
+ | "uuid"
243
+ | "zip"
244
+ | "import-meta"
245
+ | "defer",
246
+ >,
247
+ },
248
+ +publish?: {
249
+ +registry?: string,
250
+ +dryRun?: boolean,
251
+ +firstPublish?: {
252
+ +mode?: "local",
253
+ +localBootstrap?: true,
254
+ },
255
+ +trustedPublish?: {
256
+ +enabled?: true,
257
+ +provider?: "github-actions-oidc",
258
+ +tokenless?: true,
259
+ +trigger?: "tag-push",
260
+ },
261
+ },
262
+ +release?: {
263
+ +tagPrefix?: "uf@",
264
+ +command?: "uf release alpha" | string,
265
+ +publish?: true,
266
+ },
267
+ +story?: {
268
+ +enabled?: boolean,
269
+ +module?: "@uniflowed/story",
270
+ +mocks?: {
271
+ +module?: "@uniflowed/mock",
272
+ +mswCompatible?: boolean,
273
+ },
274
+ +browser?: {
275
+ +module?: "@uniflowed/browser",
276
+ +playwrightCompatible?: boolean,
277
+ },
278
+ },
279
+ +taskRunner?: {
280
+ +engine?: "vite-task",
281
+ +allowPackageScripts?: false,
282
+ },
283
+ +test?: {
284
+ +module?: "@uniflowed/test",
285
+ +runner?: {
286
+ +runtime?: "capability-js-host" | "uf-self-hosted",
287
+ +jsHosts?: $ReadOnlyArray<CapabilityJsHost>,
288
+ +scheduler?: "native-work-stealing",
289
+ +performanceTarget?: "faster-than-bun",
290
+ +officialFlowParser?: true,
291
+ },
292
+ +reactTestingLibraryNative?: true,
293
+ },
294
+ +tasks?: { +[string]: TaskDefinition },
295
+ +vrt?: {
296
+ +enabled?: boolean,
297
+ +module?: "@uniflowed/vrt",
298
+ +baselines?: string,
299
+ +threshold?: number,
300
+ },
301
+ };
302
+
303
+ /**
304
+ * Identity function that pins `uf.config.js` to `UniflowedConfig`.
305
+ *
306
+ * This is the one binding in the package that is not a native call: a config
307
+ * module evaluates `defineConfig({...})` at its top level, so raising here would
308
+ * make every config file unloadable. Its whole job is to give Flow a type to
309
+ * check the literal against.
310
+ */
311
+ export function defineConfig(config: UniflowedConfig): UniflowedConfig {
312
+ return config;
313
+ }
package/package.json ADDED
@@ -0,0 +1,20 @@
1
+ {
2
+ "name": "@uniflowed/config",
3
+ "version": "0.0.0-alpha.1",
4
+ "description": "Flow declarations for @uniflowed/config, part of the Unified Toolchain for Flow.",
5
+ "type": "module",
6
+ "license": "MIT",
7
+ "sideEffects": false,
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "git+https://github.com/ubugeeei-prod/uf.git",
11
+ "directory": "packages/config"
12
+ },
13
+ "exports": {
14
+ ".": "./index.js"
15
+ },
16
+ "files": [
17
+ "index.js",
18
+ "internal"
19
+ ]
20
+ }