svelte-effect-runtime 3.4.5 → 3.4.6
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-5cizmHtc.js → client-CsVu54pU.js} +119 -56
- package/.dist/chunks/client-CsVu54pU.js.map +1 -0
- package/.dist/chunks/{descriptors-OS4VfJuW.js → descriptors-cOe9uRJz.js} +2 -2
- package/.dist/chunks/descriptors-cOe9uRJz.js.map +1 -0
- package/.dist/chunks/{dispatcher-C38yhZRs.js → dispatcher-LtvFKYUp.js} +3 -3
- package/.dist/chunks/dispatcher-LtvFKYUp.js.map +1 -0
- package/.dist/chunks/{dispatcher-DuBLHNa6.js → dispatcher-pHH4JcFR.js} +12 -11
- package/.dist/chunks/dispatcher-pHH4JcFR.js.map +1 -0
- package/.dist/chunks/{errors-0PaWf7Bq.js → errors-Dcf0MVbq.js} +3 -3
- package/.dist/chunks/errors-Dcf0MVbq.js.map +1 -0
- package/.dist/chunks/{runtime-C51Dv3K6.js → runtime-ekkMQ-wL.js} +4 -4
- package/.dist/chunks/runtime-ekkMQ-wL.js.map +1 -0
- package/.dist/chunks/{transform-Cdsx7ygD.js → transform-02e-RvXH.js} +246 -172
- package/.dist/chunks/transform-02e-RvXH.js.map +1 -0
- package/.dist/chunks/{vite-DR3-WaqQ.js → vite-Dkwdtbgj.js} +118 -34
- package/.dist/chunks/vite-Dkwdtbgj.js.map +1 -0
- package/.dist/detect.js.map +1 -1
- package/.dist/dispatcher.d.ts +1 -1
- package/.dist/dispatcher.js +1 -1
- package/.dist/errors.d.ts +1 -1
- package/.dist/internal/generators.js +2 -2
- package/.dist/internal/remote-client.js +1 -1
- package/.dist/markup/promise.js +1 -1
- package/.dist/markup/promise.js.map +1 -1
- package/.dist/markup/run.js +3 -3
- package/.dist/markup/run.js.map +1 -1
- package/.dist/markup/transform/index.d.ts +8 -0
- package/.dist/markup/transform/scan.d.ts +20 -0
- package/.dist/markup/transform/types.d.ts +136 -2
- package/.dist/markup/transform.js +1 -1
- package/.dist/markup/value.js +1 -1
- package/.dist/markup/value.js.map +1 -1
- package/.dist/mod.js +3 -3
- package/.dist/mod.js.map +1 -1
- package/.dist/remote/client/command.d.ts +1 -1
- package/.dist/remote/client/effect.d.ts +15 -1
- package/.dist/remote/client/index.d.ts +1 -1
- package/.dist/remote/client/types.d.ts +3 -1
- package/.dist/remote/client.js +1 -1
- package/.dist/remote/server.js +27 -9
- package/.dist/remote/server.js.map +1 -1
- package/.dist/remote/shared.d.ts +126 -0
- package/.dist/remote/shared.js +117 -5
- package/.dist/remote/shared.js.map +1 -1
- package/.dist/runtime/transform.js +2 -2
- package/.dist/runtime/transform.js.map +1 -1
- package/.dist/script-transform/types.d.ts +95 -0
- package/.dist/server/effects.d.ts +15 -1
- package/.dist/server/factories.d.ts +128 -9
- package/.dist/server/index.d.ts +1 -1
- package/.dist/server/runtime.d.ts +1 -1
- package/.dist/server/types.d.ts +128 -7
- package/.dist/server.js +28 -13
- package/.dist/server.js.map +1 -1
- package/.dist/vite.js +1 -1
- package/LICENSE +29 -0
- package/package.json +21 -21
- package/.dist/chunks/client-5cizmHtc.js.map +0 -1
- package/.dist/chunks/descriptors-OS4VfJuW.js.map +0 -1
- package/.dist/chunks/dispatcher-C38yhZRs.js.map +0 -1
- package/.dist/chunks/dispatcher-DuBLHNa6.js.map +0 -1
- package/.dist/chunks/errors-0PaWf7Bq.js.map +0 -1
- package/.dist/chunks/runtime-C51Dv3K6.js.map +0 -1
- package/.dist/chunks/transform-Cdsx7ygD.js.map +0 -1
- package/.dist/chunks/vite-DR3-WaqQ.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vite-Dkwdtbgj.js","names":["candidate"],"sources":["../../../modules/svelte-effect-runtime/src/diagnostics.ts","../../../modules/svelte-effect-runtime/src/vite.ts"],"sourcesContent":["/**\n * Warning diagnostic produced by the SER Vite diagnostics plugin.\n */\ninterface Diagnostic {\n\tmessage: string;\n\tline: number;\n\tcolumn: number;\n}\n\ninterface MarkupExpression {\n\tstart: number;\n\tend: number;\n\texpression_text: string;\n\tattribute_name?: string;\n}\n\n/**\n * Finds best-effort SER usage diagnostics in Svelte component markup.\n *\n * @example\n * ```ts\n * const diagnostics = find_svelte_effect_diagnostics(\n * `<button onclick={Effect.gen}>save</button>`,\n * \"Button.svelte\",\n * );\n * ```\n *\n * @since 2.0.0\n * @param code - Svelte component source to scan for suspicious Effect usage.\n * @param filename - Filename used in diagnostic messages.\n * @returns Warning diagnostics with a message and source location.\n */\nexport function find_svelte_effect_diagnostics(\n\tcode: string,\n\tfilename: string,\n): Array<{ message: string; line: number; column: number }> {\n\tconst effect_names = find_effect_local_names(code);\n\tconst expressions = find_markup_expressions(code);\n\n\treturn expressions.flatMap((expression) =>\n\t\tmake_expression_diagnostics(code, filename, effect_names, expression),\n\t);\n}\n\nfunction find_effect_local_names(code: string): Set<string> {\n\tconst names = new Set<string>([\"Effect\"]);\n\tconst script_pattern = /<script\\b[^>]*>([\\s\\S]*?)<\\/script\\s*>/gi;\n\n\tfor (const script_match of code.matchAll(script_pattern)) {\n\t\tconst script = script_match[1];\n\t\tconst import_pattern = /import\\s+(type\\s+)?\\{([^}]+)\\}\\s+from\\s+[\"']effect[\"']/g;\n\n\t\tfor (const import_match of script.matchAll(import_pattern)) {\n\t\t\tconst is_type_only_import = import_match[1] !== undefined;\n\t\t\tconst specifiers = import_match[2].split(\",\");\n\n\t\t\tif (is_type_only_import) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tfor (const specifier of specifiers) {\n\t\t\t\tconst local_name = parse_effect_import_local_name(specifier);\n\n\t\t\t\tif (local_name) {\n\t\t\t\t\tnames.add(local_name);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn names;\n}\n\nfunction parse_effect_import_local_name(specifier: string): string | undefined {\n\tconst trimmed = specifier.trim();\n\tconst match = trimmed.match(/^Effect(?:\\s+as\\s+([A-Za-z_$][\\w$]*))?$/);\n\n\tif (!match) {\n\t\treturn undefined;\n\t}\n\n\treturn match[1] ?? \"Effect\";\n}\n\nfunction find_markup_expressions(code: string): MarkupExpression[] {\n\tconst expressions: MarkupExpression[] = [];\n\tlet cursor = 0;\n\n\twhile (cursor < code.length) {\n\t\tconst open = code.indexOf(\"{\", cursor);\n\n\t\tif (open === -1) {\n\t\t\tbreak;\n\t\t}\n\n\t\tif (is_inside_svelte_excluded_block(code, open)) {\n\t\t\tcursor = open + 1;\n\t\t\tcontinue;\n\t\t}\n\n\t\tconst close = find_closing_brace(code, open + 1);\n\n\t\tif (close === -1) {\n\t\t\tcursor = open + 1;\n\t\t\tcontinue;\n\t\t}\n\n\t\texpressions.push({\n\t\t\tstart: open,\n\t\t\tend: close,\n\t\t\texpression_text: code.slice(open + 1, close).trim(),\n\t\t\tattribute_name: find_attribute_name_before_expression(code, open),\n\t\t});\n\n\t\tcursor = close + 1;\n\t}\n\n\treturn expressions;\n}\n\nfunction make_expression_diagnostics(\n\tcode: string,\n\tfilename: string,\n\teffect_names: Set<string>,\n\texpression: MarkupExpression,\n): Diagnostic[] {\n\tconst attribute_name = expression.attribute_name;\n\tconst expression_text = expression.expression_text;\n\tconst is_event_attribute =\n\t\tattribute_name !== undefined && is_event_attribute_name(attribute_name);\n\tconst is_attribute = attribute_name !== undefined;\n\tconst loc = get_line_column(code, expression.start);\n\n\tif (!contains_effect_reference(expression_text, effect_names)) {\n\t\treturn [];\n\t}\n\n\tif (starts_with_yield_star(expression_text)) {\n\t\treturn [];\n\t}\n\n\tif (\n\t\tis_event_attribute &&\n\t\tis_callback_expression(expression_text) &&\n\t\tcontains_yield_star(expression_text)\n\t) {\n\t\treturn [\n\t\t\tmake_diagnostic(\n\t\t\t\tloc,\n\t\t\t\tmake_hidden_event_yield_warning(filename, attribute_name, expression_text),\n\t\t\t),\n\t\t];\n\t}\n\n\tif (contains_effect_runner(expression_text, effect_names)) {\n\t\treturn [\n\t\t\tmake_diagnostic(\n\t\t\t\tloc,\n\t\t\t\tmake_explicit_runner_warning(filename, attribute_name, expression_text),\n\t\t\t),\n\t\t];\n\t}\n\n\tif (is_bare_effect_gen(expression_text, effect_names)) {\n\t\treturn [\n\t\t\tmake_diagnostic(\n\t\t\t\tloc,\n\t\t\t\tmake_bare_effect_gen_warning(filename, attribute_name, expression_text),\n\t\t\t),\n\t\t];\n\t}\n\n\tif (is_event_attribute && is_callback_expression(expression_text)) {\n\t\treturn [\n\t\t\tmake_diagnostic(\n\t\t\t\tloc,\n\t\t\t\tmake_event_callback_returns_effect_warning(\n\t\t\t\t\tfilename,\n\t\t\t\t\tattribute_name,\n\t\t\t\t\texpression_text,\n\t\t\t\t),\n\t\t\t),\n\t\t];\n\t}\n\n\tif (is_event_attribute) {\n\t\treturn [\n\t\t\tmake_diagnostic(\n\t\t\t\tloc,\n\t\t\t\tmake_event_attribute_effect_warning(filename, attribute_name, expression_text),\n\t\t\t),\n\t\t];\n\t}\n\n\tif (is_attribute) {\n\t\treturn [\n\t\t\tmake_diagnostic(\n\t\t\t\tloc,\n\t\t\t\tmake_attribute_effect_warning(filename, attribute_name, expression_text),\n\t\t\t),\n\t\t];\n\t}\n\n\treturn [make_diagnostic(loc, make_sync_markup_effect_warning(filename, expression_text))];\n}\n\nfunction make_diagnostic(loc: { line: number; column: number }, message: string): Diagnostic {\n\treturn {\n\t\tmessage,\n\t\tline: loc.line,\n\t\tcolumn: loc.column,\n\t};\n}\n\nfunction make_hidden_event_yield_warning(\n\tfilename: string,\n\tattribute_name: string,\n\texpression_text: string,\n): string {\n\treturn [\n\t\t`[svelte-effect-runtime] Detected yield* hidden inside an event callback.`,\n\t\t`${filename}: ${attribute_name}={${expression_text}}`,\n\t\t`SER can only lower yield* at the event attribute boundary.`,\n\t\t`Write the event expression directly, for example: ${attribute_name}={yield* save()}`,\n\t].join(\"\\n\");\n}\n\nfunction make_explicit_runner_warning(\n\tfilename: string,\n\tattribute_name: string | undefined,\n\texpression_text: string,\n): string {\n\tconst location = attribute_name\n\t\t? `${attribute_name}={${expression_text}}`\n\t\t: `{${expression_text}}`;\n\n\treturn [\n\t\t`[svelte-effect-runtime] Detected an explicit Effect runner inside Svelte markup.`,\n\t\t`${filename}: ${location}`,\n\t\t`Explicit runners bypass SER cancellation and error handling for markup effects.`,\n\t\t`Prefer yield* so SER can manage the Effect lifecycle.`,\n\t].join(\"\\n\");\n}\n\nfunction make_bare_effect_gen_warning(\n\tfilename: string,\n\tattribute_name: string | undefined,\n\texpression_text: string,\n): string {\n\tconst location = attribute_name\n\t\t? `${attribute_name}={${expression_text}}`\n\t\t: `{${expression_text}}`;\n\tconst fixed = attribute_name\n\t\t? `${attribute_name}={yield* ${expression_text}(function* () { ... })}`\n\t\t: `{yield* ${expression_text}(function* () { ... })}`;\n\n\treturn [\n\t\t`[svelte-effect-runtime] Detected Effect.gen used as a value instead of an Effect program.`,\n\t\t`${filename}: ${location}`,\n\t\t`${expression_text} is a constructor, not the result of running a generator.`,\n\t\t`Use: ${fixed}`,\n\t].join(\"\\n\");\n}\n\nfunction make_event_callback_returns_effect_warning(\n\tfilename: string,\n\tattribute_name: string,\n\texpression_text: string,\n): string {\n\treturn [\n\t\t`[svelte-effect-runtime] Detected an event callback that returns an Effect but does not run it.`,\n\t\t`${filename}: ${attribute_name}={${expression_text}}`,\n\t\t`Svelte will call the callback and receive an Effect value, but SER will not manage it from inside the callback.`,\n\t\t`Use yield* at the event attribute boundary or explicitly run the Effect if you really want to bypass SER.`,\n\t].join(\"\\n\");\n}\n\nfunction make_event_attribute_effect_warning(\n\tfilename: string,\n\tattribute_name: string,\n\texpression_text: string,\n): string {\n\tconst fixed = `${attribute_name}={yield* ${expression_text}}`;\n\n\treturn [\n\t\t`[svelte-effect-runtime] Detected an event attribute that looks like an Effect but is not written with yield*.`,\n\t\t`${filename}: ${attribute_name}={${expression_text}}`,\n\t\t`If you are trying to use Effect in this event handler, use yield* at the beginning.`,\n\t\t`Use: ${fixed}`,\n\t].join(\"\\n\");\n}\n\nfunction make_attribute_effect_warning(\n\tfilename: string,\n\tattribute_name: string,\n\texpression_text: string,\n): string {\n\tconst fixed = `${attribute_name}={yield* ${expression_text}}`;\n\n\treturn [\n\t\t`[svelte-effect-runtime] Detected an attribute value that looks like an Effect but is not written with yield*.`,\n\t\t`${filename}: ${attribute_name}={${expression_text}}`,\n\t\t`Svelte attributes need the resolved Effect value, not the Effect object itself.`,\n\t\t`Use: ${fixed}`,\n\t].join(\"\\n\");\n}\n\nfunction make_sync_markup_effect_warning(filename: string, expression_text: string): string {\n\treturn [\n\t\t`[svelte-effect-runtime] Detected a markup expression that creates an Effect but is not written with yield*.`,\n\t\t`${filename}: {${expression_text}}`,\n\t\t`This expression will produce an Effect value, not its result.`,\n\t\t`Use yield* where Svelte expects the resolved value.`,\n\t].join(\"\\n\");\n}\n\nfunction contains_effect_reference(expression_text: string, effect_names: Set<string>): boolean {\n\tconst name_pattern = make_effect_name_pattern(effect_names);\n\tconst effect_pattern = new RegExp(\n\t\t`\\\\b(?:${name_pattern})\\\\.(?:gen|succeed|fail|try|tryPromise|promise|sync|all|void|log|runPromise|runSync|runFork)\\\\b`,\n\t);\n\n\treturn effect_pattern.test(expression_text);\n}\n\nfunction contains_effect_runner(expression_text: string, effect_names: Set<string>): boolean {\n\tconst name_pattern = make_effect_name_pattern(effect_names);\n\tconst runner_pattern = new RegExp(`\\\\b(?:${name_pattern})\\\\.run(?:Promise|Sync|Fork)\\\\b`);\n\n\treturn runner_pattern.test(expression_text);\n}\n\nfunction is_bare_effect_gen(expression_text: string, effect_names: Set<string>): boolean {\n\tconst name_pattern = make_effect_name_pattern(effect_names);\n\tconst bare_gen_pattern = new RegExp(`^(?:${name_pattern})\\\\.gen$`);\n\n\treturn bare_gen_pattern.test(expression_text);\n}\n\nfunction make_effect_name_pattern(effect_names: Set<string>): string {\n\treturn [...effect_names]\n\t\t.map(escape_regexp)\n\t\t.sort((a, b) => b.length - a.length)\n\t\t.join(\"|\");\n}\n\nfunction starts_with_yield_star(expression_text: string): boolean {\n\treturn /^yield\\s*\\*/.test(expression_text);\n}\n\nfunction contains_yield_star(expression_text: string): boolean {\n\treturn /\\byield\\s*\\*/.test(expression_text);\n}\n\nfunction is_callback_expression(expression_text: string): boolean {\n\treturn (\n\t\t/^(?:async\\s+)?(?:\\([^)]*\\)|[A-Za-z_$][\\w$]*)\\s*=>/.test(expression_text) ||\n\t\t/^(?:async\\s+)?function\\b/.test(expression_text)\n\t);\n}\n\nfunction is_event_attribute_name(name: string): boolean {\n\treturn /^on(?::[A-Za-z_$][\\w$-]*|[a-z][\\w$-]*)$/.test(name);\n}\n\nfunction find_attribute_name_before_expression(code: string, open: number): string | undefined {\n\tconst tag_start = code.lastIndexOf(\"<\", open);\n\tconst last_tag_end = code.lastIndexOf(\">\", open);\n\n\tif (tag_start === -1 || tag_start < last_tag_end) {\n\t\treturn undefined;\n\t}\n\n\tconst before_expression = code.slice(tag_start + 1, open);\n\tconst match = before_expression.match(/(?:^|\\s)([A-Za-z_$:][\\w$:-]*)\\s*=\\s*$/);\n\n\treturn match?.[1];\n}\n\nfunction is_inside_svelte_excluded_block(code: string, pos: number): boolean {\n\tconst script = find_svelte_tag_range(code, \"script\", pos);\n\tconst style = find_svelte_tag_range(code, \"style\", pos);\n\n\treturn (\n\t\t(script !== undefined && pos < script.end && pos > script.start) ||\n\t\t(style !== undefined && pos < style.end && pos > style.start)\n\t);\n}\n\nfunction find_svelte_tag_range(\n\tcode: string,\n\ttag: string,\n\tafter_pos: number,\n): { start: number; end: number } | undefined {\n\tconst pattern = new RegExp(`<${tag}\\\\b[^>]*>([\\\\s\\\\S]*?)<\\\\/${tag}\\\\s*>`, \"gi\");\n\n\tfor (const match of code.matchAll(pattern)) {\n\t\tif (match.index === undefined) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tconst end = match.index + match[0].length;\n\n\t\tif (match.index <= after_pos && after_pos < end) {\n\t\t\treturn { start: match.index, end };\n\t\t}\n\t}\n\n\treturn undefined;\n}\n\nfunction find_closing_brace(code: string, start: number): number {\n\tlet depth = 0;\n\n\tfor (let i = start; i < code.length; i += 1) {\n\t\tconst ch = code[i];\n\n\t\tif (ch === \"{\" && code[i - 1] !== \"$\") {\n\t\t\tdepth += 1;\n\t\t} else if (ch === \"}\") {\n\t\t\tif (depth === 0) {\n\t\t\t\treturn i;\n\t\t\t}\n\n\t\t\tdepth -= 1;\n\t\t} else if (ch === \"'\" || ch === '\"' || ch === \"`\") {\n\t\t\ti = skip_string(code, i, ch);\n\n\t\t\tif (i === -1) {\n\t\t\t\treturn -1;\n\t\t\t}\n\t\t} else if (ch === \"/\" && code[i + 1] === \"/\") {\n\t\t\ti = skip_line_comment(code, i);\n\t\t} else if (ch === \"/\" && code[i + 1] === \"*\") {\n\t\t\ti = skip_block_comment(code, i);\n\n\t\t\tif (i === -1) {\n\t\t\t\treturn -1;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn -1;\n}\n\nfunction skip_string(code: string, start: number, quote: string): number {\n\tfor (let i = start + 1; i < code.length; i += 1) {\n\t\tif (code[i] === \"\\\\\") {\n\t\t\ti += 1;\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (code[i] === quote) {\n\t\t\treturn i;\n\t\t}\n\t}\n\n\treturn -1;\n}\n\nfunction skip_line_comment(code: string, start: number): number {\n\tfor (let i = start + 2; i < code.length; i += 1) {\n\t\tif (code[i] === \"\\n\") {\n\t\t\treturn i;\n\t\t}\n\t}\n\n\treturn code.length;\n}\n\nfunction skip_block_comment(code: string, start: number): number {\n\tfor (let i = start + 2; i < code.length; i += 1) {\n\t\tif (code[i] === \"*\" && code[i + 1] === \"/\") {\n\t\t\treturn i + 1;\n\t\t}\n\t}\n\n\treturn -1;\n}\n\nfunction get_line_column(code: string, position: number): { line: number; column: number } {\n\tconst before = code.slice(0, position);\n\tconst lines = before.split(\"\\n\");\n\tconst line = lines.length;\n\tconst column = lines.at(-1)?.length ?? 0;\n\n\treturn { line, column };\n}\n\nfunction escape_regexp(value: string): string {\n\treturn value.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\");\n}\n","import { find_svelte_effect_diagnostics } from \"./diagnostics.ts\";\nimport type { Plugin } from \"vite\";\n\nimport MagicString from \"magic-string\";\nimport ts from \"typescript\";\n\n/**\n * Options for the {@link effect} Vite plugin.\n *\n * @since 2.0.0\n */\nexport interface EffectOptions {\n\t/** Whether to emit debug logging in the generated remote client module. */\n\tdebug?: boolean;\n}\n\ntype RemoteClientExportType =\n\t| \"query_batch\"\n\t| \"query_live\"\n\t| \"query\"\n\t| \"command\"\n\t| \"form\"\n\t| \"prerender\";\n\ninterface RemoteNamespaceImport {\n\tname: string;\n\tstatement: ts.ImportDeclaration;\n}\n\ninterface RemoteClientExport {\n\tname: string;\n\ttype: RemoteClientExportType;\n\tstatement: ts.VariableStatement;\n\tnative_call: string;\n}\n\ninterface SvelteComponentModuleFilter {\n\tset_extensions(extensions: readonly string[]): void;\n\tis_module(id: string): boolean;\n}\n\ninterface VitePluginSvelteApi {\n\toptions?: {\n\t\textensions?: readonly unknown[];\n\t};\n}\n\ntype VitePluginSvelte = Plugin & {\n\tapi?: VitePluginSvelteApi;\n};\n\ntype VitePluginSvelteWithExtensions = Plugin & {\n\tapi: {\n\t\toptions: {\n\t\t\textensions: readonly string[];\n\t\t};\n\t};\n};\n\nconst remote_client_export_types = new Set<RemoteClientExportType>([\n\t\"query_batch\",\n\t\"query_live\",\n\t\"query\",\n\t\"command\",\n\t\"form\",\n\t\"prerender\",\n]);\nconst default_svelte_component_extensions = [\".svelte\"] as const;\n\n/**\n * Vite plugin for SvelteKit. The server import plugin rewrites server-side\n * imports to the server entrypoint; the remote client plugin wraps SvelteKit's\n * generated client remote exports in Effect-returning adapters.\n *\n * @example\n * ```ts\n * import { effect } from \"svelte-effect-runtime\";\n * import { sveltekit } from \"@sveltejs/kit/vite\";\n *\n * export default defineConfig({ plugins: [effect(), sveltekit()] });\n * ```\n *\n * @since 2.0.0\n * @param options - Optional configuration.\n * @returns Vite plugins that integrate the runtime with SvelteKit.\n */\nexport function effect(options?: EffectOptions): Plugin[] {\n\tconst component_filter = make_svelte_component_module_filter();\n\n\treturn [\n\t\tmake_diagnostics_plugin(component_filter),\n\t\tmake_reserved_helper_guard_plugin(component_filter),\n\t\tmake_svelte_transform_plugin(component_filter),\n\t\tmake_server_rewrite_plugin(),\n\t\tmake_remote_client_wrapper_plugin(options),\n\t];\n}\n\nfunction make_diagnostics_plugin(component_filter: SvelteComponentModuleFilter): Plugin {\n\tconst warned_diagnostics = new Set<string>();\n\n\treturn {\n\t\tname: \"svelte-effect-runtime:diagnostics\",\n\n\t\ttransform(code: string, id: string) {\n\t\t\tif (!component_filter.is_module(id)) {\n\t\t\t\treturn undefined;\n\t\t\t}\n\n\t\t\tconst clean_id = id.split(\"?\")[0] ?? id;\n\t\t\tconst diagnostics = find_svelte_effect_diagnostics(code, clean_id);\n\n\t\t\tfor (const diagnostic of diagnostics) {\n\t\t\t\tconst diagnostic_key = [\n\t\t\t\t\tclean_id,\n\t\t\t\t\tdiagnostic.line,\n\t\t\t\t\tdiagnostic.column,\n\t\t\t\t\tdiagnostic.message,\n\t\t\t\t].join(\":\");\n\n\t\t\t\tif (warned_diagnostics.has(diagnostic_key)) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\twarned_diagnostics.add(diagnostic_key);\n\n\t\t\t\tthis.warn({\n\t\t\t\t\tid: clean_id,\n\t\t\t\t\tmessage: diagnostic.message,\n\t\t\t\t\tloc: {\n\t\t\t\t\t\tline: diagnostic.line,\n\t\t\t\t\t\tcolumn: diagnostic.column,\n\t\t\t\t\t},\n\t\t\t\t});\n\t\t\t}\n\n\t\t\treturn undefined;\n\t\t},\n\t};\n}\n\nfunction make_reserved_helper_guard_plugin(component_filter: SvelteComponentModuleFilter): Plugin {\n\treturn {\n\t\tname: \"svelte-effect-runtime:reserved-helper-guard\",\n\n\t\ttransform(code: string, id: string) {\n\t\t\tif (!component_filter.is_module(id) || !has_ser_syntax(code)) {\n\t\t\t\treturn undefined;\n\t\t\t}\n\n\t\t\tconst reserved_names = find_reserved_helper_names(code);\n\n\t\t\tif (reserved_names.length === 0) {\n\t\t\t\treturn undefined;\n\t\t\t}\n\n\t\t\tthis.warn(make_reserved_helper_warning(reserved_names));\n\n\t\t\treturn undefined;\n\t\t},\n\t};\n}\n\nfunction make_svelte_transform_plugin(component_filter: SvelteComponentModuleFilter): Plugin {\n\treturn {\n\t\tname: \"svelte-effect-runtime:svelte-transform\",\n\n\t\tconfigResolved(config) {\n\t\t\tconst extensions = find_svelte_component_extensions(config.plugins);\n\t\t\tconst conflicting_plugin_names = find_pre_transform_plugin_names(config.plugins);\n\n\t\t\tif (extensions) {\n\t\t\t\tcomponent_filter.set_extensions(extensions);\n\t\t\t}\n\n\t\t\tif (conflicting_plugin_names.length === 0) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconfig.logger.info(make_pre_transform_plugin_notice(conflicting_plugin_names));\n\t\t},\n\n\t\tasync transform(code: string, id: string, options?: { ssr?: boolean }) {\n\t\t\tif (!component_filter.is_module(id)) {\n\t\t\t\treturn undefined;\n\t\t\t}\n\n\t\t\tconst { transform_svelte_effect } = await import(\"./runtime/transform.ts\");\n\t\t\tconst result = transform_svelte_effect(code, id, {\n\t\t\t\ttarget: options?.ssr ? \"server\" : \"client\",\n\t\t\t});\n\n\t\t\tif (result.code === code) {\n\t\t\t\treturn undefined;\n\t\t\t}\n\n\t\t\treturn { code: result.code, map: null };\n\t\t},\n\t};\n}\n\nfunction make_svelte_component_module_filter(): SvelteComponentModuleFilter {\n\tlet extensions: readonly string[] = default_svelte_component_extensions;\n\n\treturn {\n\t\tset_extensions(next_extensions) {\n\t\t\tconst normalized_extensions = normalize_svelte_component_extensions(next_extensions);\n\n\t\t\tif (normalized_extensions.length === 0) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\textensions = normalized_extensions;\n\t\t},\n\n\t\tis_module(id) {\n\t\t\treturn is_svelte_component_module(id, extensions);\n\t\t},\n\t};\n}\n\nfunction normalize_svelte_component_extensions(extensions: readonly string[]): string[] {\n\tconst normalized_extensions = extensions\n\t\t.filter((extension) => extension.length > 0)\n\t\t.map((extension) => (extension.startsWith(\".\") ? extension : `.${extension}`));\n\n\treturn [...new Set(normalized_extensions)];\n}\n\nfunction find_svelte_component_extensions(\n\tplugins: readonly Plugin[],\n): readonly string[] | undefined {\n\tconst svelte_plugin = plugins.find(has_svelte_component_extensions);\n\n\treturn svelte_plugin?.api?.options?.extensions;\n}\n\nfunction has_svelte_component_extensions(plugin: Plugin): plugin is VitePluginSvelteWithExtensions {\n\tconst candidate = plugin as VitePluginSvelte;\n\tconst extensions = candidate.api?.options?.extensions;\n\n\tif (!plugin.name.startsWith(\"vite-plugin-svelte\")) {\n\t\treturn false;\n\t}\n\n\treturn (\n\t\tArray.isArray(extensions) && extensions.every((extension) => typeof extension === \"string\")\n\t);\n}\n\nfunction find_pre_transform_plugin_names(plugins: readonly Plugin[]): string[] {\n\treturn plugins\n\t\t.filter(\n\t\t\t(plugin) =>\n\t\t\t\t!plugin.name.startsWith(\"svelte-effect-runtime:\") &&\n\t\t\t\t!is_known_framework_pre_transform_plugin(plugin.name) &&\n\t\t\t\thas_pre_transform_priority(plugin),\n\t\t)\n\t\t.map((plugin) => plugin.name);\n}\n\nconst ansi_reset = \"\\x1b[0m\";\nconst ansi_light_green = \"\\x1b[92m\";\n\nfunction make_pre_transform_plugin_notice(plugin_names: readonly string[]): string {\n\tconst formatted_plugins = plugin_names.map((plugin_name) => ` - ${plugin_name}`).join(\"\\n\");\n\n\treturn [\n\t\t`${ansi_light_green}[svelte-effect-runtime]${ansi_reset} Svelte Effect Runtime noticed possible Vite plugin ordering conflicts.`,\n\t\t\"\",\n\t\t\"These plugins run before normal Svelte component transforms:\",\n\t\tformatted_plugins,\n\t\t\"\",\n\t\t\"This is usually fine, but if you see Svelte parser errors around <script effect>\",\n\t\t\"or yield* in components, one of those plugins may be reading component files before\",\n\t\t\"SER has lowered its syntax.\",\n\t].join(\"\\n\");\n}\n\nfunction is_known_framework_pre_transform_plugin(name: string): boolean {\n\treturn name.startsWith(\"vite:\") || name === \"vite-plugin-svelte:preprocess\";\n}\n\nfunction has_pre_transform_priority(plugin: Plugin): boolean {\n\tif (plugin.enforce === \"pre\" && plugin.transform) {\n\t\treturn true;\n\t}\n\n\tif (\n\t\ttypeof plugin.transform === \"object\" &&\n\t\tplugin.transform !== null &&\n\t\t\"order\" in plugin.transform &&\n\t\tplugin.transform.order === \"pre\"\n\t) {\n\t\treturn true;\n\t}\n\n\treturn false;\n}\n\nfunction make_server_rewrite_plugin(): Plugin {\n\treturn {\n\t\tname: \"svelte-effect-runtime:server-imports\",\n\n\t\tconfig() {\n\t\t\treturn { optimizeDeps: { exclude: [\"svelte-effect-runtime\"] } };\n\t\t},\n\n\t\ttransform(code: string, id: string) {\n\t\t\tif (!is_server_runtime_module(id)) {\n\t\t\t\treturn undefined;\n\t\t\t}\n\n\t\t\tconst rewritten = code\n\t\t\t\t.replace(\n\t\t\t\t\t/from\\s+[\"']svelte-effect-runtime[\"']/g,\n\t\t\t\t\t`from \"svelte-effect-runtime/server\"`,\n\t\t\t\t)\n\t\t\t\t.replace(\n\t\t\t\t\t/from\\s+[\"']svelte-effect-runtime\\/internal\\/generators[\"']/g,\n\t\t\t\t\t`from \"svelte-effect-runtime/server\"`,\n\t\t\t\t);\n\n\t\t\tif (rewritten === code) {\n\t\t\t\treturn undefined;\n\t\t\t}\n\n\t\t\treturn { code: rewritten, map: null };\n\t\t},\n\t};\n}\n\nfunction make_remote_client_wrapper_plugin(options?: EffectOptions): Plugin {\n\treturn {\n\t\tname: \"svelte-effect-runtime:remote-client\",\n\t\tenforce: \"post\",\n\n\t\tconfig() {\n\t\t\treturn { ssr: { noExternal: [\"svelte-effect-runtime\"] } };\n\t\t},\n\n\t\tconfigResolved(config) {\n\t\t\tconst no_external = config.ssr.noExternal;\n\t\t\tconst runtime_package = \"svelte-effect-runtime\";\n\n\t\t\tif (no_external === true) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (Array.isArray(no_external)) {\n\t\t\t\tconst has_runtime_package = no_external.some((entry) => entry === runtime_package);\n\n\t\t\t\tif (!has_runtime_package) {\n\t\t\t\t\tno_external.push(runtime_package);\n\t\t\t\t}\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconfig.ssr.noExternal = [no_external, runtime_package].filter(\n\t\t\t\t(value): value is string | RegExp => value !== undefined,\n\t\t\t);\n\t\t},\n\n\t\ttransform(code: string, id: string) {\n\t\t\tif (!is_remote_module(id) || !code.includes(\"__sveltekit/remote\")) {\n\t\t\t\treturn undefined;\n\t\t\t}\n\n\t\t\tconst rewritten = rewrite_remote_client_exports(code, options);\n\n\t\t\tif (rewritten === code) {\n\t\t\t\treturn undefined;\n\t\t\t}\n\n\t\t\treturn { code: rewritten, map: null };\n\t\t},\n\t};\n}\n\nfunction is_server_runtime_module(id: string): boolean {\n\tconst [filename] = id.split(\"?\", 2);\n\n\treturn (\n\t\t/\\.(server|remote)(?:\\.[cm])?\\.[jt]s$/.test(filename) ||\n\t\t/(?:^|[\\\\/])hooks\\.server(?:\\.[cm])?\\.[jt]s$/.test(filename)\n\t);\n}\n\nfunction is_remote_module(id: string): boolean {\n\treturn /\\.(remote|remote\\.[cm]?)\\.[jt]s(?:\\?.*)?$/.test(id) || id.includes(\".remote.\");\n}\n\nfunction is_svelte_component_module(id: string, extensions: readonly string[]): boolean {\n\tconst [filename, query = \"\"] = id.split(\"?\", 2);\n\n\tif (!extensions.some((extension) => filename.endsWith(extension))) {\n\t\treturn false;\n\t}\n\n\tif (query.length === 0) {\n\t\treturn true;\n\t}\n\n\tconst params = new URLSearchParams(query);\n\tconst allowed_params = [\"t\", \"v\"];\n\n\treturn [...params.keys()].every((key) => allowed_params.includes(key));\n}\n\nfunction has_ser_syntax(code: string): boolean {\n\treturn /\\byield\\s*\\*/.test(code) || /<script\\b[^>]*\\beffect(?:[\\s=>]|$)/.test(code);\n}\n\nfunction find_reserved_helper_names(code: string): string[] {\n\tconst script_segments = [...code.matchAll(/<script\\b[^>]*>([\\s\\S]*?)<\\/script\\s*>/gi)].map(\n\t\t(match) => match[1] ?? \"\",\n\t);\n\tconst markup_segments = [...code.matchAll(/\\{[^{}]*(?:Dispatcher|Code)[^{}]*\\}/g)].map(\n\t\t(match) => match[0],\n\t);\n\tconst search_segments = [...script_segments, ...markup_segments];\n\n\treturn [\"Dispatcher\", \"Code\"].filter((name) =>\n\t\tsearch_segments.some((segment) => new RegExp(`\\\\b${name}\\\\b`).test(segment)),\n\t);\n}\n\nfunction make_reserved_helper_warning(names: string[]): string {\n\tconst quoted_names = names.map((name) => `\\`${name}\\``);\n\tconst subject =\n\t\tquoted_names.length === 1\n\t\t\t? quoted_names[0]\n\t\t\t: `${quoted_names.slice(0, -1).join(\", \")} and ${\n\t\t\t\t\tquoted_names[quoted_names.length - 1]\n\t\t\t\t}`;\n\tconst verb = names.length === 1 ? \"is\" : \"are\";\n\n\treturn [\n\t\t`[svelte-effect-runtime] ${subject} ${verb} reserved for generated markup helpers.`,\n\t\t`Rename or alias local bindings that use ${subject} before using SER syntax in this component.`,\n\t].join(\" \");\n}\n\n/**\n * Rewrites SvelteKit's generated client remote module from:\n *\n * `export const get_post = __remote.query(\"hash/get_post\")`\n *\n * into an Effect-aware wrapper around the same native function.\n *\n * @since 2.0.0\n * @param code - The generated client remote module code.\n * @param options - Optional plugin options.\n * @returns The rewritten module code.\n * @internal\n */\nexport function rewrite_remote_client_exports(code: string, options?: EffectOptions): string {\n\tconst source_file = ts.createSourceFile(\n\t\t\"sveltekit-remote-client.ts\",\n\t\tcode,\n\t\tts.ScriptTarget.Latest,\n\t\ttrue,\n\t\tts.ScriptKind.TS,\n\t);\n\tconst namespace_import = find_remote_namespace_import(source_file);\n\n\tif (!namespace_import) {\n\t\treturn code;\n\t}\n\n\tconst remote_exports = collect_remote_client_exports(source_file, code, namespace_import.name);\n\n\tif (remote_exports.length === 0) {\n\t\treturn code;\n\t}\n\n\tconst magic = new MagicString(code);\n\tconst imports = [\n\t\t`import { app_dir, base } from \"$app/paths/internal/client\";`,\n\t\t`import { create_remote_query_adapter, create_remote_live_query_adapter, create_remote_command_adapter, create_remote_form_adapter } from \"svelte-effect-runtime/internal/remote-client\";`,\n\t].join(\"\\n\");\n\n\tconst helpers = [\n\t\t`const __SER___remote_base = \\`\\${base}/\\${app_dir}/remote\\`;`,\n\t\t`function __SER___decode_payload(value) { return value; }`,\n\t].join(\"\\n\");\n\n\tconst debug_line = options?.debug ? `console.log(\"[ser] remote client wrappers loaded\");` : \"\";\n\n\tconst injected = [imports, helpers, debug_line].filter(Boolean).join(\"\\n\");\n\n\tmagic.appendRight(namespace_import.statement.end, `\\n${injected}`);\n\n\tfor (const remote_export of remote_exports) {\n\t\tmagic.overwrite(\n\t\t\tremote_export.statement.getStart(source_file),\n\t\t\tremote_export.statement.end,\n\t\t\tmake_remote_export(remote_export.name, remote_export.type, remote_export.native_call),\n\t\t);\n\t}\n\n\treturn magic.toString();\n}\n\nfunction make_remote_export(\n\tname: string,\n\ttype: RemoteClientExportType,\n\tnative_call: string,\n): string {\n\tif (type === \"command\") {\n\t\treturn `export const ${name} = create_remote_command_adapter(${native_call}, __SER___decode_payload);`;\n\t}\n\n\tif (type === \"form\") {\n\t\treturn `export const ${name} = create_remote_form_adapter(${native_call}, __SER___decode_payload, __SER___remote_base);`;\n\t}\n\n\tif (type === \"query_live\") {\n\t\treturn `export const ${name} = create_remote_live_query_adapter(${native_call}, __SER___decode_payload);`;\n\t}\n\n\treturn `export const ${name} = create_remote_query_adapter(${native_call}, __SER___decode_payload);`;\n}\n\nfunction find_remote_namespace_import(\n\tsource_file: ts.SourceFile,\n): RemoteNamespaceImport | undefined {\n\tfor (const statement of source_file.statements) {\n\t\tif (!ts.isImportDeclaration(statement)) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tconst namespace_import = get_remote_namespace_import(statement);\n\n\t\tif (namespace_import) {\n\t\t\treturn namespace_import;\n\t\t}\n\t}\n\n\treturn undefined;\n}\n\nfunction get_remote_namespace_import(\n\tstatement: ts.ImportDeclaration,\n): RemoteNamespaceImport | undefined {\n\tif (\n\t\t!ts.isStringLiteral(statement.moduleSpecifier) ||\n\t\tstatement.moduleSpecifier.text !== \"__sveltekit/remote\"\n\t) {\n\t\treturn undefined;\n\t}\n\n\tconst import_clause = statement.importClause;\n\tconst bindings = import_clause?.namedBindings;\n\n\tif (import_clause?.isTypeOnly || !bindings || !ts.isNamespaceImport(bindings)) {\n\t\treturn undefined;\n\t}\n\n\treturn {\n\t\tname: bindings.name.text,\n\t\tstatement,\n\t};\n}\n\nfunction collect_remote_client_exports(\n\tsource_file: ts.SourceFile,\n\tcode: string,\n\tnamespace: string,\n): RemoteClientExport[] {\n\treturn source_file.statements.flatMap((statement) =>\n\t\tcollect_remote_client_export(source_file, code, namespace, statement),\n\t);\n}\n\nfunction collect_remote_client_export(\n\tsource_file: ts.SourceFile,\n\tcode: string,\n\tnamespace: string,\n\tstatement: ts.Statement,\n): RemoteClientExport[] {\n\tif (\n\t\t!ts.isVariableStatement(statement) ||\n\t\t!is_export_statement(statement) ||\n\t\t!is_const_declaration_list(statement.declarationList) ||\n\t\tstatement.declarationList.declarations.length !== 1\n\t) {\n\t\treturn [];\n\t}\n\n\tconst declaration = statement.declarationList.declarations[0];\n\tconst initializer = declaration.initializer;\n\n\tif (!ts.isIdentifier(declaration.name) || !initializer) {\n\t\treturn [];\n\t}\n\n\tconst type = get_remote_client_export_type(initializer, namespace);\n\n\tif (!type) {\n\t\treturn [];\n\t}\n\n\treturn [\n\t\t{\n\t\t\tname: declaration.name.text,\n\t\t\ttype,\n\t\t\tstatement,\n\t\t\tnative_call: code.slice(initializer.getStart(source_file), initializer.end),\n\t\t},\n\t];\n}\n\nfunction get_remote_client_export_type(\n\tinitializer: ts.Expression,\n\tnamespace: string,\n): RemoteClientExportType | undefined {\n\tif (!ts.isCallExpression(initializer)) {\n\t\treturn undefined;\n\t}\n\n\tconst expression = initializer.expression;\n\n\tif (!ts.isPropertyAccessExpression(expression)) {\n\t\treturn undefined;\n\t}\n\n\tif (!ts.isIdentifier(expression.expression) || expression.expression.text !== namespace) {\n\t\treturn undefined;\n\t}\n\n\tconst type = expression.name.text;\n\n\tif (!is_remote_client_export_type(type)) {\n\t\treturn undefined;\n\t}\n\n\treturn type;\n}\n\nfunction is_remote_client_export_type(value: string): value is RemoteClientExportType {\n\treturn remote_client_export_types.has(value as RemoteClientExportType);\n}\n\nfunction is_export_statement(statement: ts.Statement): boolean {\n\tconst modifiers = ts.canHaveModifiers(statement) ? ts.getModifiers(statement) : undefined;\n\n\treturn modifiers?.some((modifier) => modifier.kind === ts.SyntaxKind.ExportKeyword) ?? false;\n}\n\nfunction is_const_declaration_list(declaration_list: ts.VariableDeclarationList): boolean {\n\treturn (ts.getCombinedNodeFlags(declaration_list) & ts.NodeFlags.Const) !== 0;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAgCA,SAAgB,+BACf,MACA,UAC2D;CAC3D,MAAM,eAAe,wBAAwB,IAAI;CAGjD,OAFoB,wBAAwB,IAE3B,CAAC,CAAC,SAAS,eAC3B,4BAA4B,MAAM,UAAU,cAAc,UAAU,CACrE;AACD;AAEA,SAAS,wBAAwB,MAA2B;CAC3D,MAAM,wBAAQ,IAAI,IAAY,CAAC,QAAQ,CAAC;CAGxC,KAAK,MAAM,gBAAgB,KAAK,SAAS,0CAAc,GAAG;EACzD,MAAM,SAAS,aAAa;EAG5B,KAAK,MAAM,gBAAgB,OAAO,SAAS,yDAAc,GAAG;GAC3D,MAAM,sBAAsB,aAAa,OAAO,KAAA;GAChD,MAAM,aAAa,aAAa,EAAE,CAAC,MAAM,GAAG;GAE5C,IAAI,qBACH;GAGD,KAAK,MAAM,aAAa,YAAY;IACnC,MAAM,aAAa,+BAA+B,SAAS;IAE3D,IAAI,YACH,MAAM,IAAI,UAAU;GAEtB;EACD;CACD;CAEA,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UAAU,gBAAgB,aAAa,WAAW,GAElD,OAAO,CAAC;CAGT,MAAM,cAAc,UAAU,gBAAgB,aAAa;CAC3D,MAAM,cAAc,YAAY;CAEhC,IAAI,CAAC,GAAG,aAAa,YAAY,IAAI,KAAK,CAAC,aAC1C,OAAO,CAAC;CAGT,MAAM,OAAO,8BAA8B,aAAa,SAAS;CAEjE,IAAI,CAAC,MACJ,OAAO,CAAC;CAGT,OAAO,CACN;EACC,MAAM,YAAY,KAAK;EACvB;EACA;EACA,aAAa,KAAK,MAAM,YAAY,SAAS,WAAW,GAAG,YAAY,GAAG;CAC3E,CACD;AACD;AAEA,SAAS,8BACR,aACA,WACqC;CACrC,IAAI,CAAC,GAAG,iBAAiB,WAAW,GACnC;CAGD,MAAM,aAAa,YAAY;CAE/B,IAAI,CAAC,GAAG,2BAA2B,UAAU,GAC5C;CAGD,IAAI,CAAC,GAAG,aAAa,WAAW,UAAU,KAAK,WAAW,WAAW,SAAS,WAC7E;CAGD,MAAM,OAAO,WAAW,KAAK;CAE7B,IAAI,CAAC,6BAA6B,IAAI,GACrC;CAGD,OAAO;AACR;AAEA,SAAS,6BAA6B,OAAgD;CACrF,OAAO,2BAA2B,IAAI,KAA+B;AACtE;AAEA,SAAS,oBAAoB,WAAkC;CAG9D,QAFkB,GAAG,iBAAiB,SAAS,IAAI,GAAG,aAAa,SAAS,IAAI,KAAA,EAAA,EAE9D,MAAM,aAAa,SAAS,SAAS,GAAG,WAAW,aAAa,KAAK;AACxF;AAEA,SAAS,0BAA0B,kBAAuD;CACzF,QAAQ,GAAG,qBAAqB,gBAAgB,IAAI,GAAG,UAAU,WAAW;AAC7E"}
|
package/.dist/detect.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"detect.js","names":[],"sources":["../../modules/svelte-effect-runtime/src/detect.ts"],"sourcesContent":["import ts from \"typescript\";\n\n/**\n * Returns `true` when the node tree contains a `yield*` expression that is\n * not inside any function boundary (arrow function, function declaration,\n * function expression, method).\n *\n * @example\n * ```ts\n * const sf = ts.createSourceFile(\"test.ts\", \"yield* foo()\", ...);\n * contains_top_level_yield_star(sf.statements[0]); // true\n * ```\n *\n * @since 2.0.0\n * @param node - The root node to search from.\n * @returns Whether a top-level yield* expression was found.\n */\nexport function contains_top_level_yield_star(node: ts.Node): boolean {\n\
|
|
1
|
+
{"version":3,"file":"detect.js","names":[],"sources":["../../modules/svelte-effect-runtime/src/detect.ts"],"sourcesContent":["import ts from \"typescript\";\n\n/**\n * Returns `true` when the node tree contains a `yield*` expression that is\n * not inside any function boundary (arrow function, function declaration,\n * function expression, method).\n *\n * @example\n * ```ts\n * const sf = ts.createSourceFile(\"test.ts\", \"yield* foo()\", ...);\n * contains_top_level_yield_star(sf.statements[0]); // true\n * ```\n *\n * @since 2.0.0\n * @param node - The root node to search from.\n * @returns Whether a top-level yield* expression was found.\n */\nexport function contains_top_level_yield_star(node: ts.Node): boolean {\n\tif (is_function_boundary(node)) {\n\t\treturn false;\n\t}\n\n\tif (is_yield_star_expression(node)) {\n\t\treturn true;\n\t}\n\n\treturn node.getChildren().some((child) => contains_top_level_yield_star(child));\n}\n\n/**\n * Returns `true` when the node is a function-like boundary that owns its\n * own yield/yield* semantics. A function boundary includes arrow functions,\n * function declarations, function expressions, methods, get accessors, and\n * set accessors.\n *\n * @example\n * ```ts\n * const stmt = parseStatement(\"function foo() {}\");\n * is_function_boundary(stmt); // true\n * ```\n *\n * @since 2.0.0\n * @param node - The node to check.\n * @returns Whether the node is a function boundary.\n */\nexport function is_function_boundary(node: ts.Node): boolean {\n\treturn (\n\t\tts.isArrowFunction(node) ||\n\t\tts.isFunctionDeclaration(node) ||\n\t\tts.isFunctionExpression(node) ||\n\t\tts.isMethodDeclaration(node) ||\n\t\tts.isGetAccessorDeclaration(node) ||\n\t\tts.isSetAccessorDeclaration(node)\n\t);\n}\n\n/**\n * Returns `true` when the node is a binary expression shaped like\n * `yield * operand` — a yield* delegate expression in TypeScript's AST.\n *\n * @since 2.0.0\n * @param node - The node to check.\n * @returns Whether the node is a `yield*` expression.\n */\nfunction is_yield_star_expression(node: ts.Node): boolean {\n\treturn (\n\t\tts.isBinaryExpression(node) &&\n\t\tnode.operatorToken.kind === ts.SyntaxKind.AsteriskToken &&\n\t\tts.isIdentifier(node.left) &&\n\t\tnode.left.text === \"yield\"\n\t);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAiBA,SAAgB,8BAA8B,MAAwB;CACrE,IAAI,qBAAqB,IAAI,GAC5B,OAAO;CAGR,IAAI,yBAAyB,IAAI,GAChC,OAAO;CAGR,OAAO,KAAK,YAAY,CAAC,CAAC,MAAM,UAAU,8BAA8B,KAAK,CAAC;AAC/E;;;;;;;;;;;;;;;;;AAkBA,SAAgB,qBAAqB,MAAwB;CAC5D,OACC,GAAG,gBAAgB,IAAI,KACvB,GAAG,sBAAsB,IAAI,KAC7B,GAAG,qBAAqB,IAAI,KAC5B,GAAG,oBAAoB,IAAI,KAC3B,GAAG,yBAAyB,IAAI,KAChC,GAAG,yBAAyB,IAAI;AAElC;;;;;;;;;AAUA,SAAS,yBAAyB,MAAwB;CACzD,OACC,GAAG,mBAAmB,IAAI,KAC1B,KAAK,cAAc,SAAS,GAAG,WAAW,iBAC1C,GAAG,aAAa,KAAK,IAAI,KACzB,KAAK,KAAK,SAAS;AAErB"}
|
package/.dist/dispatcher.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { Code, Dispatcher, get_dispatcher, reset_dispatcher
|
|
1
|
+
export { Code, Dispatcher, get_dispatcher, reset_dispatcher } from "./dispatcher/index.js";
|
|
2
2
|
export type { DispatcherEvent, Dispose, MarkupPromiseEvent, MarkupPromiseOptions, MarkupRunEvent, MarkupValueEvent, PromiseOptions, ValueOptions, } from "./dispatcher/types.js";
|
package/.dist/dispatcher.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as Code, n as get_dispatcher, r as reset_dispatcher, t as Dispatcher } from "./chunks/dispatcher-
|
|
1
|
+
import { i as Code, n as get_dispatcher, r as reset_dispatcher, t as Dispatcher } from "./chunks/dispatcher-pHH4JcFR.js";
|
|
2
2
|
export { Code, Dispatcher, get_dispatcher, reset_dispatcher };
|
package/.dist/errors.d.ts
CHANGED
|
@@ -65,7 +65,7 @@ export declare class PreprocessError extends RuntimeError {
|
|
|
65
65
|
*
|
|
66
66
|
* @since 2.4.0
|
|
67
67
|
* @param plugin_names - Names of Vite plugins that declare pre-transform
|
|
68
|
-
* priority and may parse raw
|
|
68
|
+
* priority and may parse raw component files before SER lowers them.
|
|
69
69
|
* @returns A runtime-authored Error describing the possible plugin ordering
|
|
70
70
|
* conflict.
|
|
71
71
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { i as Code } from "../chunks/dispatcher-
|
|
2
|
-
import { n as get_dispatcher, t as Dispatcher } from "../chunks/dispatcher-
|
|
1
|
+
import { i as Code } from "../chunks/dispatcher-pHH4JcFR.js";
|
|
2
|
+
import { n as get_dispatcher, t as Dispatcher } from "../chunks/dispatcher-LtvFKYUp.js";
|
|
3
3
|
import { value } from "../markup/value.js";
|
|
4
4
|
import { promise } from "../markup/promise.js";
|
|
5
5
|
import { run } from "../markup/run.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as create_remote_command_adapter, n as create_remote_query_adapter, r as create_remote_form_adapter, t as create_remote_live_query_adapter } from "../chunks/client-
|
|
1
|
+
import { i as create_remote_command_adapter, n as create_remote_query_adapter, r as create_remote_form_adapter, t as create_remote_live_query_adapter } from "../chunks/client-CsVu54pU.js";
|
|
2
2
|
export { create_remote_command_adapter, create_remote_form_adapter, create_remote_live_query_adapter, create_remote_query_adapter };
|
package/.dist/markup/promise.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"promise.js","names":[],"sources":["../../../modules/svelte-effect-runtime/src/markup/promise.ts"],"sourcesContent":["import { get_dispatcher } from \"$/generated/dispatcher.ts\";\nimport type { Effect } from \"effect\";\n\n/**\n * Options for markup promise behavior during server rendering.\n *\n * @since 2.4.0\n */\ninterface MarkupPromiseOptions {\n
|
|
1
|
+
{"version":3,"file":"promise.js","names":[],"sources":["../../../modules/svelte-effect-runtime/src/markup/promise.ts"],"sourcesContent":["import { get_dispatcher } from \"$/generated/dispatcher.ts\";\nimport type { Effect } from \"effect\";\n\n/**\n * Options for markup promise behavior during server rendering.\n *\n * @since 2.4.0\n */\ninterface MarkupPromiseOptions {\n\t/** Keep the SSR promise pending so Svelte renders an await block fallback. */\n\tssr?: \"pending\";\n}\n\n/**\n * Runtime helper emitted by the markup transform for\n * `{#await yield* expr}` blocks. Delegates to the dispatcher's\n * promise mechanism. During SSR it can return a fallback promise without\n * starting the dispatcher.\n *\n * @since 2.0.0\n * @param id - Stable identifier generated from the expression's source\n * position, used for cache lookups.\n * @param deps - Array of reactive dependencies.\n * @param factory - Generator function that yields the effect to run.\n * @param ssr_fallback - Value to resolve during SSR when the helper is used\n * from an awaited expression outside a Svelte await block.\n * @param options - Optional SSR behavior for contexts such as await blocks\n * that should render pending UI.\n * @returns A Promise that resolves with the effect's result.\n */\nexport function promise<A, E, R>(\n\tid: string,\n\tdeps: readonly unknown[],\n\tfactory: () => Effect.gen.Return<A, E, R>,\n\tssr_fallback?: A,\n\toptions?: MarkupPromiseOptions,\n): Promise<A> {\n\tif (is_server_render()) {\n\t\tif (options?.ssr === \"pending\") {\n\t\t\treturn new Promise<A>(() => {});\n\t\t}\n\n\t\tif (arguments.length >= 4) {\n\t\t\treturn Promise.resolve(ssr_fallback as A);\n\t\t}\n\t}\n\n\treturn get_dispatcher().promise({ id, deps, factory });\n}\n\nfunction is_server_render(): boolean {\n\treturn typeof document === \"undefined\";\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AA8BA,SAAgB,QACf,IACA,MACA,SACA,cACA,SACa;CACb,IAAI,iBAAiB,GAAG;EACvB,IAAI,SAAS,QAAQ,WACpB,OAAO,IAAI,cAAiB,CAAC,CAAC;EAG/B,IAAI,UAAU,UAAU,GACvB,OAAO,QAAQ,QAAQ,YAAiB;CAE1C;CAEA,OAAO,eAAe,CAAC,CAAC,QAAQ;EAAE;EAAI;EAAM;CAAQ,CAAC;AACtD;AAEA,SAAS,mBAA4B;CACpC,OAAO,OAAO,aAAa;AAC5B"}
|
package/.dist/markup/run.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as get_dispatcher } from "../chunks/dispatcher-
|
|
1
|
+
import { n as get_dispatcher } from "../chunks/dispatcher-LtvFKYUp.js";
|
|
2
2
|
import { Effect } from "effect";
|
|
3
3
|
//#region src/markup/run.ts
|
|
4
4
|
/**
|
|
@@ -12,8 +12,8 @@ import { Effect } from "effect";
|
|
|
12
12
|
* @returns A Promise that resolves or rejects when the effect completes.
|
|
13
13
|
*/
|
|
14
14
|
function run(factory) {
|
|
15
|
-
const
|
|
16
|
-
return get_dispatcher().run(
|
|
15
|
+
const Program = Effect.gen(factory);
|
|
16
|
+
return get_dispatcher().run(Program);
|
|
17
17
|
}
|
|
18
18
|
//#endregion
|
|
19
19
|
export { run };
|
package/.dist/markup/run.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run.js","names":[],"sources":["../../../modules/svelte-effect-runtime/src/markup/run.ts"],"sourcesContent":["import { get_dispatcher } from \"$/generated/dispatcher.ts\";\nimport { Effect } from \"effect\";\n\n/**\n * Runtime helper emitted by the markup transform for inline event\n * handlers containing `yield*`. Wraps the user's generator in an\n * `Effect.gen` and delegates to the dispatcher's fire-and-forget\n * mechanism.\n *\n * @since 2.0.0\n * @param factory - Generator function that yields the effect to run.\n * @returns A Promise that resolves or rejects when the effect completes.\n */\nexport function run<A, E, R>(
|
|
1
|
+
{"version":3,"file":"run.js","names":[],"sources":["../../../modules/svelte-effect-runtime/src/markup/run.ts"],"sourcesContent":["import { get_dispatcher } from \"$/generated/dispatcher.ts\";\nimport { Effect } from \"effect\";\n\n/**\n * Runtime helper emitted by the markup transform for inline event\n * handlers containing `yield*`. Wraps the user's generator in an\n * `Effect.gen` and delegates to the dispatcher's fire-and-forget\n * mechanism.\n *\n * @since 2.0.0\n * @param factory - Generator function that yields the effect to run.\n * @returns A Promise that resolves or rejects when the effect completes.\n */\nexport function run<A, E, R>(factory: () => Effect.gen.Return<A, E, R>): Promise<A> {\n\tconst Program = Effect.gen(factory);\n\n\treturn get_dispatcher().run(Program);\n}\n"],"mappings":";;;;;;;;;;;;;AAaA,SAAgB,IAAa,SAAuD;CACnF,MAAM,UAAU,OAAO,IAAI,OAAO;CAElC,OAAO,eAAe,CAAC,CAAC,IAAI,OAAO;AACpC"}
|
|
@@ -10,6 +10,14 @@ export type { MarkupRelocation, MarkupTransformOptions, MarkupTransformResult, M
|
|
|
10
10
|
* context for each placeholder (plain expression, #each, #await, event
|
|
11
11
|
* handler, etc.).
|
|
12
12
|
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```ts
|
|
15
|
+
* const result = transform_markup_effect(
|
|
16
|
+
* "<button onclick={yield* save()}>Save</button>",
|
|
17
|
+
* "SaveButton.svelte",
|
|
18
|
+
* );
|
|
19
|
+
* ```
|
|
20
|
+
*
|
|
13
21
|
* @since 2.0.0
|
|
14
22
|
* @param content - The raw `.svelte` file content.
|
|
15
23
|
* @param filename - The source filename, used in error messages.
|
|
@@ -3,6 +3,26 @@ interface SanitizeResult {
|
|
|
3
3
|
code: string;
|
|
4
4
|
candidates: MarkupCandidate[];
|
|
5
5
|
}
|
|
6
|
+
/**
|
|
7
|
+
* Replaces markup `yield*` expressions with placeholders before Svelte parses
|
|
8
|
+
* the component.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```ts
|
|
12
|
+
* const sanitized = sanitize_markup(
|
|
13
|
+
* `<p>{yield* loadLabel()}</p>`,
|
|
14
|
+
* "Label.svelte",
|
|
15
|
+
* );
|
|
16
|
+
* ```
|
|
17
|
+
*
|
|
18
|
+
* @since 2.0.0
|
|
19
|
+
* @param content - Raw Svelte component source to scan for effectful markup
|
|
20
|
+
* expressions.
|
|
21
|
+
* @param filename - Source filename used when validation errors need to point
|
|
22
|
+
* back to the component being transformed.
|
|
23
|
+
* @returns Sanitized source plus placeholder candidates that should be lowered
|
|
24
|
+
* after Svelte classifies their markup positions.
|
|
25
|
+
*/
|
|
6
26
|
export declare function sanitize_markup(content: string, filename: string): SanitizeResult;
|
|
7
27
|
export {};
|
|
8
28
|
/** Free identifier collection helpers for generated closures. */
|
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Result of the markup transform pass.
|
|
3
3
|
*
|
|
4
|
+
* @example
|
|
5
|
+
* ```ts
|
|
6
|
+
* const result: MarkupTransformResult = {
|
|
7
|
+
* code: "<p>{__SER___value}</p>",
|
|
8
|
+
* has_yield: true,
|
|
9
|
+
* };
|
|
10
|
+
* ```
|
|
11
|
+
*
|
|
4
12
|
* @since 2.0.0
|
|
5
13
|
*/
|
|
6
14
|
export interface MarkupTransformResult {
|
|
@@ -38,7 +46,21 @@ export interface MarkupTransformOptions {
|
|
|
38
46
|
/** Legacy emission target retained for compatibility with older callers. */
|
|
39
47
|
target?: MarkupTransformTarget;
|
|
40
48
|
}
|
|
41
|
-
/**
|
|
49
|
+
/**
|
|
50
|
+
* Offset mapping between original markup and generated helper code.
|
|
51
|
+
*
|
|
52
|
+
* @example
|
|
53
|
+
* ```ts
|
|
54
|
+
* const relocation: MarkupRelocation = {
|
|
55
|
+
* originalStart: 4,
|
|
56
|
+
* originalEnd: 17,
|
|
57
|
+
* generatedStart: 32,
|
|
58
|
+
* generatedEnd: 45,
|
|
59
|
+
* };
|
|
60
|
+
* ```
|
|
61
|
+
*
|
|
62
|
+
* @since 3.2.3
|
|
63
|
+
*/
|
|
42
64
|
export interface MarkupRelocation {
|
|
43
65
|
/** Start offset in the original source. */
|
|
44
66
|
originalStart: number;
|
|
@@ -49,7 +71,23 @@ export interface MarkupRelocation {
|
|
|
49
71
|
/** End offset in the transformed source. */
|
|
50
72
|
generatedEnd: number;
|
|
51
73
|
}
|
|
52
|
-
/**
|
|
74
|
+
/**
|
|
75
|
+
* Describes a brace expression that contains `yield*` and needs lowering.
|
|
76
|
+
*
|
|
77
|
+
* @example
|
|
78
|
+
* ```ts
|
|
79
|
+
* const candidate: MarkupCandidate = {
|
|
80
|
+
* placeholder: "__SER___0",
|
|
81
|
+
* start: 4,
|
|
82
|
+
* end: 19,
|
|
83
|
+
* expr_text: "yield* load()",
|
|
84
|
+
* filename: "App.svelte",
|
|
85
|
+
* key: "plain",
|
|
86
|
+
* };
|
|
87
|
+
* ```
|
|
88
|
+
*
|
|
89
|
+
* @since 2.0.0
|
|
90
|
+
*/
|
|
53
91
|
export interface MarkupCandidate {
|
|
54
92
|
/** The placeholder identifier injected into the sanitized markup. */
|
|
55
93
|
placeholder: string;
|
|
@@ -64,7 +102,31 @@ export interface MarkupCandidate {
|
|
|
64
102
|
/** Whether this expression is a key context (each/promise/render key). */
|
|
65
103
|
key: TagKind;
|
|
66
104
|
}
|
|
105
|
+
/**
|
|
106
|
+
* Markup AST context where a lowered `yield*` expression was discovered.
|
|
107
|
+
*
|
|
108
|
+
* @example
|
|
109
|
+
* ```ts
|
|
110
|
+
* const kind: TagKind = "event";
|
|
111
|
+
* ```
|
|
112
|
+
*
|
|
113
|
+
* @since 2.0.0
|
|
114
|
+
*/
|
|
67
115
|
export type TagKind = "plain" | "each" | "await" | "event" | "render" | "render_argument";
|
|
116
|
+
/**
|
|
117
|
+
* Source edit emitted for one lowered markup candidate.
|
|
118
|
+
*
|
|
119
|
+
* @example
|
|
120
|
+
* ```ts
|
|
121
|
+
* const replacement: Replacement = {
|
|
122
|
+
* start: 4,
|
|
123
|
+
* end: 19,
|
|
124
|
+
* text: "__SER___value",
|
|
125
|
+
* };
|
|
126
|
+
* ```
|
|
127
|
+
*
|
|
128
|
+
* @since 2.0.0
|
|
129
|
+
*/
|
|
68
130
|
export interface Replacement {
|
|
69
131
|
start: number;
|
|
70
132
|
end: number;
|
|
@@ -72,25 +134,97 @@ export interface Replacement {
|
|
|
72
134
|
helpers?: HelperDeclaration[];
|
|
73
135
|
relocation?: PendingRelocation;
|
|
74
136
|
}
|
|
137
|
+
/**
|
|
138
|
+
* Helper declaration emitted alongside markup replacements.
|
|
139
|
+
*
|
|
140
|
+
* @example
|
|
141
|
+
* ```ts
|
|
142
|
+
* const helper: HelperDeclaration = {
|
|
143
|
+
* text: "const __SER___value = dispatcher.value(...);",
|
|
144
|
+
* };
|
|
145
|
+
* ```
|
|
146
|
+
*
|
|
147
|
+
* @since 2.0.0
|
|
148
|
+
*/
|
|
75
149
|
export interface HelperDeclaration {
|
|
76
150
|
text: string;
|
|
77
151
|
relocation?: PendingRelocation;
|
|
78
152
|
}
|
|
153
|
+
/**
|
|
154
|
+
* Relocation range that is relative to a pending replacement.
|
|
155
|
+
*
|
|
156
|
+
* @example
|
|
157
|
+
* ```ts
|
|
158
|
+
* const relocation: PendingRelocation = {
|
|
159
|
+
* originalStart: 4,
|
|
160
|
+
* originalEnd: 17,
|
|
161
|
+
* generatedStartInReplacement: 6,
|
|
162
|
+
* generatedEndInReplacement: 19,
|
|
163
|
+
* };
|
|
164
|
+
* ```
|
|
165
|
+
*
|
|
166
|
+
* @since 3.2.3
|
|
167
|
+
*/
|
|
79
168
|
export interface PendingRelocation {
|
|
80
169
|
originalStart: number;
|
|
81
170
|
originalEnd: number;
|
|
82
171
|
generatedStartInReplacement: number;
|
|
83
172
|
generatedEndInReplacement: number;
|
|
84
173
|
}
|
|
174
|
+
/**
|
|
175
|
+
* Helper-code insertion point with optional relocation metadata.
|
|
176
|
+
*
|
|
177
|
+
* @example
|
|
178
|
+
* ```ts
|
|
179
|
+
* const insertion: Insertion = {
|
|
180
|
+
* start: 42,
|
|
181
|
+
* text: "<script>const dispatcher = get_dispatcher();</script>",
|
|
182
|
+
* };
|
|
183
|
+
* ```
|
|
184
|
+
*
|
|
185
|
+
* @since 2.0.0
|
|
186
|
+
*/
|
|
85
187
|
export interface Insertion {
|
|
86
188
|
start: number;
|
|
87
189
|
text: string;
|
|
88
190
|
relocations?: PendingRelocation[];
|
|
89
191
|
}
|
|
192
|
+
/**
|
|
193
|
+
* Generated binding names used by markup helper injection.
|
|
194
|
+
*
|
|
195
|
+
* @example
|
|
196
|
+
* ```ts
|
|
197
|
+
* const bindings: MarkupHelperBindings = {
|
|
198
|
+
* codes: "__SER___codes",
|
|
199
|
+
* dispatcher: "__SER___dispatcher",
|
|
200
|
+
* };
|
|
201
|
+
* ```
|
|
202
|
+
*
|
|
203
|
+
* @since 2.0.0
|
|
204
|
+
*/
|
|
90
205
|
export interface MarkupHelperBindings {
|
|
91
206
|
codes: string;
|
|
92
207
|
dispatcher: string;
|
|
93
208
|
}
|
|
209
|
+
/**
|
|
210
|
+
* Allocator that reserves collision-free helper names for generated markup.
|
|
211
|
+
*
|
|
212
|
+
* @example
|
|
213
|
+
* ```ts
|
|
214
|
+
* const allocator: MarkupNameAllocator = {
|
|
215
|
+
* reserve: (name) => name,
|
|
216
|
+
* };
|
|
217
|
+
* ```
|
|
218
|
+
*
|
|
219
|
+
* @since 2.0.0
|
|
220
|
+
*/
|
|
94
221
|
export interface MarkupNameAllocator {
|
|
222
|
+
/**
|
|
223
|
+
* Reserves a generated name.
|
|
224
|
+
*
|
|
225
|
+
* @param name - Preferred identifier to reserve.
|
|
226
|
+
* @returns A collision-free identifier that can be emitted into generated
|
|
227
|
+
* markup helper code.
|
|
228
|
+
*/
|
|
95
229
|
reserve(name: string): string;
|
|
96
230
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as transform_markup_effect } from "../chunks/transform-
|
|
1
|
+
import { t as transform_markup_effect } from "../chunks/transform-02e-RvXH.js";
|
|
2
2
|
export { transform_markup_effect };
|
package/.dist/markup/value.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"value.js","names":[],"sources":["../../../modules/svelte-effect-runtime/src/markup/value.ts"],"sourcesContent":["import { get_dispatcher } from \"$/generated/dispatcher.ts\";\nimport type { Effect } from \"effect\";\n\n/**\n * Runtime helper emitted by the markup transform for `{yield* expr}`\n * expressions in Svelte templates. Delegates to the dispatcher's\n * cached reactive value mechanism — returns the fallback synchronously,\n * then the resolved value once the effect completes in the browser. During\n * SSR the client dispatcher is not touched, so browser-only layers cannot\n * turn server rendering into a 500.\n *\n * @since 2.0.0\n * @param id - Stable identifier generated from the expression's source\n * position, used for cache lookups.\n * @param deps - Array of reactive dependencies (free identifiers in the\n * expression). When any dep changes, the previous fiber is cancelled\n * and a new one starts.\n * @param fallback - Value returned while the effect is running.\n * @param factory - Generator function that yields the effect to run.\n * @returns The cached value if resolved, or the fallback.\n */\nexport function value<A, F, E, R>(\n
|
|
1
|
+
{"version":3,"file":"value.js","names":[],"sources":["../../../modules/svelte-effect-runtime/src/markup/value.ts"],"sourcesContent":["import { get_dispatcher } from \"$/generated/dispatcher.ts\";\nimport type { Effect } from \"effect\";\n\n/**\n * Runtime helper emitted by the markup transform for `{yield* expr}`\n * expressions in Svelte templates. Delegates to the dispatcher's\n * cached reactive value mechanism — returns the fallback synchronously,\n * then the resolved value once the effect completes in the browser. During\n * SSR the client dispatcher is not touched, so browser-only layers cannot\n * turn server rendering into a 500.\n *\n * @since 2.0.0\n * @param id - Stable identifier generated from the expression's source\n * position, used for cache lookups.\n * @param deps - Array of reactive dependencies (free identifiers in the\n * expression). When any dep changes, the previous fiber is cancelled\n * and a new one starts.\n * @param fallback - Value returned while the effect is running.\n * @param factory - Generator function that yields the effect to run.\n * @returns The cached value if resolved, or the fallback.\n */\nexport function value<A, F, E, R>(\n\tid: string,\n\tdeps: readonly unknown[],\n\tfallback: F,\n\tfactory: () => Effect.gen.Return<A, E, R>,\n): A | F {\n\tif (is_server_render()) {\n\t\treturn fallback;\n\t}\n\n\treturn get_dispatcher().value<A | F>({ id, deps, fallback, factory });\n}\n\nfunction is_server_render(): boolean {\n\treturn typeof document === \"undefined\";\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAqBA,SAAgB,MACf,IACA,MACA,UACA,SACQ;CACR,IAAI,iBAAiB,GACpB,OAAO;CAGR,OAAO,eAAe,CAAC,CAAC,MAAa;EAAE;EAAI;EAAM;EAAU;CAAQ,CAAC;AACrE;AAEA,SAAS,mBAA4B;CACpC,OAAO,OAAO,aAAa;AAC5B"}
|
package/.dist/mod.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { A as YieldStarInEventCallbackError, C as UncheckedLiveQueryHandlerMissingError, D as UnsupportedMarkupEffectPositionError, E as UnknownRuntimeError, O as UnsupportedRemoteFormResponseError, S as UncheckedFormHandlerMissingError, T as UncheckedQueryHandlerMissingError, _ as RuntimeAlreadyInitializedError, a as DispatcherDisposedError, b as SvelteKitServerExportUnavailableError, c as InvalidLiveQueryReturnError, d as PreprocessError, f as RemoteErrorDecodeError, g as RequestEventUnavailableError, h as RemoteHelperError, i as BatchQueryHandlerMissingError, k as VitePreTransformPluginConflictError, l as InvalidQueryFactoryError, m as RemoteHelperContextError, n as AsyncEffectInSyncRuneError, o as InvalidCommandFactoryError, p as RemoteFormEndpointMissingError, r as AwaitInEffectWorkError, s as InvalidLiveQueryFactoryError, t as AsyncEffectInEventCallbackError, u as InvalidRemoteFormResponseError, v as RuntimeError, w as UncheckedPrerenderHandlerMissingError, x as UncheckedCommandHandlerMissingError, y as ServerOnlyImportError } from "./chunks/errors-
|
|
2
|
-
import { t as Dispatcher } from "./chunks/dispatcher-
|
|
1
|
+
import { A as YieldStarInEventCallbackError, C as UncheckedLiveQueryHandlerMissingError, D as UnsupportedMarkupEffectPositionError, E as UnknownRuntimeError, O as UnsupportedRemoteFormResponseError, S as UncheckedFormHandlerMissingError, T as UncheckedQueryHandlerMissingError, _ as RuntimeAlreadyInitializedError, a as DispatcherDisposedError, b as SvelteKitServerExportUnavailableError, c as InvalidLiveQueryReturnError, d as PreprocessError, f as RemoteErrorDecodeError, g as RequestEventUnavailableError, h as RemoteHelperError, i as BatchQueryHandlerMissingError, k as VitePreTransformPluginConflictError, l as InvalidQueryFactoryError, m as RemoteHelperContextError, n as AsyncEffectInSyncRuneError, o as InvalidCommandFactoryError, p as RemoteFormEndpointMissingError, r as AwaitInEffectWorkError, s as InvalidLiveQueryFactoryError, t as AsyncEffectInEventCallbackError, u as InvalidRemoteFormResponseError, v as RuntimeError, w as UncheckedPrerenderHandlerMissingError, x as UncheckedCommandHandlerMissingError, y as ServerOnlyImportError } from "./chunks/errors-Dcf0MVbq.js";
|
|
2
|
+
import { t as Dispatcher } from "./chunks/dispatcher-pHH4JcFR.js";
|
|
3
3
|
import { is_form_error, is_remote_http_error, is_remote_transport_error, is_remote_validation_error } from "./remote/shared.js";
|
|
4
|
-
import { t as effect } from "./chunks/vite-
|
|
4
|
+
import { t as effect } from "./chunks/vite-Dkwdtbgj.js";
|
|
5
5
|
//#region src/mod.ts
|
|
6
6
|
/**
|
|
7
7
|
* Public API surface for `svelte-effect-runtime`.
|
package/.dist/mod.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mod.js","names":[],"sources":["../../modules/svelte-effect-runtime/src/mod.ts"],"sourcesContent":["import { Dispatcher as InternalDispatcher } from \"$/dispatcher.ts\";\nimport { ServerOnlyImportError } from \"$/errors.ts\";\nimport type {
|
|
1
|
+
{"version":3,"file":"mod.js","names":[],"sources":["../../modules/svelte-effect-runtime/src/mod.ts"],"sourcesContent":["import { Dispatcher as InternalDispatcher } from \"$/dispatcher.ts\";\nimport { ServerOnlyImportError } from \"$/errors.ts\";\nimport type { ErrorEffectFactory, RedirectEffectFactory } from \"$/server/control-flow.ts\";\nimport type { RequestEvent as RequestEventShape } from \"$/server/runtime.ts\";\nimport type {\n\tCommandFactory,\n\tFormFactory,\n\tPrerenderFactory,\n\tQueryFactory,\n\tServerRuntimeFactory,\n} from \"$/server/types.ts\";\nimport type { Context, Layer, ManagedRuntime } from \"effect\";\n\n/**\n * Public API surface for `svelte-effect-runtime`.\n *\n * Call {@link ClientRuntime.make} in `hooks.client.ts`, call\n * {@link ServerRuntime.make} in `hooks.server.ts`, and let the Vite plugin\n * route server-only helpers to the server entrypoint automatically.\n *\n * @module\n */\n\n/**\n * Client-side runtime singleton. Call `ClientRuntime.make(layer?)` once\n * in `hooks.client.ts` to provide services to every component's effect\n * blocks.\n *\n * If never called, a default empty-layer runtime is created lazily on\n * the first `yield*` expression.\n *\n * @example\n * ```ts\n * import { ClientRuntime } from \"svelte-effect-runtime\";\n * import { Db } from \"./db.ts\";\n *\n * ClientRuntime.make(Db.Live);\n * ```\n *\n * @since 2.0.0\n */\nexport class ClientRuntime {\n\t/**\n\t * Build and cache the client-side dispatcher runtime.\n\t *\n\t * @since 2.0.0\n\t * @param layer - Optional Effect layer to provide to the runtime.\n\t */\n\tstatic make<R = never>(layer?: Layer.Layer<R>): void {\n\t\tInternalDispatcher.make(layer);\n\t}\n}\n\n/**\n * Server-side runtime singleton export. In SvelteKit server files the Vite\n * plugin rewrites root imports to `svelte-effect-runtime/server`, so this\n * name resolves to the real server implementation before it is evaluated.\n *\n * @example\n * ```ts\n * import { ServerRuntime } from \"svelte-effect-runtime\";\n *\n * ServerRuntime.make();\n * ```\n *\n * @since 2.0.0\n */\nexport const ServerRuntime: ServerRuntimeFactory = make_server_only_class(\"ServerRuntime\") as never;\n\n/**\n * Remote query factory export for `.remote.ts` files imported from the root\n * entrypoint. The Vite plugin rewrites it to the real server implementation.\n *\n * @example\n * ```ts\n * import { Query } from \"svelte-effect-runtime\";\n *\n * export const GetPosts = Query(Effect.succeed([]));\n * ```\n *\n * @since 2.0.0\n */\nexport const Query: QueryFactory = Object.assign(make_server_only_function(\"Query\"), {\n\tbatch: make_server_only_function(\"Query.batch\"),\n\tlive: make_server_only_function(\"Query.live\"),\n}) as never;\n\n/**\n * Remote command factory export for `.remote.ts` files imported from the root\n * entrypoint. The Vite plugin rewrites it to the real server implementation.\n *\n * @example\n * ```ts\n * import { Command } from \"svelte-effect-runtime\";\n *\n * export const SavePost = Command(Schema.String, (id) => Effect.succeed(id));\n * ```\n *\n * @since 2.0.0\n */\nexport const Command: CommandFactory = make_server_only_function(\"Command\") as never;\n\n/**\n * SvelteKit HTTP error control-flow export for `.remote.ts` files imported\n * from the root entrypoint. The Vite plugin rewrites it to the real server\n * implementation.\n *\n * @example\n * ```ts\n * import { Error } from \"svelte-effect-runtime\";\n *\n * return yield* Error(\"NotFound\", \"Post not found\");\n * ```\n *\n * @since 2.3.0\n */\nexport const Error: ErrorEffectFactory = make_server_only_function(\"Error\") as never;\n\n/**\n * Remote form factory export for `.remote.ts` files imported from the root\n * entrypoint. The Vite plugin rewrites it to the real server implementation.\n *\n * @example\n * ```ts\n * import { Form } from \"svelte-effect-runtime\";\n *\n * export const CreatePost = Form(PostInput, ({ data }) => Effect.succeed(data));\n * ```\n *\n * @since 2.0.0\n */\nexport const Form: FormFactory = make_server_only_function(\"Form\") as never;\n\n/**\n * Remote prerender factory export for `.remote.ts` files imported from the\n * root entrypoint. The Vite plugin rewrites it to the real server\n * implementation.\n *\n * @example\n * ```ts\n * import { Prerender } from \"svelte-effect-runtime\";\n *\n * export const GetBuildInfo = Prerender(() => Effect.succeed(\"ready\"));\n * ```\n *\n * @since 2.0.0\n */\nexport const Prerender: PrerenderFactory = make_server_only_function(\"Prerender\") as never;\n\n/**\n * SvelteKit redirect control-flow export for `.remote.ts` files imported from\n * the root entrypoint. The Vite plugin rewrites it to the real server\n * implementation.\n *\n * @example\n * ```ts\n * import { Redirect } from \"svelte-effect-runtime\";\n *\n * return yield* Redirect(\"SeeOther\", \"/posts\");\n * ```\n *\n * @since 2.3.0\n */\nexport const Redirect: RedirectEffectFactory = make_server_only_function(\"Redirect\") as never;\n\n/**\n * Current SvelteKit request event service export for `.remote.ts` files\n * imported from the root entrypoint. The Vite plugin rewrites it to the real\n * server implementation.\n *\n * @example\n * ```ts\n * import { RequestEvent } from \"svelte-effect-runtime\";\n *\n * const event = yield* RequestEvent;\n * ```\n *\n * @since 2.0.0\n */\nexport const RequestEvent: Context.Reference<RequestEventShape> = make_server_only_function(\n\t\"RequestEvent\",\n) as never;\n\n/**\n * Returns the active server runtime when imported from a server file. The Vite\n * plugin rewrites root imports to the real server implementation.\n *\n * @example\n * ```ts\n * import { get_server_runtime_or_throw } from \"svelte-effect-runtime\";\n *\n * const runtime = get_server_runtime_or_throw();\n * ```\n *\n * @since 2.0.0\n */\nexport const get_server_runtime_or_throw: () => ManagedRuntime.ManagedRuntime<unknown, never> =\n\tmake_server_only_function(\"get_server_runtime_or_throw\") as never;\n\n/** Re-export error types users need for typed catch handlers. */\nexport type {\n\tFormError,\n\tFormIssue,\n\tRemoteFailure,\n\tRemoteHttpError,\n\tRemoteTransportError,\n\tRemoteValidationError,\n} from \"$/remote/shared.ts\";\n\nexport {\n\tAsyncEffectInEventCallbackError,\n\tAsyncEffectInSyncRuneError,\n\tAwaitInEffectWorkError,\n\tBatchQueryHandlerMissingError,\n\tDispatcherDisposedError,\n\tInvalidCommandFactoryError,\n\tInvalidLiveQueryFactoryError,\n\tInvalidLiveQueryReturnError,\n\tInvalidQueryFactoryError,\n\tInvalidRemoteFormResponseError,\n\tPreprocessError,\n\tRemoteErrorDecodeError,\n\tRemoteFormEndpointMissingError,\n\tRemoteHelperContextError,\n\tRemoteHelperError,\n\tRequestEventUnavailableError,\n\tRuntimeAlreadyInitializedError,\n\tRuntimeError,\n\tServerOnlyImportError,\n\tSvelteKitServerExportUnavailableError,\n\tUncheckedCommandHandlerMissingError,\n\tUncheckedFormHandlerMissingError,\n\tUncheckedLiveQueryHandlerMissingError,\n\tUncheckedPrerenderHandlerMissingError,\n\tUncheckedQueryHandlerMissingError,\n\tUnknownRuntimeError,\n\tUnsupportedMarkupEffectPositionError,\n\tUnsupportedRemoteFormResponseError,\n\tVitePreTransformPluginConflictError,\n\tYieldStarInEventCallbackError,\n} from \"$/errors.ts\";\n\nexport {\n\tis_form_error,\n\tis_remote_http_error,\n\tis_remote_transport_error,\n\tis_remote_validation_error,\n} from \"$/remote/shared.ts\";\n\n/** Re-export app setup helpers so users can import them from root. */\nexport { effect, type EffectOptions } from \"$/vite.ts\";\n\n/** Re-export server helper types from the root entrypoint. */\nexport type {\n\tErrorBody,\n\tErrorEffectFactory,\n\tErrorProperties,\n\tErrorStatus,\n\tErrorStatusName,\n\tRedirectEffectFactory,\n\tRedirectOptions,\n\tRedirectStatus,\n\tRedirectStatusName,\n} from \"$/server/control-flow.ts\";\n\n/** Re-export server helper types from the root entrypoint. */\nexport type {\n\tCommandFactory,\n\tEffectLike,\n\tEffectRemoteBatchHandler,\n\tEffectRemoteCommand,\n\tEffectRemoteForm,\n\tEffectRemoteFunction,\n\tEffectRemoteLiveQuery,\n\tEffectRemoteLiveQueryFunction,\n\tEffectRemoteLiveQueryResource,\n\tEffectRemoteLiveSource,\n\tEffectRemoteQuery,\n\tEffectRemoteQueryFunction,\n\tFormFactory,\n\tFormInvalid,\n\tPrerenderFactory,\n\tPrerenderOptions,\n\tQueryBatchFactory,\n\tQueryFactory,\n\tQueryLiveFactory,\n\tRemoteFormHandler,\n\tRemoteHandler,\n\tRemoteLiveHandler,\n\tSchemaEncodedInput,\n\tSchemaInput,\n\tServerRuntimeFactory,\n\tStandardSchema,\n\tStandardSchemaInput,\n\tStandardSchemaOutput,\n} from \"$/server/types.ts\";\n\nfunction make_server_only_class(name: string): unknown {\n\treturn class ServerOnlyRuntime {\n\t\tstatic make(): never {\n\t\t\tthrow make_server_only_error(name);\n\t\t}\n\t};\n}\n\nfunction make_server_only_function(name: string): (...args: unknown[]) => never {\n\treturn (..._args: unknown[]): never => {\n\t\tthrow make_server_only_error(name);\n\t};\n}\n\nfunction make_server_only_error(name: string): globalThis.Error {\n\treturn new ServerOnlyImportError(name);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyCA,IAAa,gBAAb,MAA2B;;;;;;;CAO1B,OAAO,KAAgB,OAA8B;EACpD,WAAmB,KAAK,KAAK;CAC9B;AACD;;;;;;;;;;;;;;;AAgBA,MAAa,gBAAsC,uBAAuB,eAAe;;;;;;;;;;;;;;AAezF,MAAa,QAAsB,OAAO,OAAO,0BAA0B,OAAO,GAAG;CACpF,OAAO,0BAA0B,aAAa;CAC9C,MAAM,0BAA0B,YAAY;AAC7C,CAAC;;;;;;;;;;;;;;AAeD,MAAa,UAA0B,0BAA0B,SAAS;;;;;;;;;;;;;;;AAgB1E,MAAa,QAA4B,0BAA0B,OAAO;;;;;;;;;;;;;;AAe1E,MAAa,OAAoB,0BAA0B,MAAM;;;;;;;;;;;;;;;AAgBjE,MAAa,YAA8B,0BAA0B,WAAW;;;;;;;;;;;;;;;AAgBhF,MAAa,WAAkC,0BAA0B,UAAU;;;;;;;;;;;;;;;AAgBnF,MAAa,eAAqD,0BACjE,cACD;;;;;;;;;;;;;;AAeA,MAAa,8BACZ,0BAA0B,6BAA6B;AAoGxD,SAAS,uBAAuB,MAAuB;CACtD,OAAO,MAAM,kBAAkB;EAC9B,OAAO,OAAc;GACpB,MAAM,uBAAuB,IAAI;EAClC;CACD;AACD;AAEA,SAAS,0BAA0B,MAA6C;CAC/E,QAAQ,GAAG,UAA4B;EACtC,MAAM,uBAAuB,IAAI;CAClC;AACD;AAEA,SAAS,uBAAuB,MAAgC;CAC/D,OAAO,IAAI,sBAAsB,IAAI;AACtC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { RemoteFailure } from "../shared.js";
|
|
2
|
-
import type { Effect } from "effect";
|
|
3
2
|
import type { Pending } from "./types.js";
|
|
3
|
+
import type { Effect } from "effect";
|
|
4
4
|
type EffectRemoteCommandAdapter<Input, Output, ErrorType = never> = ((input: undefined extends Input ? Input | void : Input) => Effect.Effect<Output, RemoteFailure<ErrorType>>) & {
|
|
5
5
|
readonly pending: number;
|
|
6
6
|
};
|
|
@@ -12,4 +12,18 @@ import { Effect } from "effect";
|
|
|
12
12
|
* @param run - Promise-producing operation that invokes a native remote helper.
|
|
13
13
|
* @returns Effect that maps thrown values into remote failures.
|
|
14
14
|
*/
|
|
15
|
-
export declare function
|
|
15
|
+
export declare function MakeEffectFromPromise<Output, ErrorType = never>(run: () => Promise<Output>): Effect.Effect<Output, RemoteFailure<ErrorType>>;
|
|
16
|
+
/**
|
|
17
|
+
* Compatibility alias for {@link MakeEffectFromPromise}.
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* ```ts
|
|
21
|
+
* const program = make_effect_from_promise(() => native_remote(input));
|
|
22
|
+
* ```
|
|
23
|
+
*
|
|
24
|
+
* @since 2.0.0
|
|
25
|
+
* @param run - Promise-producing operation that invokes a native remote helper.
|
|
26
|
+
* @returns Effect that maps thrown values into remote failures.
|
|
27
|
+
* @internal
|
|
28
|
+
*/
|
|
29
|
+
export declare const make_effect_from_promise: typeof MakeEffectFromPromise;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { create_remote_command_adapter } from "./command.js";
|
|
2
2
|
export { create_remote_form_adapter } from "./form.js";
|
|
3
|
-
export { create_remote_live_query_adapter, create_remote_query_adapter
|
|
3
|
+
export { create_remote_live_query_adapter, create_remote_query_adapter } from "./query.js";
|
|
4
4
|
export type { EffectRemoteForm, EffectRemoteFormEnhanceOptions, EffectRemoteFormSubmit, Pending, } from "./types.js";
|
|
@@ -18,7 +18,9 @@ export declare const EFFECT_REMOTE_QUERY_UPDATE: unique symbol;
|
|
|
18
18
|
export type EffectRemoteQueryUpdateBrand = {
|
|
19
19
|
readonly [EFFECT_REMOTE_QUERY_UPDATE]: true;
|
|
20
20
|
};
|
|
21
|
-
type EffectRemoteFormCallable<Input extends RemoteFormInput | void, Output, ErrorType> = [
|
|
21
|
+
type EffectRemoteFormCallable<Input extends RemoteFormInput | void, Output, ErrorType> = [
|
|
22
|
+
Input
|
|
23
|
+
] extends [void] ? () => Effect.Effect<Output, RemoteFailure<ErrorType>> : undefined extends Input ? (input?: Input) => Effect.Effect<Output, RemoteFailure<ErrorType>> : (input: Input) => Effect.Effect<Output, RemoteFailure<ErrorType>>;
|
|
22
24
|
type EffectRemoteQueryUpdate = NativeRemoteQueryUpdate | EffectRemoteQueryUpdateFunction | EffectRemoteLiveQueryUpdateFunction;
|
|
23
25
|
type EffectRemoteCommandUpdate = {
|
|
24
26
|
readonly pending: number;
|
package/.dist/remote/client.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as create_remote_command_adapter, n as create_remote_query_adapter, r as create_remote_form_adapter, t as create_remote_live_query_adapter } from "../chunks/client-
|
|
1
|
+
import { i as create_remote_command_adapter, n as create_remote_query_adapter, r as create_remote_form_adapter, t as create_remote_live_query_adapter } from "../chunks/client-CsVu54pU.js";
|
|
2
2
|
export { create_remote_command_adapter, create_remote_form_adapter, create_remote_live_query_adapter, create_remote_query_adapter };
|