svelte-effect-runtime 1.2.3 → 1.3.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.
- package/dist/chunks/client-DkW4e4dD.js +199 -0
- package/dist/chunks/client-DkW4e4dD.js.map +1 -0
- package/dist/chunks/effect-CL8GJs8A.js +51 -0
- package/dist/chunks/effect-CL8GJs8A.js.map +1 -0
- package/dist/chunks/effect-compat-BhW0YPIs.js +103 -0
- package/dist/chunks/effect-compat-BhW0YPIs.js.map +1 -0
- package/dist/chunks/{magic-string.es-5gRBdMgP.js → magic-string.es-BnGH-5YR.js} +1 -1
- package/dist/chunks/{magic-string.es-5gRBdMgP.js.map → magic-string.es-BnGH-5YR.js.map} +1 -1
- package/dist/chunks/{markup-Ccw42uCl.js → markup-BpSHnnYD.js} +4 -4
- package/dist/chunks/{markup-Ccw42uCl.js.map → markup-BpSHnnYD.js.map} +1 -1
- package/dist/chunks/preprocess-CtLrnJcK.js +44 -0
- package/dist/chunks/preprocess-CtLrnJcK.js.map +1 -0
- package/dist/chunks/server-DR-6LMdP.js +629 -0
- package/dist/chunks/server-DR-6LMdP.js.map +1 -0
- package/dist/chunks/v3-p8V3Drpp.js +1 -0
- package/dist/chunks/v4-DIhYCbb_.js +1 -0
- package/dist/chunks/vite-DqjXRZd4.js +143 -0
- package/dist/chunks/vite-DqjXRZd4.js.map +1 -0
- package/dist/client.d.ts +1 -64
- package/dist/client.js +2 -170
- package/dist/effect.d.ts +1 -7
- package/dist/effect.js +1 -27
- package/dist/internal/effect-compat.d.ts +21 -0
- package/dist/internal/markup.d.ts +1 -1
- package/dist/internal/markup.js +1 -1
- package/dist/internal/remote-client.js +30 -6
- package/dist/internal/remote-client.js.map +1 -1
- package/dist/internal/transform.d.ts +1 -1
- package/dist/internal/transform.js +3 -4
- package/dist/internal/transform.js.map +1 -1
- package/dist/language-server.d.ts +9 -3
- package/dist/language-server.js +3 -3
- package/dist/mod.d.ts +1 -6
- package/dist/mod.js +3 -5
- package/dist/preprocess.d.ts +23 -6
- package/dist/preprocess.js +10 -31
- package/dist/preprocess.js.map +1 -1
- package/dist/root-node.d.ts +1 -14
- package/dist/root-node.js +63 -8
- package/dist/root-node.js.map +1 -0
- package/dist/server.d.ts +56 -129
- package/dist/server.js +44 -508
- package/dist/server.js.map +1 -1
- package/dist/v3/client.d.ts +93 -0
- package/dist/v3/effect.d.ts +17 -0
- package/dist/v3/mod.d.ts +3 -0
- package/dist/v3/preprocess.d.ts +28 -0
- package/dist/v3/root-node.d.ts +59 -0
- package/dist/v3/server.d.ts +167 -0
- package/dist/v3/vite.d.ts +46 -0
- package/dist/v4/client.d.ts +2 -0
- package/dist/v4/effect.d.ts +24 -0
- package/dist/v4/effect.js +19 -0
- package/dist/v4/effect.js.map +1 -0
- package/dist/v4/mod.d.ts +3 -0
- package/dist/v4/mod.js +3 -0
- package/dist/v4/preprocess.d.ts +30 -0
- package/dist/v4/preprocess.js +28 -0
- package/dist/v4/preprocess.js.map +1 -0
- package/dist/v4/root-node.d.ts +59 -0
- package/dist/v4/root-node.js +63 -0
- package/dist/v4/root-node.js.map +1 -0
- package/dist/v4/server.d.ts +118 -0
- package/dist/v4/server.js +22 -0
- package/dist/v4/server.js.map +1 -0
- package/dist/v4/vite.d.ts +34 -0
- package/dist/v4/vite.js +31 -0
- package/dist/v4/vite.js.map +1 -0
- package/dist/vite.d.ts +30 -15
- package/dist/vite.js +18 -101
- package/dist/vite.js.map +1 -1
- package/package.json +46 -3
- package/dist/client.js.map +0 -1
- package/dist/effect.js.map +0 -1
package/dist/server.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.js","names":["devalue.stringify","svelte_error","get_native_request_event","native_query","native_command","native_form","native_prerender"],"sources":["../../node_modules/.deno/devalue@5.6.4/node_modules/devalue/src/utils.js","../../node_modules/.deno/devalue@5.6.4/node_modules/devalue/src/base64.js","../../node_modules/.deno/devalue@5.6.4/node_modules/devalue/src/stringify.js","../../modules/svelte-effect-runtime/server.ts"],"sourcesContent":["/** @type {Record<string, string>} */\nexport const escaped = {\n\t'<': '\\\\u003C',\n\t'\\\\': '\\\\\\\\',\n\t'\\b': '\\\\b',\n\t'\\f': '\\\\f',\n\t'\\n': '\\\\n',\n\t'\\r': '\\\\r',\n\t'\\t': '\\\\t',\n\t'\\u2028': '\\\\u2028',\n\t'\\u2029': '\\\\u2029'\n};\n\nexport class DevalueError extends Error {\n\t/**\n\t * @param {string} message\n\t * @param {string[]} keys\n\t * @param {any} [value] - The value that failed to be serialized\n\t * @param {any} [root] - The root value being serialized\n\t */\n\tconstructor(message, keys, value, root) {\n\t\tsuper(message);\n\t\tthis.name = 'DevalueError';\n\t\tthis.path = keys.join('');\n\t\tthis.value = value;\n\t\tthis.root = root;\n\t}\n}\n\n/** @param {any} thing */\nexport function is_primitive(thing) {\n\treturn Object(thing) !== thing;\n}\n\nconst object_proto_names = /* @__PURE__ */ Object.getOwnPropertyNames(\n\tObject.prototype\n)\n\t.sort()\n\t.join('\\0');\n\n/** @param {any} thing */\nexport function is_plain_object(thing) {\n\tconst proto = Object.getPrototypeOf(thing);\n\n\treturn (\n\t\tproto === Object.prototype ||\n\t\tproto === null ||\n\t\tObject.getPrototypeOf(proto) === null ||\n\t\tObject.getOwnPropertyNames(proto).sort().join('\\0') === object_proto_names\n\t);\n}\n\n/** @param {any} thing */\nexport function get_type(thing) {\n\treturn Object.prototype.toString.call(thing).slice(8, -1);\n}\n\n/** @param {string} char */\nfunction get_escaped_char(char) {\n\tswitch (char) {\n\t\tcase '\"':\n\t\t\treturn '\\\\\"';\n\t\tcase '<':\n\t\t\treturn '\\\\u003C';\n\t\tcase '\\\\':\n\t\t\treturn '\\\\\\\\';\n\t\tcase '\\n':\n\t\t\treturn '\\\\n';\n\t\tcase '\\r':\n\t\t\treturn '\\\\r';\n\t\tcase '\\t':\n\t\t\treturn '\\\\t';\n\t\tcase '\\b':\n\t\t\treturn '\\\\b';\n\t\tcase '\\f':\n\t\t\treturn '\\\\f';\n\t\tcase '\\u2028':\n\t\t\treturn '\\\\u2028';\n\t\tcase '\\u2029':\n\t\t\treturn '\\\\u2029';\n\t\tdefault:\n\t\t\treturn char < ' '\n\t\t\t\t? `\\\\u${char.charCodeAt(0).toString(16).padStart(4, '0')}`\n\t\t\t\t: '';\n\t}\n}\n\n/** @param {string} str */\nexport function stringify_string(str) {\n\tlet result = '';\n\tlet last_pos = 0;\n\tconst len = str.length;\n\n\tfor (let i = 0; i < len; i += 1) {\n\t\tconst char = str[i];\n\t\tconst replacement = get_escaped_char(char);\n\t\tif (replacement) {\n\t\t\tresult += str.slice(last_pos, i) + replacement;\n\t\t\tlast_pos = i + 1;\n\t\t}\n\t}\n\n\treturn `\"${last_pos === 0 ? str : result + str.slice(last_pos)}\"`;\n}\n\n/** @param {Record<string | symbol, any>} object */\nexport function enumerable_symbols(object) {\n\treturn Object.getOwnPropertySymbols(object).filter(\n\t\t(symbol) => Object.getOwnPropertyDescriptor(object, symbol).enumerable\n\t);\n}\n\nconst is_identifier = /^[a-zA-Z_$][a-zA-Z_$0-9]*$/;\n\n/** @param {string} key */\nexport function stringify_key(key) {\n\treturn is_identifier.test(key) ? '.' + key : '[' + JSON.stringify(key) + ']';\n}\n\n/** @param {string} s */\nfunction is_valid_array_index(s) {\n\tif (s.length === 0) return false;\n\tif (s.length > 1 && s.charCodeAt(0) === 48) return false; // leading zero\n\tfor (let i = 0; i < s.length; i++) {\n\t\tconst c = s.charCodeAt(i);\n\t\tif (c < 48 || c > 57) return false;\n\t}\n\t// by this point we know it's a string of digits, but it has to be within the range of valid array indices\n\tconst n = +s;\n\tif (n >= 2 ** 32 - 1) return false;\n\tif (n < 0) return false;\n\treturn true;\n}\n\n/**\n * Finds the populated indices of an array.\n * @param {unknown[]} array\n */\nexport function valid_array_indices(array) {\n\tconst keys = Object.keys(array);\n\tfor (var i = keys.length - 1; i >= 0; i--) {\n\t\tif (is_valid_array_index(keys[i])) {\n\t\t\tbreak;\n\t\t}\n\t}\n\tkeys.length = i + 1;\n\treturn keys;\n}\n","/**\n * Base64 Encodes an arraybuffer\n * @param {ArrayBuffer} arraybuffer\n * @returns {string}\n */\nexport function encode64(arraybuffer) {\n const dv = new DataView(arraybuffer);\n let binaryString = \"\";\n\n for (let i = 0; i < arraybuffer.byteLength; i++) {\n binaryString += String.fromCharCode(dv.getUint8(i));\n }\n\n return binaryToAscii(binaryString);\n}\n\n/**\n * Decodes a base64 string into an arraybuffer\n * @param {string} string\n * @returns {ArrayBuffer}\n */\nexport function decode64(string) {\n const binaryString = asciiToBinary(string);\n const arraybuffer = new ArrayBuffer(binaryString.length);\n const dv = new DataView(arraybuffer);\n\n for (let i = 0; i < arraybuffer.byteLength; i++) {\n dv.setUint8(i, binaryString.charCodeAt(i));\n }\n\n return arraybuffer;\n}\n\nconst KEY_STRING =\n \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\";\n\n/**\n * Substitute for atob since it's deprecated in node.\n * Does not do any input validation.\n *\n * @see https://github.com/jsdom/abab/blob/master/lib/atob.js\n *\n * @param {string} data\n * @returns {string}\n */\nfunction asciiToBinary(data) {\n if (data.length % 4 === 0) {\n data = data.replace(/==?$/, \"\");\n }\n\n let output = \"\";\n let buffer = 0;\n let accumulatedBits = 0;\n\n for (let i = 0; i < data.length; i++) {\n buffer <<= 6;\n buffer |= KEY_STRING.indexOf(data[i]);\n accumulatedBits += 6;\n if (accumulatedBits === 24) {\n output += String.fromCharCode((buffer & 0xff0000) >> 16);\n output += String.fromCharCode((buffer & 0xff00) >> 8);\n output += String.fromCharCode(buffer & 0xff);\n buffer = accumulatedBits = 0;\n }\n }\n if (accumulatedBits === 12) {\n buffer >>= 4;\n output += String.fromCharCode(buffer);\n } else if (accumulatedBits === 18) {\n buffer >>= 2;\n output += String.fromCharCode((buffer & 0xff00) >> 8);\n output += String.fromCharCode(buffer & 0xff);\n }\n return output;\n}\n\n/**\n * Substitute for btoa since it's deprecated in node.\n * Does not do any input validation.\n *\n * @see https://github.com/jsdom/abab/blob/master/lib/btoa.js\n *\n * @param {string} str\n * @returns {string}\n */\nfunction binaryToAscii(str) {\n let out = \"\";\n for (let i = 0; i < str.length; i += 3) {\n /** @type {[number, number, number, number]} */\n const groupsOfSix = [undefined, undefined, undefined, undefined];\n groupsOfSix[0] = str.charCodeAt(i) >> 2;\n groupsOfSix[1] = (str.charCodeAt(i) & 0x03) << 4;\n if (str.length > i + 1) {\n groupsOfSix[1] |= str.charCodeAt(i + 1) >> 4;\n groupsOfSix[2] = (str.charCodeAt(i + 1) & 0x0f) << 2;\n }\n if (str.length > i + 2) {\n groupsOfSix[2] |= str.charCodeAt(i + 2) >> 6;\n groupsOfSix[3] = str.charCodeAt(i + 2) & 0x3f;\n }\n for (let j = 0; j < groupsOfSix.length; j++) {\n if (typeof groupsOfSix[j] === \"undefined\") {\n out += \"=\";\n } else {\n out += KEY_STRING[groupsOfSix[j]];\n }\n }\n }\n return out;\n}\n","import {\n\tDevalueError,\n\tenumerable_symbols,\n\tget_type,\n\tis_plain_object,\n\tis_primitive,\n\tstringify_key,\n\tstringify_string,\n\tvalid_array_indices\n} from './utils.js';\nimport {\n\tHOLE,\n\tNAN,\n\tNEGATIVE_INFINITY,\n\tNEGATIVE_ZERO,\n\tPOSITIVE_INFINITY,\n\tSPARSE,\n\tUNDEFINED\n} from './constants.js';\nimport { encode64 } from './base64.js';\n\n/**\n * Turn a value into a JSON string that can be parsed with `devalue.parse`\n * @param {any} value\n * @param {Record<string, (value: any) => any>} [reducers]\n */\nexport function stringify(value, reducers) {\n\t/** @type {any[]} */\n\tconst stringified = [];\n\n\t/** @type {Map<any, number>} */\n\tconst indexes = new Map();\n\n\t/** @type {Array<{ key: string, fn: (value: any) => any }>} */\n\tconst custom = [];\n\tif (reducers) {\n\t\tfor (const key of Object.getOwnPropertyNames(reducers)) {\n\t\t\tcustom.push({ key, fn: reducers[key] });\n\t\t}\n\t}\n\n\t/** @type {string[]} */\n\tconst keys = [];\n\n\tlet p = 0;\n\n\t/** @param {any} thing */\n\tfunction flatten(thing) {\n\t\tif (thing === undefined) return UNDEFINED;\n\t\tif (Number.isNaN(thing)) return NAN;\n\t\tif (thing === Infinity) return POSITIVE_INFINITY;\n\t\tif (thing === -Infinity) return NEGATIVE_INFINITY;\n\t\tif (thing === 0 && 1 / thing < 0) return NEGATIVE_ZERO;\n\n\t\tif (indexes.has(thing)) return indexes.get(thing);\n\n\t\tconst index = p++;\n\t\tindexes.set(thing, index);\n\n\t\tfor (const { key, fn } of custom) {\n\t\t\tconst value = fn(thing);\n\t\t\tif (value) {\n\t\t\t\tstringified[index] = `[\"${key}\",${flatten(value)}]`;\n\t\t\t\treturn index;\n\t\t\t}\n\t\t}\n\n\t\tif (typeof thing === 'function') {\n\t\t\tthrow new DevalueError(`Cannot stringify a function`, keys, thing, value);\n\t\t}\n\n\t\tlet str = '';\n\n\t\tif (is_primitive(thing)) {\n\t\t\tstr = stringify_primitive(thing);\n\t\t} else {\n\t\t\tconst type = get_type(thing);\n\n\t\t\tswitch (type) {\n\t\t\t\tcase 'Number':\n\t\t\t\tcase 'String':\n\t\t\t\tcase 'Boolean':\n\t\t\t\t\tstr = `[\"Object\",${stringify_primitive(thing)}]`;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'BigInt':\n\t\t\t\t\tstr = `[\"BigInt\",${thing}]`;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'Date':\n\t\t\t\t\tconst valid = !isNaN(thing.getDate());\n\t\t\t\t\tstr = `[\"Date\",\"${valid ? thing.toISOString() : ''}\"]`;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'URL':\n\t\t\t\t\tstr = `[\"URL\",${stringify_string(thing.toString())}]`;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'URLSearchParams':\n\t\t\t\t\tstr = `[\"URLSearchParams\",${stringify_string(thing.toString())}]`;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'RegExp':\n\t\t\t\t\tconst { source, flags } = thing;\n\t\t\t\t\tstr = flags\n\t\t\t\t\t\t? `[\"RegExp\",${stringify_string(source)},\"${flags}\"]`\n\t\t\t\t\t\t: `[\"RegExp\",${stringify_string(source)}]`;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'Array': {\n\t\t\t\t\t// For dense arrays (no holes), we iterate normally.\n\t\t\t\t\t// When we encounter the first hole, we call Object.keys\n\t\t\t\t\t// to determine the sparseness, then decide between:\n\t\t\t\t\t// - HOLE encoding: [-2, val, -2, ...] (default)\n\t\t\t\t\t// - Sparse encoding: [-7, length, idx, val, ...] (for very sparse arrays)\n\t\t\t\t\t// Only the sparse path avoids iterating every slot, which\n\t\t\t\t\t// is what protects against the DoS of e.g. `arr[1000000] = 1`.\n\t\t\t\t\tlet mostly_dense = false;\n\n\t\t\t\t\tstr = '[';\n\n\t\t\t\t\tfor (let i = 0; i < thing.length; i += 1) {\n\t\t\t\t\t\tif (i > 0) str += ',';\n\n\t\t\t\t\t\tif (Object.hasOwn(thing, i)) {\n\t\t\t\t\t\t\tkeys.push(`[${i}]`);\n\t\t\t\t\t\t\tstr += flatten(thing[i]);\n\t\t\t\t\t\t\tkeys.pop();\n\t\t\t\t\t\t} else if (mostly_dense) {\n\t\t\t\t\t\t\t// Use dense encoding. The heuristic guarantees the\n\t\t\t\t\t\t\t// array is only mildly sparse, so iterating over every\n\t\t\t\t\t\t\t// slot is fine.\n\t\t\t\t\t\t\tstr += HOLE;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// Decide between HOLE encoding and sparse encoding.\n\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t// HOLE encoding: each hole is serialized as the HOLE\n\t\t\t\t\t\t\t// sentinel (-2). For example, [, \"a\", ,] becomes\n\t\t\t\t\t\t\t// [-2, 0, -2]. Each hole costs 3 chars (\"-2\" + comma).\n\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t// Sparse encoding: lists only populated indices.\n\t\t\t\t\t\t\t// For example, [, \"a\", ,] becomes [-7, 3, 1, 0] — the\n\t\t\t\t\t\t\t// -7 sentinel, the array length (3), then index-value\n\t\t\t\t\t\t\t// pairs. This avoids paying per-hole, but each element\n\t\t\t\t\t\t\t// costs extra chars to write its index.\n\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t// The values are the same size either way, so the\n\t\t\t\t\t\t\t// choice comes down to structural overhead:\n\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t// HOLE overhead:\n\t\t\t\t\t\t\t// 3 chars per hole (\"-2\" + comma)\n\t\t\t\t\t\t\t// = (L - P) * 3\n\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t// Sparse overhead:\n\t\t\t\t\t\t\t// \"-7,\" — 3 chars (sparse sentinel + comma)\n\t\t\t\t\t\t\t// + length + \",\" — (d + 1) chars (array length + comma)\n\t\t\t\t\t\t\t// + per element: index + \",\" — (d + 1) chars\n\t\t\t\t\t\t\t// = (4 + d) + P * (d + 1)\n\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t// where L is the array length, P is the number of\n\t\t\t\t\t\t\t// populated elements, and d is the number of digits\n\t\t\t\t\t\t\t// in L (an upper bound on the digits in any index).\n\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t// Sparse encoding is cheaper when:\n\t\t\t\t\t\t\t// (4 + d) + P * (d + 1) < (L - P) * 3\n\t\t\t\t\t\t\tconst populated_keys = valid_array_indices(/** @type {any[]} */ (thing));\n\t\t\t\t\t\t\tconst population = populated_keys.length;\n\t\t\t\t\t\t\tconst d = String(thing.length).length;\n\n\t\t\t\t\t\t\tconst hole_cost = (thing.length - population) * 3;\n\t\t\t\t\t\t\tconst sparse_cost = 4 + d + population * (d + 1);\n\n\t\t\t\t\t\t\tif (hole_cost > sparse_cost) {\n\t\t\t\t\t\t\t\tstr = '[' + SPARSE + ',' + thing.length;\n\t\t\t\t\t\t\t\tfor (let j = 0; j < populated_keys.length; j++) {\n\t\t\t\t\t\t\t\t\tconst key = populated_keys[j];\n\t\t\t\t\t\t\t\t\tkeys.push(`[${key}]`);\n\t\t\t\t\t\t\t\t\tstr += ',' + key + ',' + flatten(thing[key]);\n\t\t\t\t\t\t\t\t\tkeys.pop();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tmostly_dense = true;\n\t\t\t\t\t\t\t\tstr += HOLE;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tstr += ']';\n\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tcase 'Set':\n\t\t\t\t\tstr = '[\"Set\"';\n\n\t\t\t\t\tfor (const value of thing) {\n\t\t\t\t\t\tstr += `,${flatten(value)}`;\n\t\t\t\t\t}\n\n\t\t\t\t\tstr += ']';\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'Map':\n\t\t\t\t\tstr = '[\"Map\"';\n\n\t\t\t\t\tfor (const [key, value] of thing) {\n\t\t\t\t\t\tkeys.push(\n\t\t\t\t\t\t\t`.get(${is_primitive(key) ? stringify_primitive(key) : '...'})`\n\t\t\t\t\t\t);\n\t\t\t\t\t\tstr += `,${flatten(key)},${flatten(value)}`;\n\t\t\t\t\t\tkeys.pop();\n\t\t\t\t\t}\n\n\t\t\t\t\tstr += ']';\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'Int8Array':\n\t\t\t\tcase 'Uint8Array':\n\t\t\t\tcase 'Uint8ClampedArray':\n\t\t\t\tcase 'Int16Array':\n\t\t\t\tcase 'Uint16Array':\n\t\t\t\tcase 'Int32Array':\n\t\t\t\tcase 'Uint32Array':\n\t\t\t\tcase 'Float32Array':\n\t\t\t\tcase 'Float64Array':\n\t\t\t\tcase 'BigInt64Array':\n\t\t\t\tcase 'BigUint64Array': {\n\t\t\t\t\t/** @type {import(\"./types.js\").TypedArray} */\n\t\t\t\t\tconst typedArray = thing;\n\t\t\t\t\tstr = '[\"' + type + '\",' + flatten(typedArray.buffer);\n\n\t\t\t\t\tconst a = thing.byteOffset;\n\t\t\t\t\tconst b = a + thing.byteLength;\n\n\t\t\t\t\t// handle subarrays\n\t\t\t\t\tif (a > 0 || b !== typedArray.buffer.byteLength) {\n\t\t\t\t\t\tconst m = +/(\\d+)/.exec(type)[1] / 8;\n\t\t\t\t\t\tstr += `,${a / m},${b / m}`;\n\t\t\t\t\t}\n\n\t\t\t\t\tstr += ']';\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tcase 'ArrayBuffer': {\n\t\t\t\t\t/** @type {ArrayBuffer} */\n\t\t\t\t\tconst arraybuffer = thing;\n\t\t\t\t\tconst base64 = encode64(arraybuffer);\n\n\t\t\t\t\tstr = `[\"ArrayBuffer\",\"${base64}\"]`;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tcase 'Temporal.Duration':\n\t\t\t\tcase 'Temporal.Instant':\n\t\t\t\tcase 'Temporal.PlainDate':\n\t\t\t\tcase 'Temporal.PlainTime':\n\t\t\t\tcase 'Temporal.PlainDateTime':\n\t\t\t\tcase 'Temporal.PlainMonthDay':\n\t\t\t\tcase 'Temporal.PlainYearMonth':\n\t\t\t\tcase 'Temporal.ZonedDateTime':\n\t\t\t\t\tstr = `[\"${type}\",${stringify_string(thing.toString())}]`;\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\t\t\t\t\tif (!is_plain_object(thing)) {\n\t\t\t\t\t\tthrow new DevalueError(\n\t\t\t\t\t\t\t`Cannot stringify arbitrary non-POJOs`,\n\t\t\t\t\t\t\tkeys,\n\t\t\t\t\t\t\tthing,\n\t\t\t\t\t\t\tvalue\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (enumerable_symbols(thing).length > 0) {\n\t\t\t\t\t\tthrow new DevalueError(\n\t\t\t\t\t\t\t`Cannot stringify POJOs with symbolic keys`,\n\t\t\t\t\t\t\tkeys,\n\t\t\t\t\t\t\tthing,\n\t\t\t\t\t\t\tvalue\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (Object.getPrototypeOf(thing) === null) {\n\t\t\t\t\t\tstr = '[\"null\"';\n\t\t\t\t\t\tfor (const key of Object.keys(thing)) {\n\t\t\t\t\t\t\tif (key === '__proto__') {\n\t\t\t\t\t\t\t\tthrow new DevalueError(\n\t\t\t\t\t\t\t\t\t`Cannot stringify objects with __proto__ keys`,\n\t\t\t\t\t\t\t\t\tkeys,\n\t\t\t\t\t\t\t\t\tthing,\n\t\t\t\t\t\t\t\t\tvalue\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tkeys.push(stringify_key(key));\n\t\t\t\t\t\t\tstr += `,${stringify_string(key)},${flatten(thing[key])}`;\n\t\t\t\t\t\t\tkeys.pop();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tstr += ']';\n\t\t\t\t\t} else {\n\t\t\t\t\t\tstr = '{';\n\t\t\t\t\t\tlet started = false;\n\t\t\t\t\t\tfor (const key of Object.keys(thing)) {\n\t\t\t\t\t\t\tif (key === '__proto__') {\n\t\t\t\t\t\t\t\tthrow new DevalueError(\n\t\t\t\t\t\t\t\t\t`Cannot stringify objects with __proto__ keys`,\n\t\t\t\t\t\t\t\t\tkeys,\n\t\t\t\t\t\t\t\t\tthing,\n\t\t\t\t\t\t\t\t\tvalue\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (started) str += ',';\n\t\t\t\t\t\t\tstarted = true;\n\t\t\t\t\t\t\tkeys.push(stringify_key(key));\n\t\t\t\t\t\t\tstr += `${stringify_string(key)}:${flatten(thing[key])}`;\n\t\t\t\t\t\t\tkeys.pop();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tstr += '}';\n\t\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tstringified[index] = str;\n\t\treturn index;\n\t}\n\n\tconst index = flatten(value);\n\n\t// special case — value is represented as a negative index\n\tif (index < 0) return `${index}`;\n\n\treturn `[${stringified.join(',')}]`;\n}\n\n/**\n * @param {any} thing\n * @returns {string}\n */\nfunction stringify_primitive(thing) {\n\tconst type = typeof thing;\n\tif (type === 'string') return stringify_string(thing);\n\tif (thing instanceof String) return stringify_string(thing.toString());\n\tif (thing === void 0) return UNDEFINED.toString();\n\tif (thing === 0 && 1 / thing < 0) return NEGATIVE_ZERO.toString();\n\tif (type === 'bigint') return `[\"BigInt\",\"${thing}\"]`;\n\treturn String(thing);\n}\n","import { error as svelte_error, invalid as svelte_invalid } from \"@sveltejs/kit\";\nimport {\n command as native_command,\n form as native_form,\n getRequestEvent as get_native_request_event,\n prerender as native_prerender,\n query as native_query,\n} from \"$app/server\";\nimport { get_request_store } from \"@sveltejs/kit/internal/server\";\nimport * as devalue from \"devalue\";\nimport * as Cause from \"effect/Cause\";\nimport * as Context from \"effect/Context\";\nimport * as Effect from \"effect/Effect\";\nimport * as Exit from \"effect/Exit\";\nimport * as Layer from \"effect/Layer\";\nimport * as ManagedRuntime from \"effect/ManagedRuntime\";\nimport * as Option from \"effect/Option\";\nimport * as Schema from \"effect/Schema\";\nimport * as Schema_ast from \"effect/SchemaAST\";\nimport {\n create_form_error,\n create_serialized_remote_failure_envelope,\n type FormError,\n is_form_error,\n} from \"./internal/remote-shared.ts\";\n\ntype EffectSchema = Schema.Schema.Any;\n\nexport interface Transporter<T = unknown, U = { value: unknown }> {\n decode: (data: U) => T;\n encode: (value: T) => false | U;\n}\n\nexport type Transport = Record<string, Transporter>;\n\nexport interface RemoteFormInput {\n [key: string]: string | number | boolean | File | RemoteFormInput | Array<\n string | number | boolean | File | RemoteFormInput\n >;\n}\n\nexport type RemoteQueryFunction<Input, Output> = (\n arg: OptionalArgument<Input>,\n) => Promise<Output>;\n\nexport type RemoteCommand<Input, Output> = ((\n arg: OptionalArgument<Input>,\n) => Promise<Output> & {\n updates(...updates: Array<unknown>): Promise<Output>;\n}) & {\n readonly pending: number;\n};\n\nexport type RemotePrerenderFunction<Input, Output> = (\n arg: OptionalArgument<Input>,\n) => Promise<Output>;\n\nexport type RemoteForm<Input extends RemoteFormInput | void, Output> = {\n readonly action: string;\n enhance: (...args: Array<unknown>) => {\n readonly action: string;\n readonly method: \"POST\";\n };\n fields: Record<string, unknown>;\n for: (id: string | number) => RemoteForm<Input, Output>;\n readonly method: \"POST\";\n readonly pending: number;\n preflight: (schema: unknown) => RemoteForm<Input, Output>;\n readonly result: Output | undefined;\n validate: (options?: {\n includeUntouched?: boolean;\n preflightOnly?: boolean;\n }) => Promise<void>;\n [attachment: symbol]: (node: HTMLFormElement) => void;\n};\n\ntype RuntimeOperator = (\n self: Layer.Layer<unknown, unknown, unknown>,\n) => Layer.Layer<unknown, unknown, unknown>;\n\ntype RuntimeSeedLayer<Requirements> = Layer.Layer<Requirements, never, Requirements>;\n\ntype ProvidedBy<Op> = Op extends\n (self: RuntimeSeedLayer<infer Requirements>) => Layer.Layer<unknown, unknown, infer Incoming>\n ? Exclude<Requirements, Incoming>\n : never;\n\ntype ProvidedByAll<Ops extends ReadonlyArray<RuntimeOperator>> = Ops extends\n readonly [infer Head, ...infer Tail] ?\n | ProvidedBy<Head>\n | ProvidedByAll<Extract<Tail, ReadonlyArray<RuntimeOperator>>>\n : never;\n\ntype ApplyOperator<Seed, Op> = Op extends (self: Seed) => infer Out ? Out\n : never;\n\ntype ApplyOperators<\n Seed,\n Ops extends ReadonlyArray<RuntimeOperator>,\n> = Ops extends readonly [infer Head, ...infer Tail] ? ApplyOperators<\n ApplyOperator<Seed, Head>,\n Extract<Tail, ReadonlyArray<RuntimeOperator>>\n >\n : Seed;\n\ntype FinalRuntimeLayer<Ops extends ReadonlyArray<RuntimeOperator>> =\n ApplyOperators<RuntimeSeedLayer<ProvidedByAll<Ops>>, Ops> extends infer Out\n ? Out extends Layer.Layer<unknown, unknown, infer Incoming> ? [Incoming] extends [never] ? Out\n : never\n : never\n : never;\n\ntype OptionalArgument<Input> = undefined extends Input ? Input | void : Input;\n\ntype SchemaInput<SchemaType extends EffectSchema> = Schema.Schema.Encoded<SchemaType>;\ntype SchemaOutput<SchemaType extends EffectSchema> = Schema.Schema.Type<SchemaType>;\n\ntype FieldHelpers<FormShape, SchemaType> = FormShape extends Record<string, unknown>\n ? {\n [Key in keyof FormShape as Key extends string ? Key : never]: (\n message: string,\n ) => Effect.Effect<never, FormError<SchemaType>, never>;\n }\n : Record<PropertyKey, never>;\n\nexport type Invalid<SchemaType = unknown> = {\n form: (message: string) => Effect.Effect<never, FormError<SchemaType>, never>;\n} & FieldHelpers<SchemaType extends EffectSchema ? SchemaOutput<SchemaType> : unknown, SchemaType>;\n\nexport type EffectQueryFunction<Input, Output, Error = never> =\n & ((\n arg: OptionalArgument<Input>,\n ) => Effect.Effect<Output, import(\"./internal/remote-shared.ts\").RemoteFailure<Error>, never>)\n & {\n native: RemoteQueryFunction<Input, Output>;\n };\n\nexport type EffectCommand<Input, Output, Error = never> =\n & ((\n arg: OptionalArgument<Input>,\n ) => Effect.Effect<Output, import(\"./internal/remote-shared.ts\").RemoteFailure<Error>, never>)\n & {\n native: RemoteCommand<Input, Output>;\n readonly pending: number;\n };\n\nexport type EffectPrerenderFunction<Input, Output, Error = never> =\n & ((\n arg: OptionalArgument<Input>,\n ) => Effect.Effect<Output, import(\"./internal/remote-shared.ts\").RemoteFailure<Error>, never>)\n & {\n native: RemotePrerenderFunction<Input, Output>;\n };\n\nexport type EffectForm<\n Input extends RemoteFormInput | void,\n Output,\n Error = never,\n> = RemoteForm<Input, Output> & {\n native: RemoteForm<Input, Output>;\n submit(\n data: OptionalArgument<Input>,\n ): Effect.Effect<Output, import(\"./internal/remote-shared.ts\").RemoteFailure<Error>, never>;\n for: RemoteForm<Input, Output>[\"for\"] extends (...args: infer Args) => infer Result\n ? (...args: Args) => EffectForm<Input, Output, Error>\n : never;\n};\n\nexport type RequestEventService = ReturnType<typeof get_native_request_event>;\n\nexport const RequestEvent = Context.GenericTag<RequestEventService>(\n \"svelte-effect-runtime/RequestEvent\",\n);\n\ninterface ServerRuntimeSeed {\n pipe(): Layer.Layer<never>;\n pipe<const Ops extends readonly [RuntimeOperator, ...Array<RuntimeOperator>]>(\n ...ops: Ops\n ): FinalRuntimeLayer<Ops>;\n make(): void;\n make<const Ops extends readonly [RuntimeOperator, ...Array<RuntimeOperator>]>(\n ...ops: Ops\n ): void;\n}\n\ntype ServerManagedRuntime = ManagedRuntime.ManagedRuntime<unknown, unknown>;\n\nlet current_server_runtime: ServerManagedRuntime | null = null;\n\nfunction runtime_seed<Requirements>(): RuntimeSeedLayer<Requirements> {\n return Layer.effectContext(Effect.context<Requirements>());\n}\n\nfunction pipe_server_runtime(): Layer.Layer<never>;\nfunction pipe_server_runtime<\n const Ops extends readonly [RuntimeOperator, ...Array<RuntimeOperator>],\n>(...ops: Ops): FinalRuntimeLayer<Ops>;\nfunction pipe_server_runtime(\n ...ops: Array<RuntimeOperator>\n): Layer.Layer<never, unknown, unknown> {\n if (ops.length === 0) {\n return Layer.empty;\n }\n\n return ops.reduce<Layer.Layer<unknown, unknown, unknown>>(\n (layer, op) => op(layer),\n runtime_seed<unknown>(),\n ) as Layer.Layer<never, unknown, unknown>;\n}\n\nfunction make_server_runtime(): void;\nfunction make_server_runtime<\n const Ops extends readonly [RuntimeOperator, ...Array<RuntimeOperator>],\n>(...ops: Ops): void;\nfunction make_server_runtime(\n ...ops: [] | [RuntimeOperator, ...Array<RuntimeOperator>]\n): void {\n const layer = ops.length === 0\n ? pipe_server_runtime()\n : pipe_server_runtime(...(ops as [RuntimeOperator, ...Array<RuntimeOperator>]));\n\n const previous_runtime = current_server_runtime;\n\n current_server_runtime = ManagedRuntime.make(\n layer as unknown as Layer.Layer<unknown, unknown, never>,\n );\n\n void previous_runtime?.dispose().catch(() => undefined);\n}\n\nexport const ServerRuntime: ServerRuntimeSeed = {\n pipe: pipe_server_runtime,\n make: make_server_runtime,\n};\n\nexport function get_server_runtime_or_throw(): ServerManagedRuntime {\n if (current_server_runtime !== null) {\n return current_server_runtime;\n }\n\n // No runtime registered — lazily create a default one with an empty layer.\n // This mirrors the client runtime behavior and makes `ServerRuntime.make()`\n // in `hooks.server.ts` optional for apps that don't need to provide custom\n // dependencies. A later explicit call to `ServerRuntime.make(...)` will\n // dispose this default and replace it.\n current_server_runtime = ManagedRuntime.make(\n pipe_server_runtime() as unknown as Layer.Layer<unknown, unknown, never>,\n );\n\n return current_server_runtime;\n}\n\nfunction is_effect_schema(value: unknown): value is EffectSchema {\n return Schema.isSchema(value);\n}\n\nfunction get_effect_schema_validator(schema: EffectSchema) {\n return Schema.standardSchemaV1(\n schema as Schema.Schema<unknown, unknown, never>,\n );\n}\n\nfunction get_effect_form_validator(schema: EffectSchema) {\n return Schema.standardSchemaV1(\n schema as Schema.Schema<Record<string, unknown>, RemoteFormInput, never>,\n );\n}\n\nfunction resolve_remote_args<Fn>(validate_or_fn: unknown, maybe_fn?: Fn): {\n readonly fn: Fn;\n readonly validate: EffectSchema | \"unchecked\" | undefined;\n} {\n if (maybe_fn === undefined) {\n return {\n fn: validate_or_fn as Fn,\n validate: undefined,\n };\n }\n\n if (validate_or_fn === \"unchecked\") {\n return {\n fn: maybe_fn,\n validate: \"unchecked\",\n };\n }\n\n if (!is_effect_schema(validate_or_fn)) {\n throw new Error(\n \"Invalid schema passed to a remote function. Use Effect.Schema, 'unchecked', or omit the validator entirely.\",\n );\n }\n\n return {\n fn: maybe_fn,\n validate: validate_or_fn,\n };\n}\n\nfunction get_remote_failure_status(failure: unknown): number {\n if (\n failure &&\n typeof failure === \"object\" &&\n typeof (failure as { status?: unknown }).status === \"number\"\n ) {\n return (failure as { status: number }).status;\n }\n\n return 500;\n}\n\nfunction log_remote_server_step(\n step: string,\n details?: Record<string, unknown>,\n): void {\n console.log(\"[svelte-effect-runtime][server]\", step, details ?? {});\n}\n\nfunction encode_remote_failure(failure: unknown): never {\n log_remote_server_step(\"encode_remote_failure:start\", {\n failure,\n });\n const { state } = get_request_store();\n const encoders = Object.fromEntries(\n Object.entries(state.transport as Transport).map(([name, transporter]) => [\n name,\n transporter.encode,\n ]),\n );\n const encoded = devalue.stringify(failure, encoders);\n const status = get_remote_failure_status(failure);\n\n throw svelte_error(\n status,\n {\n message: \"Effect remote failure\",\n ...create_serialized_remote_failure_envelope(encoded),\n } as never,\n );\n}\n\nfunction throw_form_error(form_error: FormError): never {\n log_remote_server_step(\"throw_form_error\", {\n issues: form_error.issues,\n });\n svelte_invalid(\n ...form_error.issues.map((issue) => ({\n message: issue.message,\n path: [...issue.path],\n })),\n );\n}\n\nasync function run_remote_effect<Success, ErrorType, Requirements>(\n program: Effect.Effect<Success, ErrorType, Requirements>,\n): Promise<Success> {\n const request_event = get_native_request_event();\n const runtime = get_server_runtime_or_throw();\n log_remote_server_step(\"run_remote_effect:start\", {\n method: request_event.request.method,\n url: request_event.url.toString(),\n });\n const provided_program = Effect.provideService(program, RequestEvent, request_event);\n const exit = await runtime.runPromiseExit(provided_program);\n\n if (Exit.isSuccess(exit)) {\n log_remote_server_step(\"run_remote_effect:success\", {\n value: exit.value,\n });\n return exit.value;\n }\n\n const failure = Cause.failureOption(exit.cause);\n\n if (Option.isSome(failure)) {\n log_remote_server_step(\"run_remote_effect:failure\", {\n failure: failure.value,\n });\n if (is_form_error(failure.value)) {\n throw_form_error(failure.value);\n }\n\n encode_remote_failure(failure.value);\n }\n\n log_remote_server_step(\"run_remote_effect:defect\", {\n cause: exit.cause,\n });\n throw Cause.squash(exit.cause);\n}\n\nfunction get_schema_field_names(schema: EffectSchema): ReadonlyArray<string> {\n const property_signatures = Schema_ast.getPropertySignatures(schema.ast);\n\n return property_signatures\n .map((property_signature) => property_signature.name)\n .filter((name): name is string => typeof name === \"string\");\n}\n\nfunction create_invalid_helper<SchemaType = unknown>(\n options: {\n readonly schema?: EffectSchema;\n } = {},\n): Invalid<SchemaType> {\n const field_names = options.schema ? new Set(get_schema_field_names(options.schema)) : null;\n\n const create_issue_effect = (\n message: string,\n path: ReadonlyArray<string | number>,\n ): Effect.Effect<never, FormError<SchemaType>, never> =>\n Effect.fail(create_form_error<SchemaType>({\n message,\n path,\n }));\n\n const invalid = new Proxy(\n {\n form(message: string) {\n return create_issue_effect(message, []);\n },\n } as Record<string, (message: string) => Effect.Effect<never, FormError<SchemaType>, never>>,\n {\n get(target, property) {\n if (typeof property !== \"string\") {\n return Reflect.get(target, property);\n }\n\n if (property in target) {\n return target[property];\n }\n\n if (field_names !== null && !field_names.has(property)) {\n throw new Error(\n `Unknown form field '${property}' in invalid helper. v1 only supports top-level fields declared in the Effect.Schema.`,\n );\n }\n\n return (message: string) => create_issue_effect(message, [property]);\n },\n },\n );\n\n return invalid as Invalid<SchemaType>;\n}\n\nfunction define_native_property<T extends object, Native>(value: T, native: Native): T {\n Object.defineProperty(value, \"native\", {\n value: native,\n enumerable: false,\n });\n\n return value;\n}\n\nexport function create_effect_transport<\n const Schemas extends Record<string, EffectSchema>,\n>(schemas: Schemas): Transport {\n return Object.fromEntries(\n Object.entries(schemas).map(([name, schema]) => {\n return [name, {\n encode(value: unknown) {\n try {\n return Schema.is(schema)(value)\n ? {\n value: Schema.encodeSync(\n schema as Schema.Schema<unknown, unknown, never>,\n )(value),\n }\n : false;\n } catch {\n return false;\n }\n },\n decode(data: { value: unknown }) {\n return Schema.decodeSync(\n schema as Schema.Schema<unknown, unknown, never>,\n )(data.value);\n },\n }];\n }),\n );\n}\n\nexport interface EffectQueryFactory {\n <Output, ErrorType, Requirements>(\n fn: () => Effect.Effect<Output, ErrorType, Requirements>,\n ): EffectQueryFunction<void, Output, ErrorType>;\n <Input, Output, ErrorType, Requirements>(\n validate: \"unchecked\",\n fn: (arg: Input) => Effect.Effect<Output, ErrorType, Requirements>,\n ): EffectQueryFunction<Input, Output, ErrorType>;\n <SchemaType extends EffectSchema, Output, ErrorType, Requirements>(\n validate: SchemaType,\n fn: (\n arg: SchemaOutput<SchemaType>,\n ) => Effect.Effect<Output, ErrorType, Requirements>,\n ): EffectQueryFunction<SchemaInput<SchemaType>, Output, ErrorType>;\n batch: typeof query_batch_factory;\n}\n\ntype RemotePrerenderInputsGenerator<Input> = (\n event: RequestEventService,\n) => AsyncIterable<Input> | Iterable<Input>;\n\ntype RemotePrerenderOptions<Input> = {\n inputs?: RemotePrerenderInputsGenerator<Input>;\n dynamic?: boolean;\n};\n\nfunction create_native_wrapper(value: object) {\n return define_native_property(value, value);\n}\n\nfunction query_batch_factory(validate_or_fn: unknown, maybe_fn?: unknown): unknown {\n const resolved = resolve_remote_args(\n validate_or_fn,\n maybe_fn as ((args: Array<unknown>) => Effect.Effect<unknown, unknown, unknown>) | undefined,\n );\n\n if (resolved.validate === undefined) {\n throw new Error(\n \"Query.batch requires either 'unchecked' or an Effect.Schema validator to match SvelteKit's native API.\",\n );\n }\n\n const native = resolved.validate === \"unchecked\"\n ? native_query.batch(\n \"unchecked\",\n (args: Array<unknown>) =>\n run_remote_effect(resolved.fn(args)) as Promise<\n (arg: unknown, idx: number) => unknown\n >,\n )\n : native_query.batch(\n get_effect_schema_validator(resolved.validate),\n (args: Array<unknown>) =>\n run_remote_effect(resolved.fn(args)) as Promise<\n (arg: unknown, idx: number) => unknown\n >,\n );\n\n return create_native_wrapper(native);\n}\n\nconst query_impl = (validate_or_fn: unknown, maybe_fn?: unknown): unknown => {\n const resolved = resolve_remote_args(\n validate_or_fn,\n maybe_fn as ((arg: unknown) => Effect.Effect<unknown, unknown, unknown>) | undefined,\n );\n const native = resolved.validate === undefined\n ? native_query(() =>\n run_remote_effect(\n (resolved.fn as () => Effect.Effect<unknown, unknown, unknown>)(),\n ))\n : resolved.validate === \"unchecked\"\n ? native_query(\n \"unchecked\",\n (arg: unknown) =>\n run_remote_effect(\n (resolved.fn as (arg: unknown) => Effect.Effect<unknown, unknown, unknown>)(arg),\n ),\n )\n : native_query(\n get_effect_schema_validator(resolved.validate),\n (arg: unknown) =>\n run_remote_effect(\n (resolved.fn as (arg: unknown) => Effect.Effect<unknown, unknown, unknown>)(arg),\n ),\n );\n\n return create_native_wrapper(native);\n};\n\nexport const Query = Object.assign(query_impl, {\n batch: query_batch_factory,\n}) as unknown as EffectQueryFactory;\n\nconst command_impl = (validate_or_fn: unknown, maybe_fn?: unknown): unknown => {\n const resolved = resolve_remote_args(\n validate_or_fn,\n maybe_fn as ((arg: unknown) => Effect.Effect<unknown, unknown, unknown>) | undefined,\n );\n const native = resolved.validate === undefined\n ? native_command(() =>\n run_remote_effect(\n (resolved.fn as () => Effect.Effect<unknown, unknown, unknown>)(),\n ))\n : resolved.validate === \"unchecked\"\n ? native_command(\n \"unchecked\",\n (arg: unknown) =>\n run_remote_effect(\n (resolved.fn as (arg: unknown) => Effect.Effect<unknown, unknown, unknown>)(arg),\n ),\n )\n : native_command(\n get_effect_schema_validator(resolved.validate),\n (arg: unknown) =>\n run_remote_effect(\n (resolved.fn as (arg: unknown) => Effect.Effect<unknown, unknown, unknown>)(arg),\n ),\n );\n\n return create_native_wrapper(native);\n};\n\nexport interface EffectCommandFactory {\n <Output, ErrorType, Requirements>(\n fn: () => Effect.Effect<Output, ErrorType, Requirements>,\n ): EffectCommand<void, Output, ErrorType>;\n <Input, Output, ErrorType, Requirements>(\n validate: \"unchecked\",\n fn: (arg: Input) => Effect.Effect<Output, ErrorType, Requirements>,\n ): EffectCommand<Input, Output, ErrorType>;\n <SchemaType extends EffectSchema, Output, ErrorType, Requirements>(\n validate: SchemaType,\n fn: (\n arg: SchemaOutput<SchemaType>,\n ) => Effect.Effect<Output, ErrorType, Requirements>,\n ): EffectCommand<SchemaInput<SchemaType>, Output, ErrorType>;\n}\n\nexport const Command = command_impl as unknown as EffectCommandFactory;\n\nconst form_impl = (validate_or_fn: unknown, maybe_fn?: unknown): unknown => {\n const resolved = resolve_remote_args(\n validate_or_fn,\n maybe_fn as ((args: unknown) => Effect.Effect<unknown, unknown, unknown>) | undefined,\n );\n const native = resolved.validate === undefined\n ? native_form(() =>\n run_remote_effect(\n (resolved.fn as () => Effect.Effect<unknown, unknown, unknown>)(),\n ))\n : resolved.validate === \"unchecked\"\n ? native_form(\n \"unchecked\",\n (data: RemoteFormInput) =>\n run_remote_effect(\n (resolved.fn as (args: unknown) => Effect.Effect<unknown, unknown, unknown>)({\n data,\n invalid: create_invalid_helper(),\n }),\n ),\n )\n : native_form(\n get_effect_form_validator(resolved.validate as EffectSchema),\n (data: Record<string, unknown>) =>\n run_remote_effect(\n (resolved.fn as (args: unknown) => Effect.Effect<unknown, unknown, unknown>)({\n data,\n invalid: create_invalid_helper({\n schema: resolved.validate as EffectSchema,\n }),\n }),\n ),\n );\n\n return create_native_wrapper(native);\n};\n\nexport interface EffectFormFactory {\n <Output, ErrorType, Requirements>(\n fn: () => Effect.Effect<Output, ErrorType, Requirements>,\n ): EffectForm<void, Output, ErrorType>;\n <Input extends RemoteFormInput, Output, ErrorType, Requirements>(\n validate: \"unchecked\",\n fn: (\n args: {\n data: Input;\n invalid: Invalid;\n },\n ) => Effect.Effect<Output, ErrorType | FormError, Requirements>,\n ): EffectForm<Input, Output, ErrorType>;\n <SchemaType extends EffectSchema, Output, ErrorType, Requirements>(\n validate: SchemaType,\n fn: (\n args: {\n data: SchemaOutput<SchemaType>;\n invalid: Invalid<SchemaType>;\n },\n ) => Effect.Effect<Output, ErrorType | FormError<SchemaType>, Requirements>,\n ): EffectForm<SchemaInput<SchemaType> & RemoteFormInput, Output, ErrorType>;\n}\n\nexport const Form = form_impl as unknown as EffectFormFactory;\n\nexport interface EffectPrerenderFactory {\n <Output, ErrorType, Requirements>(\n fn: () => Effect.Effect<Output, ErrorType, Requirements>,\n options?: {\n inputs?: RemotePrerenderInputsGenerator<void>;\n dynamic?: boolean;\n },\n ): EffectPrerenderFunction<void, Output, ErrorType>;\n <Input, Output, ErrorType, Requirements>(\n validate: \"unchecked\",\n fn: (arg: Input) => Effect.Effect<Output, ErrorType, Requirements>,\n options?: {\n inputs?: RemotePrerenderInputsGenerator<Input>;\n dynamic?: boolean;\n },\n ): EffectPrerenderFunction<Input, Output, ErrorType>;\n <SchemaType extends EffectSchema, Output, ErrorType, Requirements>(\n validate: SchemaType,\n fn: (\n arg: SchemaOutput<SchemaType>,\n ) => Effect.Effect<Output, ErrorType, Requirements>,\n options?: {\n inputs?: RemotePrerenderInputsGenerator<SchemaInput<SchemaType>>;\n dynamic?: boolean;\n },\n ): EffectPrerenderFunction<SchemaInput<SchemaType>, Output, ErrorType>;\n}\n\ntype NativePrerender = {\n (\n fn: () => Promise<unknown>,\n options?: RemotePrerenderOptions<void>,\n ): object;\n (\n validate: \"unchecked\",\n fn: (arg: unknown) => Promise<unknown>,\n options?: RemotePrerenderOptions<unknown>,\n ): object;\n (\n validate: EffectSchema,\n fn: (arg: unknown) => Promise<unknown>,\n options?: RemotePrerenderOptions<unknown>,\n ): object;\n};\n\nconst native_prerender_fn = native_prerender as unknown as NativePrerender;\n\nconst prerender_impl = (\n validate_or_fn: unknown,\n fn_or_options?: unknown,\n maybe_options?: unknown,\n): unknown => {\n if (\n typeof validate_or_fn === \"function\" &&\n typeof fn_or_options !== \"function\"\n ) {\n const native = native_prerender_fn(\n () =>\n run_remote_effect(\n (validate_or_fn as () => Effect.Effect<unknown, unknown, unknown>)(),\n ),\n fn_or_options as RemotePrerenderOptions<void> | undefined,\n );\n\n return create_native_wrapper(native);\n }\n\n const resolved = resolve_remote_args(\n validate_or_fn,\n fn_or_options as ((arg: unknown) => Effect.Effect<unknown, unknown, unknown>) | undefined,\n );\n const native = resolved.validate === \"unchecked\"\n ? native_prerender_fn(\n \"unchecked\",\n (arg: unknown) =>\n run_remote_effect(\n (resolved.fn as (arg: unknown) => Effect.Effect<unknown, unknown, unknown>)(arg),\n ),\n maybe_options as RemotePrerenderOptions<unknown> | undefined,\n )\n : native_prerender_fn(\n get_effect_schema_validator(resolved.validate as EffectSchema),\n (arg: unknown) =>\n run_remote_effect(\n (resolved.fn as (arg: unknown) => Effect.Effect<unknown, unknown, unknown>)(arg),\n ),\n maybe_options as RemotePrerenderOptions<unknown> | undefined,\n );\n\n return create_native_wrapper(native);\n};\n\nexport const Prerender = prerender_impl as unknown as EffectPrerenderFactory;\n"],"x_google_ignoreList":[0,1,2],"mappings":";;;;;;;;;;;;;;AAaA,IAAa,eAAb,cAAkC,MAAM;;;;;;;CAOvC,YAAY,SAAS,MAAM,OAAO,MAAM;AACvC,QAAM,QAAQ;AACd,OAAK,OAAO;AACZ,OAAK,OAAO,KAAK,KAAK,GAAG;AACzB,OAAK,QAAQ;AACb,OAAK,OAAO;;;;AAKd,SAAgB,aAAa,OAAO;AACnC,QAAO,OAAO,MAAM,KAAK;;AAG1B,MAAM,qBAAqC,uBAAO,oBACjD,OAAO,UACP,CACC,MAAM,CACN,KAAK,KAAK;;AAGZ,SAAgB,gBAAgB,OAAO;CACtC,MAAM,QAAQ,OAAO,eAAe,MAAM;AAE1C,QACC,UAAU,OAAO,aACjB,UAAU,QACV,OAAO,eAAe,MAAM,KAAK,QACjC,OAAO,oBAAoB,MAAM,CAAC,MAAM,CAAC,KAAK,KAAK,KAAK;;;AAK1D,SAAgB,SAAS,OAAO;AAC/B,QAAO,OAAO,UAAU,SAAS,KAAK,MAAM,CAAC,MAAM,GAAG,GAAG;;;AAI1D,SAAS,iBAAiB,MAAM;AAC/B,SAAQ,MAAR;EACC,KAAK,KACJ,QAAO;EACR,KAAK,IACJ,QAAO;EACR,KAAK,KACJ,QAAO;EACR,KAAK,KACJ,QAAO;EACR,KAAK,KACJ,QAAO;EACR,KAAK,IACJ,QAAO;EACR,KAAK,KACJ,QAAO;EACR,KAAK,KACJ,QAAO;EACR,KAAK,SACJ,QAAO;EACR,KAAK,SACJ,QAAO;EACR,QACC,QAAO,OAAO,MACX,MAAM,KAAK,WAAW,EAAE,CAAC,SAAS,GAAG,CAAC,SAAS,GAAG,IAAI,KACtD;;;;AAKN,SAAgB,iBAAiB,KAAK;CACrC,IAAI,SAAS;CACb,IAAI,WAAW;CACf,MAAM,MAAM,IAAI;AAEhB,MAAK,IAAI,IA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S,GAAkE,IAAI,CACjF,CACJ,GACCA,QACA,4BAA4B,SAAS,SAAS,GAC7C,QACC,kBACG,SAAS,GAAkE,IAAI,CACjF,CACJ,CAEiC;;AAmBtC,MAAa,UAAU;AAEvB,MAAM,aAAa,gBAAyB,aAAgC;CAC1E,MAAM,WAAW,oBACf,gBACA,SACD;AA8BD,QAAO,sBA7BQ,SAAS,aAAa,KAAA,IACjCC,WACA,kBACG,SAAS,IAAuD,CAClE,CAAC,GACF,SAAS,aAAa,cACtBA,KACA,cACC,SACC,kBACG,SAAS,GAAmE;EAC3E;EACA,SAAS,uBAAuB;EACjC,CAAC,CACH,CACJ,GACCA,KACA,0BAA0B,SAAS,SAAyB,GAC3D,SACC,kBACG,SAAS,GAAmE;EAC3E;EACA,SAAS,sBAAsB,EAC7B,QAAQ,SAAS,UAClB,CAAC;EACH,CAAC,CACH,CACJ,CAEiC;;AA2BtC,MAAa,OAAO;AA+CpB,MAAM,sBAAsBC;AAE5B,MAAM,kBACJ,gBACA,eACA,kBACY;AACZ,KACE,OAAO,mBAAmB,cAC1B,OAAO,kBAAkB,WAUzB,QAAO,sBARQ,0BAEX,kBACG,gBAAmE,CACrE,EACH,cACD,CAEmC;CAGtC,MAAM,WAAW,oBACf,gBACA,cACD;AAmBD,QAAO,sBAlBQ,SAAS,aAAa,cACjC,oBACA,cACC,QACC,kBACG,SAAS,GAAkE,IAAI,CACjF,EACH,cACD,GACC,oBACA,4BAA4B,SAAS,SAAyB,GAC7D,QACC,kBACG,SAAS,GAAkE,IAAI,CACjF,EACH,cACD,CAEiC;;AAGtC,MAAa,YAAY"}
|
|
1
|
+
{"version":3,"file":"server.js","names":["Server_module.Query","Server_module.Command","Server_module.Form","Server_module.Prerender","Server_module.RequestEvent","Server_module.ServerRuntime","Server_module.create_effect_transport","Server_module\n .get_server_runtime_or_throw"],"sources":["../../modules/svelte-effect-runtime/server.ts"],"sourcesContent":["import * as Server_module from \"$/v3/server.ts\";\n\nexport type * from \"$/v3/server.ts\";\n\n/**\n * Define a read-only remote function that returns an `Effect` on the client.\n *\n * @see https://ser.barekey.dev/content/remote-functions/query\n */\nexport const Query: typeof Server_module.Query = Server_module.Query;\n/**\n * Define a write-oriented remote function that returns an `Effect` on the\n * client.\n *\n * @see https://ser.barekey.dev/content/remote-functions/command\n */\nexport const Command: typeof Server_module.Command = Server_module.Command;\n/**\n * Define a remote form handler that maps submitted data into an Effect\n * program.\n *\n * @see https://ser.barekey.dev/content/remote-functions/form\n */\nexport const Form: typeof Server_module.Form = Server_module.Form;\n/**\n * Define a prerenderable remote function backed by an Effect program.\n *\n * @see https://ser.barekey.dev/content/remote-functions/prerender\n */\nexport const Prerender: typeof Server_module.Prerender =\n Server_module.Prerender;\n/**\n * Effect `Context.Tag` for the current SvelteKit `RequestEvent`.\n *\n * @see https://ser.barekey.dev/content/runtimes/server\n */\nexport const RequestEvent: typeof Server_module.RequestEvent =\n Server_module.RequestEvent;\n/**\n * Server-side runtime builder used to provide long-lived Effect services to\n * remote functions.\n *\n * @see https://ser.barekey.dev/content/reference/server-runtime\n */\nexport const ServerRuntime: typeof Server_module.ServerRuntime =\n Server_module.ServerRuntime;\n/**\n * Build a devalue transport table from Effect schemas so remote payloads can\n * round-trip custom data across the client/server boundary.\n *\n * @see https://ser.barekey.dev/content/reference/transport\n */\nexport const create_effect_transport:\n typeof Server_module.create_effect_transport =\n Server_module.create_effect_transport;\n/**\n * Resolve the active server runtime, lazily creating a default empty runtime\n * when no explicit one has been registered.\n *\n * @internal Internal - do not use.\n * @see https://ser.barekey.dev/content/reference/server-runtime\n */\nexport const get_server_runtime_or_throw = Server_module\n .get_server_runtime_or_throw as typeof Server_module.get_server_runtime_or_throw;\n"],"mappings":";;;;;;;AASA,MAAa,QAAoCA;;;;;;;AAOjD,MAAa,UAAwCC;;;;;;;AAOrD,MAAa,OAAkCC;;;;;;AAM/C,MAAa,YACXC;;;;;;AAMF,MAAa,eACXC;;;;;;;AAOF,MAAa,gBACXC;;;;;;;AAOF,MAAa,0BAETC;;;;;;;;AAQJ,MAAa,8BAA8BC"}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { Effect, Exit, Layer, ManagedRuntime } from "effect";
|
|
2
|
+
import { type RemoteFailure } from "../internal/remote-shared.js";
|
|
3
|
+
export interface EffectRuntime<R = unknown> {
|
|
4
|
+
runCallback<A, E, R2>(effect: Effect.Effect<A, E, R2>, options?: {
|
|
5
|
+
onExit?: (exit: Exit.Exit<A, E>) => void;
|
|
6
|
+
}): () => void;
|
|
7
|
+
runPromise<A, E, R2>(effect: Effect.Effect<A, E, R2>): Promise<A>;
|
|
8
|
+
dispose(): Promise<void>;
|
|
9
|
+
}
|
|
10
|
+
export type { FormError, FormIssue, RemoteDomainError, RemoteFailure, RemoteHttpError, RemoteTransportError, RemoteValidationError, } from "../internal/remote-shared.js";
|
|
11
|
+
export interface ClientRuntimeService extends EffectRuntime<unknown> {
|
|
12
|
+
}
|
|
13
|
+
type RuntimeSeedLayer<R> = Layer.Layer<R, never, R>;
|
|
14
|
+
type RuntimeOperator = (self: Layer.Layer<unknown, unknown, unknown>) => Layer.Layer<unknown, unknown, unknown>;
|
|
15
|
+
type ProvidedBy<Op> = Op extends (self: RuntimeSeedLayer<infer R>) => Layer.Layer<unknown, unknown, infer RIn> ? Exclude<R, RIn> : never;
|
|
16
|
+
type ProvidedByAll<Ops extends ReadonlyArray<RuntimeOperator>> = Ops extends readonly [infer Head, ...infer Tail] ? ProvidedBy<Head> | ProvidedByAll<Extract<Tail, ReadonlyArray<RuntimeOperator>>> : never;
|
|
17
|
+
type ApplyOperator<Seed, Op> = Op extends (self: Seed) => infer Out ? Out : never;
|
|
18
|
+
type ApplyOperators<Seed, Ops extends ReadonlyArray<RuntimeOperator>> = Ops extends readonly [infer Head, ...infer Tail] ? ApplyOperators<ApplyOperator<Seed, Head>, Extract<Tail, ReadonlyArray<RuntimeOperator>>> : Seed;
|
|
19
|
+
type FinalRuntimeLayer<Ops extends ReadonlyArray<RuntimeOperator>> = ApplyOperators<RuntimeSeedLayer<ProvidedByAll<Ops>>, Ops> extends infer Out ? Out extends Layer.Layer<unknown, unknown, infer RIn> ? [RIn] extends [never] ? Out : never : never : never;
|
|
20
|
+
interface ClientRuntimeSeed {
|
|
21
|
+
pipe(): Layer.Layer<never>;
|
|
22
|
+
pipe<const Ops extends readonly [RuntimeOperator, ...Array<RuntimeOperator>]>(...ops: Ops): FinalRuntimeLayer<Ops>;
|
|
23
|
+
make(): ManagedRuntime.ManagedRuntime<never, never>;
|
|
24
|
+
make<const Ops extends readonly [RuntimeOperator, ...Array<RuntimeOperator>]>(...ops: Ops): ManagedRuntimeFromOps<Ops>;
|
|
25
|
+
}
|
|
26
|
+
type ManagedRuntimeFromOps<Ops extends ReadonlyArray<RuntimeOperator>> = ManagedRuntime.ManagedRuntime<Layer.Layer.Success<FinalRuntimeLayer<Ops>>, Layer.Layer.Error<FinalRuntimeLayer<Ops>>>;
|
|
27
|
+
/**
|
|
28
|
+
* Build or compose the shared client-side `ManagedRuntime` used by generated
|
|
29
|
+
* `<script effect>` and markup helpers.
|
|
30
|
+
*
|
|
31
|
+
* @see https://ser.barekey.dev/content/reference/client-runtime
|
|
32
|
+
*/
|
|
33
|
+
export declare const ClientRuntime: ClientRuntimeSeed;
|
|
34
|
+
/**
|
|
35
|
+
* Look up the active client runtime for the current component, or lazily
|
|
36
|
+
* create a default empty-layer runtime when no explicit one has been
|
|
37
|
+
* registered.
|
|
38
|
+
*
|
|
39
|
+
* Emitted by the `<script effect>` / `{yield* ...}` preprocessor - users
|
|
40
|
+
* should never import this directly.
|
|
41
|
+
*
|
|
42
|
+
* @internal Internal - do not use.
|
|
43
|
+
* @see https://ser.barekey.dev/content/reference/client-runtime
|
|
44
|
+
*/
|
|
45
|
+
export declare function get_effect_runtime_or_throw<T extends EffectRuntime = EffectRuntime<never>>(): T;
|
|
46
|
+
/**
|
|
47
|
+
* Mount-time runner used by generated `<script effect>` output.
|
|
48
|
+
*
|
|
49
|
+
* Emitted by the preprocessor - users should never import this directly.
|
|
50
|
+
*
|
|
51
|
+
* @internal Internal - do not use.
|
|
52
|
+
* @see https://ser.barekey.dev/content/reference/client-runtime
|
|
53
|
+
*/
|
|
54
|
+
export declare function run_component_effect<A, E, R>(runtime: EffectRuntime<R>, program: Effect.Effect<A, E, R>): () => void;
|
|
55
|
+
/**
|
|
56
|
+
* Promise-returning runner used by generated `{yield* ...}` markup helpers.
|
|
57
|
+
*
|
|
58
|
+
* Emitted by the preprocessor - users should never import this directly.
|
|
59
|
+
*
|
|
60
|
+
* @internal Internal - do not use.
|
|
61
|
+
* @see https://ser.barekey.dev/content/reference/client-runtime
|
|
62
|
+
*/
|
|
63
|
+
export declare function run_inline_effect<A, E, R>(runtime: EffectRuntime<R>, program: Effect.Effect<A, E, R>): Promise<A>;
|
|
64
|
+
/**
|
|
65
|
+
* Internal redirect guard used by the remote client adapters.
|
|
66
|
+
*
|
|
67
|
+
* @internal Internal - do not use.
|
|
68
|
+
*/
|
|
69
|
+
declare function is_redirect_like(value: unknown): boolean;
|
|
70
|
+
/**
|
|
71
|
+
* Internal adapter that lifts a promise-producing callback into the shared
|
|
72
|
+
* remote failure channel used by client wrappers.
|
|
73
|
+
*
|
|
74
|
+
* @internal Internal - do not use.
|
|
75
|
+
*/
|
|
76
|
+
declare function create_remote_effect_from_promise<Success, ErrorType = never>(create_promise: () => PromiseLike<Success>, decode_error?: (error: unknown) => RemoteFailure<ErrorType>): Effect.Effect<Success, RemoteFailure<ErrorType>, never>;
|
|
77
|
+
/**
|
|
78
|
+
* Convert a promise or promise-returning function into an `Effect` that uses
|
|
79
|
+
* the remote failure channel when applicable.
|
|
80
|
+
*
|
|
81
|
+
* @see https://ser.barekey.dev/content/reference/effect
|
|
82
|
+
*/
|
|
83
|
+
export declare function to_effect<Success, ErrorType = never>(promise_like: PromiseLike<Success>): Effect.Effect<Success, RemoteFailure<ErrorType>, never>;
|
|
84
|
+
export declare function to_effect<Args extends Array<unknown>, Success, ErrorType = never>(fn: (...args: Args) => PromiseLike<Success>): (...args: Args) => Effect.Effect<Success, RemoteFailure<ErrorType>, never>;
|
|
85
|
+
/**
|
|
86
|
+
* Unwrap a runtime wrapper and recover the original native value.
|
|
87
|
+
*
|
|
88
|
+
* @see https://ser.barekey.dev/content/reference/effect
|
|
89
|
+
*/
|
|
90
|
+
export declare function to_native<Value>(value: Value): Value extends {
|
|
91
|
+
native: infer Native;
|
|
92
|
+
} ? Native : Value;
|
|
93
|
+
export { create_remote_effect_from_promise, is_redirect_like };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { PluginOption } from "vite";
|
|
2
|
+
import { type EffectPreprocessOptions } from "./preprocess.js";
|
|
3
|
+
/** Options for the high-level {@link effect} Vite plugin. */
|
|
4
|
+
export interface EffectPluginOptions {
|
|
5
|
+
effect?: EffectPreprocessOptions;
|
|
6
|
+
remoteModuleId?: string;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Convenience Vite plugin that enables `<script effect>` transforms and wires
|
|
10
|
+
* SvelteKit remote functions to the Effect-aware client adapters.
|
|
11
|
+
*
|
|
12
|
+
* Use this in `vite.config.ts` instead of composing lower-level runtime
|
|
13
|
+
* plugins yourself.
|
|
14
|
+
*
|
|
15
|
+
* @see https://ser.barekey.dev/
|
|
16
|
+
*/
|
|
17
|
+
export declare function effect(options?: EffectPluginOptions): PluginOption[];
|
package/dist/v3/mod.d.ts
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export type { EffectPreprocessOptions } from "./preprocess.js";
|
|
2
|
+
export type { ClientRuntimeService, EffectRuntime, FormError, FormIssue, RemoteDomainError, RemoteFailure, RemoteHttpError, RemoteTransportError, RemoteValidationError, } from "./client.js";
|
|
3
|
+
export { ClientRuntime, get_effect_runtime_or_throw, run_component_effect, run_inline_effect, to_effect, to_native, } from "./client.js";
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Low-level Svelte preprocessing primitives for `svelte-effect-runtime`.
|
|
3
|
+
*
|
|
4
|
+
* @example
|
|
5
|
+
* ```ts
|
|
6
|
+
* import { effect_preprocess } from "svelte-effect-runtime/preprocess";
|
|
7
|
+
*
|
|
8
|
+
* const preprocess = effect_preprocess();
|
|
9
|
+
* ```
|
|
10
|
+
*
|
|
11
|
+
* @module
|
|
12
|
+
*/
|
|
13
|
+
import type { PreprocessorGroup } from "svelte/compiler";
|
|
14
|
+
/** Options that control how generated helper imports are emitted. */
|
|
15
|
+
export interface EffectPreprocessOptions {
|
|
16
|
+
runtimeModuleId?: string;
|
|
17
|
+
effectModuleId?: string;
|
|
18
|
+
svelteModuleId?: string;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Low-level Svelte preprocessor for `<script effect>` and supported markup
|
|
22
|
+
* `yield*` transforms.
|
|
23
|
+
*
|
|
24
|
+
* Advanced entry point used by tooling and custom build setups.
|
|
25
|
+
*
|
|
26
|
+
* @see https://ser.barekey.dev/content/reference/preprocess
|
|
27
|
+
*/
|
|
28
|
+
export declare function effect_preprocess(options?: EffectPreprocessOptions): PreprocessorGroup;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import * as Server_module from "./server.js";
|
|
2
|
+
export * from "./mod.js";
|
|
3
|
+
export type * from "./server.js";
|
|
4
|
+
export type { EffectPluginOptions } from "./effect.js";
|
|
5
|
+
export { effect } from "./effect.js";
|
|
6
|
+
/**
|
|
7
|
+
* Define a read-only remote function that returns an `Effect` on the client.
|
|
8
|
+
*
|
|
9
|
+
* @see https://ser.barekey.dev/content/remote-functions/query
|
|
10
|
+
*/
|
|
11
|
+
export declare const Query: typeof Server_module.Query;
|
|
12
|
+
/**
|
|
13
|
+
* Define a write-oriented remote function that returns an `Effect` on the
|
|
14
|
+
* client.
|
|
15
|
+
*
|
|
16
|
+
* @see https://ser.barekey.dev/content/remote-functions/command
|
|
17
|
+
*/
|
|
18
|
+
export declare const Command: typeof Server_module.Command;
|
|
19
|
+
/**
|
|
20
|
+
* Define a remote form handler that maps submitted data into an Effect
|
|
21
|
+
* program.
|
|
22
|
+
*
|
|
23
|
+
* @see https://ser.barekey.dev/content/remote-functions/form
|
|
24
|
+
*/
|
|
25
|
+
export declare const Form: typeof Server_module.Form;
|
|
26
|
+
/**
|
|
27
|
+
* Define a prerenderable remote function backed by an Effect program.
|
|
28
|
+
*
|
|
29
|
+
* @see https://ser.barekey.dev/content/remote-functions/prerender
|
|
30
|
+
*/
|
|
31
|
+
export declare const Prerender: typeof Server_module.Prerender;
|
|
32
|
+
/**
|
|
33
|
+
* Effect `Context.Tag` for the current SvelteKit `RequestEvent`.
|
|
34
|
+
*
|
|
35
|
+
* @see https://ser.barekey.dev/content/runtimes/server
|
|
36
|
+
*/
|
|
37
|
+
export declare const RequestEvent: typeof Server_module.RequestEvent;
|
|
38
|
+
/**
|
|
39
|
+
* Server-side runtime builder used to provide long-lived Effect services to
|
|
40
|
+
* remote functions.
|
|
41
|
+
*
|
|
42
|
+
* @see https://ser.barekey.dev/content/reference/server-runtime
|
|
43
|
+
*/
|
|
44
|
+
export declare const ServerRuntime: typeof Server_module.ServerRuntime;
|
|
45
|
+
/**
|
|
46
|
+
* Build a devalue transport table from Effect schemas so remote payloads can
|
|
47
|
+
* round-trip custom data across the client/server boundary.
|
|
48
|
+
*
|
|
49
|
+
* @see https://ser.barekey.dev/content/reference/transport
|
|
50
|
+
*/
|
|
51
|
+
export declare const create_effect_transport: typeof Server_module.create_effect_transport;
|
|
52
|
+
/**
|
|
53
|
+
* Resolve the active server runtime, lazily creating a default empty runtime
|
|
54
|
+
* when no explicit one has been registered.
|
|
55
|
+
*
|
|
56
|
+
* @internal Internal - do not use.
|
|
57
|
+
* @see https://ser.barekey.dev/content/reference/server-runtime
|
|
58
|
+
*/
|
|
59
|
+
export declare const get_server_runtime_or_throw: typeof Server_module.get_server_runtime_or_throw;
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
import type { RemoteForm as SvelteKitRemoteForm, RemoteFormInput as SvelteKitRemoteFormInput } from "@sveltejs/kit";
|
|
2
|
+
import { getRequestEvent as get_native_request_event } from "$app/server";
|
|
3
|
+
import { Effect, Layer, ManagedRuntime, Schema } from "effect";
|
|
4
|
+
import type { Context } from "effect";
|
|
5
|
+
import { type FormError } from "../internal/remote-shared.js";
|
|
6
|
+
type EffectSchema = Schema.Schema.Any;
|
|
7
|
+
export interface Transporter<T = unknown, U = {
|
|
8
|
+
value: unknown;
|
|
9
|
+
}> {
|
|
10
|
+
decode: (data: U) => T;
|
|
11
|
+
encode: (value: T) => false | U;
|
|
12
|
+
}
|
|
13
|
+
export type Transport = Record<string, Transporter>;
|
|
14
|
+
export type RemoteFormInput = SvelteKitRemoteFormInput;
|
|
15
|
+
export type RemoteQueryFunction<Input, Output> = (arg: OptionalArgument<Input>) => Promise<Output>;
|
|
16
|
+
export type RemoteCommand<Input, Output> = ((arg: OptionalArgument<Input>) => Promise<Output> & {
|
|
17
|
+
updates(...updates: Array<unknown>): Promise<Output>;
|
|
18
|
+
}) & {
|
|
19
|
+
readonly pending: number;
|
|
20
|
+
};
|
|
21
|
+
export type RemotePrerenderFunction<Input, Output> = (arg: OptionalArgument<Input>) => Promise<Output>;
|
|
22
|
+
export type RemoteForm<Input extends RemoteFormInput | void, Output> = SvelteKitRemoteForm<Input, Output>;
|
|
23
|
+
type RuntimeOperator = (self: Layer.Layer<unknown, unknown, unknown>) => Layer.Layer<unknown, unknown, unknown>;
|
|
24
|
+
type RuntimeSeedLayer<Requirements> = Layer.Layer<Requirements, never, Requirements>;
|
|
25
|
+
type ProvidedBy<Op> = Op extends (self: RuntimeSeedLayer<infer Requirements>) => Layer.Layer<unknown, unknown, infer Incoming> ? Exclude<Requirements, Incoming> : never;
|
|
26
|
+
type ProvidedByAll<Ops extends ReadonlyArray<RuntimeOperator>> = Ops extends readonly [infer Head, ...infer Tail] ? ProvidedBy<Head> | ProvidedByAll<Extract<Tail, ReadonlyArray<RuntimeOperator>>> : never;
|
|
27
|
+
type ApplyOperator<Seed, Op> = Op extends (self: Seed) => infer Out ? Out : never;
|
|
28
|
+
type ApplyOperators<Seed, Ops extends ReadonlyArray<RuntimeOperator>> = Ops extends readonly [infer Head, ...infer Tail] ? ApplyOperators<ApplyOperator<Seed, Head>, Extract<Tail, ReadonlyArray<RuntimeOperator>>> : Seed;
|
|
29
|
+
type FinalRuntimeLayer<Ops extends ReadonlyArray<RuntimeOperator>> = ApplyOperators<RuntimeSeedLayer<ProvidedByAll<Ops>>, Ops> extends infer Out ? Out extends Layer.Layer<unknown, unknown, infer Incoming> ? [Incoming] extends [never] ? Out : never : never : never;
|
|
30
|
+
type OptionalArgument<Input> = undefined extends Input ? Input | void : Input;
|
|
31
|
+
type SchemaInput<SchemaType extends EffectSchema> = Schema.Schema.Encoded<SchemaType>;
|
|
32
|
+
type SchemaOutput<SchemaType extends EffectSchema> = Schema.Schema.Type<SchemaType>;
|
|
33
|
+
type FieldHelpers<FormShape, SchemaType> = FormShape extends Record<string, unknown> ? {
|
|
34
|
+
[Key in keyof FormShape as Key extends string ? Key : never]: (message: string) => Effect.Effect<never, FormError<SchemaType>, never>;
|
|
35
|
+
} : Record<PropertyKey, never>;
|
|
36
|
+
export type Invalid<SchemaType = unknown> = {
|
|
37
|
+
form: (message: string) => Effect.Effect<never, FormError<SchemaType>, never>;
|
|
38
|
+
} & FieldHelpers<SchemaType extends EffectSchema ? SchemaOutput<SchemaType> : unknown, SchemaType>;
|
|
39
|
+
export type EffectQueryFunction<Input, Output, Error = never> = ((arg: OptionalArgument<Input>) => Effect.Effect<Output, import("../internal/remote-shared.js").RemoteFailure<Error>, never>) & {
|
|
40
|
+
native: RemoteQueryFunction<Input, Output>;
|
|
41
|
+
};
|
|
42
|
+
export type EffectCommand<Input, Output, Error = never> = ((arg: OptionalArgument<Input>) => Effect.Effect<Output, import("../internal/remote-shared.js").RemoteFailure<Error>, never>) & {
|
|
43
|
+
native: RemoteCommand<Input, Output>;
|
|
44
|
+
readonly pending: number;
|
|
45
|
+
};
|
|
46
|
+
export type EffectPrerenderFunction<Input, Output, Error = never> = ((arg: OptionalArgument<Input>) => Effect.Effect<Output, import("../internal/remote-shared.js").RemoteFailure<Error>, never>) & {
|
|
47
|
+
native: RemotePrerenderFunction<Input, Output>;
|
|
48
|
+
};
|
|
49
|
+
export type EffectForm<Input extends RemoteFormInput | void, Output, Error = never> = RemoteForm<Input, Output> & {
|
|
50
|
+
native: RemoteForm<Input, Output>;
|
|
51
|
+
submit(data: OptionalArgument<Input>): Effect.Effect<Output, import("../internal/remote-shared.js").RemoteFailure<Error>, never>;
|
|
52
|
+
for: RemoteForm<Input, Output>["for"] extends (...args: infer Args) => infer Result ? (...args: Args) => EffectForm<Input, Output, Error> : never;
|
|
53
|
+
};
|
|
54
|
+
export type RequestEventService = ReturnType<typeof get_native_request_event>;
|
|
55
|
+
/**
|
|
56
|
+
* Effect `Context.Tag` for the current SvelteKit `RequestEvent`.
|
|
57
|
+
*
|
|
58
|
+
* Remote functions can `yield* RequestEvent` to access cookies, headers, and
|
|
59
|
+
* route state for the active request.
|
|
60
|
+
*
|
|
61
|
+
* @see https://ser.barekey.dev/content/runtimes/server
|
|
62
|
+
*/
|
|
63
|
+
export declare const RequestEvent: Context.Tag<RequestEventService, RequestEventService>;
|
|
64
|
+
interface ServerRuntimeSeed {
|
|
65
|
+
pipe(): Layer.Layer<never>;
|
|
66
|
+
pipe<const Ops extends readonly [RuntimeOperator, ...Array<RuntimeOperator>]>(...ops: Ops): FinalRuntimeLayer<Ops>;
|
|
67
|
+
make(): void;
|
|
68
|
+
make<const Ops extends readonly [RuntimeOperator, ...Array<RuntimeOperator>]>(...ops: Ops): void;
|
|
69
|
+
}
|
|
70
|
+
type ServerManagedRuntime = ManagedRuntime.ManagedRuntime<unknown, unknown>;
|
|
71
|
+
/**
|
|
72
|
+
* Server-side runtime builder used to provide long-lived Effect services to
|
|
73
|
+
* remote functions.
|
|
74
|
+
*
|
|
75
|
+
* @see https://ser.barekey.dev/content/reference/server-runtime
|
|
76
|
+
*/
|
|
77
|
+
export declare const ServerRuntime: ServerRuntimeSeed;
|
|
78
|
+
/**
|
|
79
|
+
* Resolve the active server runtime, lazily creating a default empty runtime
|
|
80
|
+
* when no explicit one has been registered.
|
|
81
|
+
*
|
|
82
|
+
* Emitted by generated server-side remote wrappers - users should never
|
|
83
|
+
* import this directly.
|
|
84
|
+
*
|
|
85
|
+
* @internal Internal - do not use.
|
|
86
|
+
* @see https://ser.barekey.dev/content/reference/server-runtime
|
|
87
|
+
*/
|
|
88
|
+
export declare function get_server_runtime_or_throw(): ServerManagedRuntime;
|
|
89
|
+
/**
|
|
90
|
+
* Remap low-level request-store crashes into a clearer setup error when remote
|
|
91
|
+
* helpers are evaluated outside SvelteKit's remote-function runtime.
|
|
92
|
+
*
|
|
93
|
+
* @internal Internal - do not use.
|
|
94
|
+
*/
|
|
95
|
+
export declare function normalize_remote_helper_error(error: unknown): unknown;
|
|
96
|
+
/**
|
|
97
|
+
* Build a devalue transport table from Effect schemas so remote payloads can
|
|
98
|
+
* round-trip custom data across the client/server boundary.
|
|
99
|
+
*
|
|
100
|
+
* @see https://ser.barekey.dev/content/reference/transport
|
|
101
|
+
*/
|
|
102
|
+
export declare function create_effect_transport<const Schemas extends Record<string, EffectSchema>>(schemas: Schemas): Transport;
|
|
103
|
+
export interface EffectQueryFactory {
|
|
104
|
+
<Output, ErrorType, Requirements>(fn: () => Effect.Effect<Output, ErrorType, Requirements>): EffectQueryFunction<void, Output, ErrorType>;
|
|
105
|
+
<Input, Output, ErrorType, Requirements>(validate: "unchecked", fn: (arg: Input) => Effect.Effect<Output, ErrorType, Requirements>): EffectQueryFunction<Input, Output, ErrorType>;
|
|
106
|
+
<SchemaType extends EffectSchema, Output, ErrorType, Requirements>(validate: SchemaType, fn: (arg: SchemaOutput<SchemaType>) => Effect.Effect<Output, ErrorType, Requirements>): EffectQueryFunction<SchemaInput<SchemaType>, Output, ErrorType>;
|
|
107
|
+
batch: typeof query_batch_factory;
|
|
108
|
+
}
|
|
109
|
+
type RemotePrerenderInputsGenerator<Input> = (event: RequestEventService) => AsyncIterable<Input> | Iterable<Input>;
|
|
110
|
+
declare function query_batch_factory(validate_or_fn: unknown, maybe_fn?: unknown): unknown;
|
|
111
|
+
/**
|
|
112
|
+
* Define a read-only remote function that returns an `Effect` on the client.
|
|
113
|
+
*
|
|
114
|
+
* @see https://ser.barekey.dev/content/remote-functions/query
|
|
115
|
+
*/
|
|
116
|
+
export declare const Query: EffectQueryFactory;
|
|
117
|
+
export interface EffectCommandFactory {
|
|
118
|
+
<Output, ErrorType, Requirements>(fn: () => Effect.Effect<Output, ErrorType, Requirements>): EffectCommand<void, Output, ErrorType>;
|
|
119
|
+
<Input, Output, ErrorType, Requirements>(validate: "unchecked", fn: (arg: Input) => Effect.Effect<Output, ErrorType, Requirements>): EffectCommand<Input, Output, ErrorType>;
|
|
120
|
+
<SchemaType extends EffectSchema, Output, ErrorType, Requirements>(validate: SchemaType, fn: (arg: SchemaOutput<SchemaType>) => Effect.Effect<Output, ErrorType, Requirements>): EffectCommand<SchemaInput<SchemaType>, Output, ErrorType>;
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* Define a write-oriented remote function that returns an `Effect` on the
|
|
124
|
+
* client.
|
|
125
|
+
*
|
|
126
|
+
* @see https://ser.barekey.dev/content/remote-functions/command
|
|
127
|
+
*/
|
|
128
|
+
export declare const Command: EffectCommandFactory;
|
|
129
|
+
export interface EffectFormFactory {
|
|
130
|
+
<Output, ErrorType, Requirements>(fn: () => Effect.Effect<Output, ErrorType, Requirements>): EffectForm<void, Output, ErrorType>;
|
|
131
|
+
<Input extends RemoteFormInput, Output, ErrorType, Requirements>(validate: "unchecked", fn: (args: {
|
|
132
|
+
data: Input;
|
|
133
|
+
invalid: Invalid;
|
|
134
|
+
}) => Effect.Effect<Output, ErrorType | FormError, Requirements>): EffectForm<Input, Output, ErrorType>;
|
|
135
|
+
<SchemaType extends EffectSchema, Output, ErrorType, Requirements>(validate: SchemaType, fn: (args: {
|
|
136
|
+
data: SchemaOutput<SchemaType>;
|
|
137
|
+
invalid: Invalid<SchemaType>;
|
|
138
|
+
}) => Effect.Effect<Output, ErrorType | FormError<SchemaType>, Requirements>): EffectForm<SchemaInput<SchemaType> & RemoteFormInput, Output, ErrorType>;
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* Define a remote form handler that maps submitted data into an Effect
|
|
142
|
+
* program.
|
|
143
|
+
*
|
|
144
|
+
* @see https://ser.barekey.dev/content/remote-functions/form
|
|
145
|
+
*/
|
|
146
|
+
export declare const Form: EffectFormFactory;
|
|
147
|
+
export interface EffectPrerenderFactory {
|
|
148
|
+
<Output, ErrorType, Requirements>(fn: () => Effect.Effect<Output, ErrorType, Requirements>, options?: {
|
|
149
|
+
inputs?: RemotePrerenderInputsGenerator<void>;
|
|
150
|
+
dynamic?: boolean;
|
|
151
|
+
}): EffectPrerenderFunction<void, Output, ErrorType>;
|
|
152
|
+
<Input, Output, ErrorType, Requirements>(validate: "unchecked", fn: (arg: Input) => Effect.Effect<Output, ErrorType, Requirements>, options?: {
|
|
153
|
+
inputs?: RemotePrerenderInputsGenerator<Input>;
|
|
154
|
+
dynamic?: boolean;
|
|
155
|
+
}): EffectPrerenderFunction<Input, Output, ErrorType>;
|
|
156
|
+
<SchemaType extends EffectSchema, Output, ErrorType, Requirements>(validate: SchemaType, fn: (arg: SchemaOutput<SchemaType>) => Effect.Effect<Output, ErrorType, Requirements>, options?: {
|
|
157
|
+
inputs?: RemotePrerenderInputsGenerator<SchemaInput<SchemaType>>;
|
|
158
|
+
dynamic?: boolean;
|
|
159
|
+
}): EffectPrerenderFunction<SchemaInput<SchemaType>, Output, ErrorType>;
|
|
160
|
+
}
|
|
161
|
+
/**
|
|
162
|
+
* Define a prerenderable remote function backed by an Effect program.
|
|
163
|
+
*
|
|
164
|
+
* @see https://ser.barekey.dev/content/remote-functions/prerender
|
|
165
|
+
*/
|
|
166
|
+
export declare const Prerender: EffectPrerenderFactory;
|
|
167
|
+
export {};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Low-level Vite integration entrypoints for `svelte-effect-runtime`.
|
|
3
|
+
*
|
|
4
|
+
* @example
|
|
5
|
+
* ```ts
|
|
6
|
+
* import { svelte_effect_runtime } from "svelte-effect-runtime/vite";
|
|
7
|
+
*
|
|
8
|
+
* export default {
|
|
9
|
+
* plugins: [svelte_effect_runtime()],
|
|
10
|
+
* };
|
|
11
|
+
* ```
|
|
12
|
+
*
|
|
13
|
+
* @module
|
|
14
|
+
*/
|
|
15
|
+
import { type Options as SveltePluginOptions } from "@sveltejs/vite-plugin-svelte";
|
|
16
|
+
import type { Plugin } from "vite";
|
|
17
|
+
import { type EffectPreprocessOptions } from "./preprocess.js";
|
|
18
|
+
/** Options for the plain Vite + Svelte preprocess wrapper. */
|
|
19
|
+
export interface SvelteEffectRuntimeOptions {
|
|
20
|
+
effect?: EffectPreprocessOptions;
|
|
21
|
+
svelte?: SveltePluginOptions;
|
|
22
|
+
}
|
|
23
|
+
/** Options for the SvelteKit remote-function adapter plugin. */
|
|
24
|
+
export interface SveltekitEffectRuntimeOptions {
|
|
25
|
+
/**
|
|
26
|
+
* Override the client-side module SvelteKit uses for generated `.remote.ts`
|
|
27
|
+
* imports so remote calls default to Effect-returning adapters.
|
|
28
|
+
*/
|
|
29
|
+
remoteModuleId?: string;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Low-level Vite plugin wrapper for non-SvelteKit builds that only need the
|
|
33
|
+
* Svelte preprocessor integration.
|
|
34
|
+
*
|
|
35
|
+
* @see https://ser.barekey.dev/content/reference/tooling
|
|
36
|
+
*/
|
|
37
|
+
export declare function svelte_effect_runtime(options?: SvelteEffectRuntimeOptions): Plugin[];
|
|
38
|
+
/**
|
|
39
|
+
* Low-level Vite plugin that swaps SvelteKit's generated remote client module
|
|
40
|
+
* for the Effect-aware adapters used by `effect()`.
|
|
41
|
+
*
|
|
42
|
+
* Prefer `effect()` unless you are assembling a custom Vite plugin stack.
|
|
43
|
+
*
|
|
44
|
+
* @see https://ser.barekey.dev/content/reference/tooling
|
|
45
|
+
*/
|
|
46
|
+
export declare function sveltekit_effect_runtime(options?: SveltekitEffectRuntimeOptions): Plugin;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export type { ClientRuntimeService, EffectRuntime, FormError, FormIssue, RemoteDomainError, RemoteFailure, RemoteHttpError, RemoteTransportError, RemoteValidationError, } from "../v3/client.js";
|
|
2
|
+
export { ClientRuntime, get_effect_runtime_or_throw, run_component_effect, run_inline_effect, to_effect, to_native, } from "../v3/client.js";
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* v4-targeted high-level Vite integration for `svelte-effect-runtime`.
|
|
3
|
+
*
|
|
4
|
+
* @example
|
|
5
|
+
* ```ts
|
|
6
|
+
* import { effect } from "svelte-effect-runtime/v4";
|
|
7
|
+
*
|
|
8
|
+
* export default {
|
|
9
|
+
* plugins: [effect()],
|
|
10
|
+
* };
|
|
11
|
+
* ```
|
|
12
|
+
*
|
|
13
|
+
* @module
|
|
14
|
+
*/
|
|
15
|
+
import type { PluginOption } from "vite";
|
|
16
|
+
import { type EffectPluginOptions } from "../v3/effect.js";
|
|
17
|
+
export type { EffectPluginOptions } from "../v3/effect.js";
|
|
18
|
+
/**
|
|
19
|
+
* v4-flavoured convenience Vite plugin that enables `<script effect>`
|
|
20
|
+
* transforms and Effect-aware remote function adapters.
|
|
21
|
+
*
|
|
22
|
+
* @see https://ser.barekey.dev/
|
|
23
|
+
*/
|
|
24
|
+
export declare function effect(options?: EffectPluginOptions): PluginOption[];
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { t as effect$1 } from "../chunks/effect-CL8GJs8A.js";
|
|
2
|
+
import { with_v4_effect_preprocess_options } from "./preprocess.js";
|
|
3
|
+
//#region v4/effect.ts
|
|
4
|
+
/**
|
|
5
|
+
* v4-flavoured convenience Vite plugin that enables `<script effect>`
|
|
6
|
+
* transforms and Effect-aware remote function adapters.
|
|
7
|
+
*
|
|
8
|
+
* @see https://ser.barekey.dev/
|
|
9
|
+
*/
|
|
10
|
+
function effect(options = {}) {
|
|
11
|
+
return effect$1({
|
|
12
|
+
...options,
|
|
13
|
+
effect: with_v4_effect_preprocess_options(options.effect)
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
//#endregion
|
|
17
|
+
export { effect };
|
|
18
|
+
|
|
19
|
+
//# sourceMappingURL=effect.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"effect.js","names":["create_effect_plugin"],"sources":["../../../modules/svelte-effect-runtime/v4/effect.ts"],"sourcesContent":["/**\n * v4-targeted high-level Vite integration for `svelte-effect-runtime`.\n *\n * @example\n * ```ts\n * import { effect } from \"svelte-effect-runtime/v4\";\n *\n * export default {\n * plugins: [effect()],\n * };\n * ```\n *\n * @module\n */\nimport type { PluginOption } from \"vite\";\nimport {\n effect as create_effect_plugin,\n type EffectPluginOptions,\n} from \"$/v3/effect.ts\";\nimport { with_v4_effect_preprocess_options } from \"$/v4/preprocess.ts\";\n\nexport type { EffectPluginOptions } from \"$/v3/effect.ts\";\n\n/**\n * v4-flavoured convenience Vite plugin that enables `<script effect>`\n * transforms and Effect-aware remote function adapters.\n *\n * @see https://ser.barekey.dev/\n */\nexport function effect(\n options: EffectPluginOptions = {},\n): PluginOption[] {\n return create_effect_plugin({\n ...options,\n effect: with_v4_effect_preprocess_options(options.effect),\n });\n}\n"],"mappings":";;;;;;;;;AA6BA,SAAgB,OACd,UAA+B,EAAE,EACjB;AAChB,QAAOA,SAAqB;EAC1B,GAAG;EACH,QAAQ,kCAAkC,QAAQ,OAAO;EAC1D,CAAC"}
|
package/dist/v4/mod.d.ts
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export type { EffectPreprocessOptions } from "./preprocess.js";
|
|
2
|
+
export type { ClientRuntimeService, EffectRuntime, FormError, FormIssue, RemoteDomainError, RemoteFailure, RemoteHttpError, RemoteTransportError, RemoteValidationError, } from "./client.js";
|
|
3
|
+
export { ClientRuntime, get_effect_runtime_or_throw, run_component_effect, run_inline_effect, to_effect, to_native, } from "./client.js";
|
package/dist/v4/mod.js
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { a as run_component_effect, c as to_native, o as run_inline_effect, r as get_effect_runtime_or_throw, s as to_effect, t as ClientRuntime } from "../chunks/client-DkW4e4dD.js";
|
|
2
|
+
import "../chunks/v4-DIhYCbb_.js";
|
|
3
|
+
export { ClientRuntime, get_effect_runtime_or_throw, run_component_effect, run_inline_effect, to_effect, to_native };
|