UNPKG

@sveltejs/kit

Version:

SvelteKit is the fastest way to build Svelte apps

133 lines (123 loc) • 4.93 kB
/* This file is generated by scripts/process-messages/index.js. Do not edit! */ import { DEV } from 'esm-env'; import { bold, normal } from './internal/shared.js'; /** * `$app/environment` is deprecated, use `$app/env` instead * @param {void} _values */ export function app_environment_deprecated(_values) { if (DEV) { console.warn( `%c[sveltekit] ${'app_environment_deprecated'}\n%c${`\`$app/environment\` is deprecated, use \`$app/env\` instead`}\nhttps://svelte.dev/e/kit/${'app_environment_deprecated'}`, bold, normal ); } else { console.warn('https://svelte.dev/e/kit/app_environment_deprecated'); } } /** * `asset('%path%')` should now be `asset('%fixed%')` * @param {{ "path": string; "fixed": string }} _values */ export function asset_leading_slash(_values) { if (DEV) { console.warn( `%c[sveltekit] ${'asset_leading_slash'}\n%c${`\`asset('${_values.path}')\` should now be \`asset('${_values.fixed}')\``}\nhttps://svelte.dev/e/kit/${'asset_leading_slash'}`, bold, normal ); } else { console.warn('https://svelte.dev/e/kit/asset_leading_slash'); } } /** * `%route%`: Calling `depends('%dependency%')` will throw an error in Firefox because `%scheme%` is a special URI scheme * @param {{ "route": string; "dependency": string; "scheme": string }} _values */ export function depends_special_scheme(_values) { if (DEV) { console.warn( `%c[sveltekit] ${'depends_special_scheme'}\n%c${`\`${_values.route}\`: Calling \`depends('${_values.dependency}')\` will throw an error in Firefox because \`${_values.scheme}\` is a special URI scheme`}\nhttps://svelte.dev/e/kit/${'depends_special_scheme'}`, bold, normal ); } else { console.warn('https://svelte.dev/e/kit/depends_special_scheme'); } } /** * `%module%` is deprecated, use `%replacement%` instead * @param {{ "module": string; "replacement": string }} _values */ export function env_module_deprecated(_values) { if (DEV) { console.warn( `%c[sveltekit] ${'env_module_deprecated'}\n%c${`\`${_values.module}\` is deprecated, use \`${_values.replacement}\` instead`}\nhttps://svelte.dev/e/kit/${'env_module_deprecated'}`, bold, normal ); } else { console.warn('https://svelte.dev/e/kit/env_module_deprecated'); } } /** * Passing an `App.Error` body as the second argument is deprecated — pass the `message` as the second argument, and any additional properties as the third * @param {void} _values */ export function error_body_deprecated(_values) { if (DEV) { console.warn( `%c[sveltekit] ${'error_body_deprecated'}\n%c${`Passing an \`App.Error\` body as the second argument is deprecated — pass the \`message\` as the second argument, and any additional properties as the third`}\nhttps://svelte.dev/e/kit/${'error_body_deprecated'}`, bold, normal ); } else { console.warn('https://svelte.dev/e/kit/error_body_deprecated'); } } /** * The properties of `form.fields` are virtual, so operators like `in` and `Object.keys` are meaningless. If you need the current value of a form field, use `form.fields.x.value()` * @param {void} _values */ export function form_fields_enumerated(_values) { if (DEV) { console.warn( `%c[sveltekit] ${'form_fields_enumerated'}\n%c${`The properties of \`form.fields\` are virtual, so operators like \`in\` and \`Object.keys\` are meaningless. If you need the current value of a form field, use \`form.fields.x.value()\``}\nhttps://svelte.dev/e/kit/${'form_fields_enumerated'}`, bold, normal ); } else { console.warn('https://svelte.dev/e/kit/form_fields_enumerated'); } } /** * The `message` property of `handleError` is deprecated. Use `error.message` for expected and framework errors, or `'Internal Error'` for unexpected errors. * @param {void} _values */ export function handle_error_message_deprecated(_values) { if (DEV) { console.warn( `%c[sveltekit] ${'handle_error_message_deprecated'}\n%c${`The \`message\` property of \`handleError\` is deprecated. Use \`error.message\` for expected and framework errors, or \`'Internal Error'\` for unexpected errors.`}\nhttps://svelte.dev/e/kit/${'handle_error_message_deprecated'}`, bold, normal ); } else { console.warn('https://svelte.dev/e/kit/handle_error_message_deprecated'); } } /** * The `status` property of `handleError` is deprecated. Use `error.status` for expected and framework errors, or `500` for unexpected errors. * @param {void} _values */ export function handle_error_status_deprecated(_values) { if (DEV) { console.warn( `%c[sveltekit] ${'handle_error_status_deprecated'}\n%c${`The \`status\` property of \`handleError\` is deprecated. Use \`error.status\` for expected and framework errors, or \`500\` for unexpected errors.`}\nhttps://svelte.dev/e/kit/${'handle_error_status_deprecated'}`, bold, normal ); } else { console.warn('https://svelte.dev/e/kit/handle_error_status_deprecated'); } }