effect-start 0.25.0 → 0.26.0

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.
Files changed (117) hide show
  1. package/package.json +18 -86
  2. package/dist/ChildProcess.js +0 -42
  3. package/dist/Commander.js +0 -410
  4. package/dist/ContentNegotiation.js +0 -465
  5. package/dist/Cookies.js +0 -371
  6. package/dist/Development.js +0 -94
  7. package/dist/Effectify.js +0 -27
  8. package/dist/Entity.js +0 -289
  9. package/dist/Fetch.js +0 -192
  10. package/dist/FilePathPattern.js +0 -97
  11. package/dist/FileRouter.js +0 -204
  12. package/dist/FileRouterCodegen.js +0 -298
  13. package/dist/FileSystem.js +0 -132
  14. package/dist/Http.js +0 -107
  15. package/dist/PathPattern.js +0 -451
  16. package/dist/PlatformError.js +0 -40
  17. package/dist/PlatformRuntime.js +0 -71
  18. package/dist/Route.js +0 -143
  19. package/dist/RouteBody.js +0 -92
  20. package/dist/RouteError.js +0 -76
  21. package/dist/RouteHook.js +0 -64
  22. package/dist/RouteHttp.js +0 -367
  23. package/dist/RouteHttpTracer.js +0 -90
  24. package/dist/RouteMount.js +0 -86
  25. package/dist/RouteSchema.js +0 -271
  26. package/dist/RouteSse.js +0 -94
  27. package/dist/RouteTree.js +0 -119
  28. package/dist/RouteTrie.js +0 -179
  29. package/dist/SchemaExtra.js +0 -99
  30. package/dist/Socket.js +0 -40
  31. package/dist/SqlIntrospect.js +0 -515
  32. package/dist/Start.js +0 -79
  33. package/dist/StartApp.js +0 -3
  34. package/dist/StreamExtra.js +0 -135
  35. package/dist/System.js +0 -38
  36. package/dist/TuplePathPattern.js +0 -74
  37. package/dist/Unique.js +0 -226
  38. package/dist/Values.js +0 -52
  39. package/dist/bun/BunBundle.js +0 -186
  40. package/dist/bun/BunChildProcessSpawner.js +0 -142
  41. package/dist/bun/BunImportTrackerPlugin.js +0 -91
  42. package/dist/bun/BunRoute.js +0 -157
  43. package/dist/bun/BunRuntime.js +0 -41
  44. package/dist/bun/BunServer.js +0 -285
  45. package/dist/bun/BunVirtualFilesPlugin.js +0 -54
  46. package/dist/bun/_BunEnhancedResolve.js +0 -127
  47. package/dist/bun/index.js +0 -5
  48. package/dist/bundler/Bundle.js +0 -92
  49. package/dist/bundler/BundleFiles.js +0 -154
  50. package/dist/bundler/BundleRoute.js +0 -62
  51. package/dist/client/Overlay.js +0 -33
  52. package/dist/client/ScrollState.js +0 -106
  53. package/dist/client/index.js +0 -97
  54. package/dist/console/Console.js +0 -42
  55. package/dist/console/ConsoleErrors.js +0 -211
  56. package/dist/console/ConsoleLogger.js +0 -56
  57. package/dist/console/ConsoleMetrics.js +0 -72
  58. package/dist/console/ConsoleProcess.js +0 -59
  59. package/dist/console/ConsoleStore.js +0 -72
  60. package/dist/console/ConsoleTracer.js +0 -107
  61. package/dist/console/Simulation.js +0 -784
  62. package/dist/console/index.js +0 -3
  63. package/dist/console/routes/tree.js +0 -30
  64. package/dist/datastar/actions/fetch.js +0 -536
  65. package/dist/datastar/actions/peek.js +0 -13
  66. package/dist/datastar/actions/setAll.js +0 -19
  67. package/dist/datastar/actions/toggleAll.js +0 -19
  68. package/dist/datastar/attributes/attr.js +0 -49
  69. package/dist/datastar/attributes/bind.js +0 -194
  70. package/dist/datastar/attributes/class.js +0 -54
  71. package/dist/datastar/attributes/computed.js +0 -25
  72. package/dist/datastar/attributes/effect.js +0 -10
  73. package/dist/datastar/attributes/indicator.js +0 -33
  74. package/dist/datastar/attributes/init.js +0 -27
  75. package/dist/datastar/attributes/jsonSignals.js +0 -33
  76. package/dist/datastar/attributes/on.js +0 -81
  77. package/dist/datastar/attributes/onIntersect.js +0 -53
  78. package/dist/datastar/attributes/onInterval.js +0 -31
  79. package/dist/datastar/attributes/onSignalPatch.js +0 -51
  80. package/dist/datastar/attributes/ref.js +0 -11
  81. package/dist/datastar/attributes/show.js +0 -32
  82. package/dist/datastar/attributes/signals.js +0 -18
  83. package/dist/datastar/attributes/style.js +0 -57
  84. package/dist/datastar/attributes/text.js +0 -29
  85. package/dist/datastar/engine.js +0 -1145
  86. package/dist/datastar/index.js +0 -25
  87. package/dist/datastar/utils.js +0 -250
  88. package/dist/datastar/watchers/patchElements.js +0 -486
  89. package/dist/datastar/watchers/patchSignals.js +0 -14
  90. package/dist/experimental/EncryptedCookies.js +0 -328
  91. package/dist/experimental/index.js +0 -1
  92. package/dist/hyper/Hyper.js +0 -28
  93. package/dist/hyper/HyperHtml.js +0 -165
  94. package/dist/hyper/HyperNode.js +0 -13
  95. package/dist/hyper/HyperRoute.js +0 -45
  96. package/dist/hyper/html.js +0 -30
  97. package/dist/hyper/index.js +0 -5
  98. package/dist/hyper/jsx-runtime.js +0 -14
  99. package/dist/index.js +0 -8
  100. package/dist/node/NodeFileSystem.js +0 -675
  101. package/dist/node/NodeUtils.js +0 -23
  102. package/dist/sql/Sql.js +0 -8
  103. package/dist/sql/bun/index.js +0 -142
  104. package/dist/sql/index.js +0 -1
  105. package/dist/sql/libsql/index.js +0 -156
  106. package/dist/sql/mssql/docker.js +0 -110
  107. package/dist/sql/mssql/index.js +0 -194
  108. package/dist/testing/TestLogger.js +0 -42
  109. package/dist/testing/index.js +0 -2
  110. package/dist/testing/utils.js +0 -61
  111. package/dist/x/cloudflare/CloudflareTunnel.js +0 -63
  112. package/dist/x/cloudflare/index.js +0 -1
  113. package/dist/x/tailscale/TailscaleTunnel.js +0 -94
  114. package/dist/x/tailscale/index.js +0 -1
  115. package/dist/x/tailwind/TailwindPlugin.js +0 -294
  116. package/dist/x/tailwind/compile.js +0 -210
  117. package/dist/x/tailwind/plugin.js +0 -17
@@ -1,210 +0,0 @@
1
- import fsPromises from "node:fs/promises"
2
- import path from "node:path"
3
- import { pathToFileURL } from "node:url"
4
- import { compile as _compile, compileAst as _compileAst, Features, Polyfills } from "tailwindcss"
5
- import * as BunEnhancedResolve from "../../bun/_BunEnhancedResolve"
6
-
7
- export { Features, Polyfills }
8
-
9
- function createCompileOptions({
10
- base,
11
- from,
12
- polyfills,
13
- onDependency,
14
-
15
- customCssResolver,
16
- customJsResolver,
17
- }) {
18
- return {
19
- base,
20
- polyfills,
21
- from,
22
- async loadModule(id, base) {
23
- return loadModule(id, base, onDependency, customJsResolver)
24
- },
25
- async loadStylesheet(id, sheetBase) {
26
- let sheet = await loadStylesheet(id, sheetBase, onDependency, customCssResolver)
27
-
28
- return sheet
29
- },
30
- }
31
- }
32
-
33
- async function ensureSourceDetectionRootExists(compiler) {
34
- // Verify if the `source(…)` path exists (until the glob pattern starts)
35
- if (compiler.root && compiler.root !== "none") {
36
- let globSymbols = /[*{]/
37
- let basePath = []
38
- for (let segment of compiler.root.pattern.split("/")) {
39
- if (globSymbols.test(segment)) {
40
- break
41
- }
42
-
43
- basePath.push(segment)
44
- }
45
-
46
- let exists = await fsPromises
47
- .stat(path.resolve(compiler.root.base, basePath.join("/")))
48
- .then((stat) => stat.isDirectory())
49
- .catch(() => false)
50
-
51
- if (!exists) {
52
- throw new Error(
53
- `The \`source(${compiler.root.pattern})\` does not exist or is not a directory.`,
54
- )
55
- }
56
- }
57
- }
58
-
59
- export async function compileAst(
60
- ast,
61
- options,
62
- ) {
63
- let compiler = await _compileAst(ast, createCompileOptions(options))
64
- await ensureSourceDetectionRootExists(compiler)
65
- return compiler
66
- }
67
-
68
- export async function compile(css, options) {
69
- let compiler = await _compile(css, createCompileOptions(options))
70
- await ensureSourceDetectionRootExists(compiler)
71
- return compiler
72
- }
73
-
74
- export async function loadModule(
75
- id,
76
- base,
77
- _onDependency,
78
- customJsResolver,
79
- ) {
80
- if (id[0] !== ".") {
81
- let resolvedPath = await resolveJsId(id, base, customJsResolver)
82
- if (!resolvedPath) {
83
- throw new Error(`Could not resolve '${id}' from '${base}'`)
84
- }
85
-
86
- let module = await importModule(pathToFileURL(resolvedPath).href)
87
- return {
88
- path: resolvedPath,
89
- base: path.dirname(resolvedPath),
90
- module: module.default ?? module,
91
- }
92
- }
93
-
94
- let resolvedPath = await resolveJsId(id, base, customJsResolver)
95
- if (!resolvedPath) {
96
- throw new Error(`Could not resolve '${id}' from '${base}'`)
97
- }
98
-
99
- let module = await importModule(pathToFileURL(resolvedPath).href + "?id=" + Date.now())
100
-
101
- return {
102
- path: resolvedPath,
103
- base: path.dirname(resolvedPath),
104
- module: module.default ?? module,
105
- }
106
- }
107
-
108
- async function loadStylesheet(
109
- id,
110
- base,
111
- onDependency,
112
- cssResolver,
113
- ) {
114
- let resolvedPath = await resolveCssId(id, base, cssResolver)
115
- if (!resolvedPath) throw new Error(`Could not resolve '${id}' from '${base}'`)
116
-
117
- onDependency(resolvedPath)
118
-
119
- let file = await fsPromises.readFile(resolvedPath, "utf-8")
120
- return {
121
- path: resolvedPath,
122
- base: path.dirname(resolvedPath),
123
- content: file,
124
- }
125
- }
126
-
127
- async function importModule(path) {
128
- if (typeof globalThis.__tw_load === "function") {
129
- let module = await globalThis.__tw_load(path)
130
- if (module) {
131
- return module
132
- }
133
- }
134
-
135
- return await import(path)
136
- }
137
-
138
- const cssResolver = BunEnhancedResolve.ResolverFactory.createResolver({
139
- extensions: [".css"],
140
- mainFields: ["style"],
141
- conditionNames: ["style"],
142
- })
143
- async function resolveCssId(
144
- id,
145
- base,
146
- customCssResolver,
147
- ) {
148
- if (typeof globalThis.__tw_resolve === "function") {
149
- let resolved = globalThis.__tw_resolve(id, base)
150
- if (resolved) {
151
- return Promise.resolve(resolved)
152
- }
153
- }
154
-
155
- if (customCssResolver) {
156
- let customResolution = await customCssResolver(id, base)
157
- if (customResolution) {
158
- return customResolution
159
- }
160
- }
161
-
162
- return runResolver(cssResolver, id, base)
163
- }
164
-
165
- const esmResolver = BunEnhancedResolve.ResolverFactory.createResolver({
166
- extensions: [".js", ".json", ".node", ".ts"],
167
- conditionNames: ["node", "import"],
168
- mainFields: ["module", "main"],
169
- })
170
-
171
- const cjsResolver = BunEnhancedResolve.ResolverFactory.createResolver({
172
- extensions: [".js", ".json", ".node", ".ts"],
173
- conditionNames: ["node", "require"],
174
- mainFields: ["main"],
175
- })
176
-
177
- async function resolveJsId(
178
- id,
179
- base,
180
- customJsResolver,
181
- ) {
182
- if (typeof globalThis.__tw_resolve === "function") {
183
- let resolved = globalThis.__tw_resolve(id, base)
184
- if (resolved) {
185
- return Promise.resolve(resolved)
186
- }
187
- }
188
-
189
- if (customJsResolver) {
190
- let customResolution = await customJsResolver(id, base)
191
- if (customResolution) {
192
- return customResolution
193
- }
194
- }
195
-
196
- return runResolver(esmResolver, id, base).catch(() => runResolver(cjsResolver, id, base))
197
- }
198
-
199
- function runResolver(
200
- resolver,
201
- id,
202
- base,
203
- ) {
204
- return new Promise((resolve, reject) =>
205
- resolver.resolve({}, base, id, {}, (err, result) => {
206
- if (err) return reject(err)
207
- resolve(result)
208
- }),
209
- )
210
- }
@@ -1,17 +0,0 @@
1
- import * as NPath from "node:path"
2
- import * as NodeUtils from "../../node/NodeUtils.js"
3
- import * as TailwindPlugin from "./TailwindPlugin.js"
4
-
5
- // Append `?dir=` to module identifier to pass custom directory to scan
6
- const dirParam = URL.parse(import.meta.url)?.searchParams.get("dir")
7
- const packageJson = await NodeUtils.findClosestPackageJson(process.cwd())
8
- const scanPath = dirParam
9
- ? NPath.resolve(process.cwd(), dirParam)
10
- : packageJson
11
- ? NPath.dirname(packageJson)
12
- : process.cwd()
13
-
14
- // Export as default to be used in bunfig.toml
15
- export default TailwindPlugin.make({
16
- scanPath,
17
- })