diff --git a/packages/accounts-base/accounts_common.js b/packages/accounts-base/accounts_common.js index 4984c6b5a4..86f8ce8bec 100644 --- a/packages/accounts-base/accounts_common.js +++ b/packages/accounts-base/accounts_common.js @@ -419,14 +419,14 @@ export class AccountsCommon { /** * @summary Get the current user id, or `null` if no user is logged in. A reactive data source. - * @locus Anywhere but publish functions + * @locus Anywhere * @importFromPackage meteor */ Meteor.userId = () => Accounts.userId(); /** * @summary Get the current user record, or `null` if no user is logged in. A reactive data source. - * @locus Anywhere but publish functions + * @locus Anywhere * @importFromPackage meteor * @param {Object} [options] * @param {MongoFieldSpecifier} options.fields Dictionary of fields to return or exclude. @@ -435,7 +435,7 @@ Meteor.user = options => Accounts.user(options); /** * @summary Get the current user record, or `null` if no user is logged in. A reactive data source. - * @locus Anywhere but publish functions + * @locus Anywhere * @importFromPackage meteor * @param {Object} [options] * @param {MongoFieldSpecifier} options.fields Dictionary of fields to return or exclude. diff --git a/packages/accounts-password/password_server.js b/packages/accounts-password/password_server.js index c8d98bae5f..c87b0897d9 100644 --- a/packages/accounts-password/password_server.js +++ b/packages/accounts-password/password_server.js @@ -108,7 +108,7 @@ Accounts._checkPasswordAsync = checkPasswordAsync; /** - * @summary Finds the user with the specified username. + * @summary Finds the user asynchronously with the specified username. * First tries to match username case sensitively; if that fails, it * tries case insensitively; but if more than one user matches the case * insensitive search, it returns null. @@ -116,7 +116,7 @@ Accounts._checkPasswordAsync = checkPasswordAsync; * @param {String} username The username to look for * @param {Object} [options] * @param {MongoFieldSpecifier} options.fields Dictionary of fields to return or exclude. - * @returns {Object} A user if found, else null + * @returns {Promise} A user if found, else null * @importFromPackage accounts-base */ Accounts.findUserByUsername = @@ -124,7 +124,7 @@ Accounts.findUserByUsername = await Accounts._findUserByQuery({ username }, options); /** - * @summary Finds the user with the specified email. + * @summary Finds the user asynchronously with the specified email. * First tries to match email case sensitively; if that fails, it * tries case insensitively; but if more than one user matches the case * insensitive search, it returns null. @@ -132,7 +132,7 @@ Accounts.findUserByUsername = * @param {String} email The email address to look for * @param {Object} [options] * @param {MongoFieldSpecifier} options.fields Dictionary of fields to return or exclude. - * @returns {Object} A user if found, else null + * @returns {Promise} A user if found, else null * @importFromPackage accounts-base */ Accounts.findUserByEmail = @@ -219,7 +219,7 @@ Accounts.registerLoginHandler("password", async options => { /// /** - * @summary Change a user's username. Use this instead of updating the + * @summary Change a user's username asynchronously. Use this instead of updating the * database directly. The operation will fail if there is an existing user * with a username only differing in case. * @locus Server @@ -378,13 +378,13 @@ Meteor.methods({forgotPassword: async options => { }}); /** - * @summary Generates a reset token and saves it into the database. + * @summary Asynchronously generates a reset token and saves it into the database. * @locus Server * @param {String} userId The id of the user to generate the reset token for. * @param {String} email Which address of the user to generate the reset token for. This address must be in the user's `emails` list. If `null`, defaults to the first email in the list. * @param {String} reason `resetPassword` or `enrollAccount`. * @param {Object} [extraTokenData] Optional additional data to be added into the token record. - * @returns {Object} Object with {email, user, token} values. + * @returns {Promise} Promise of an object with {email, user, token} values. * @importFromPackage accounts-base */ Accounts.generateResetToken = @@ -452,12 +452,12 @@ Accounts.generateResetToken = }; /** - * @summary Generates an e-mail verification token and saves it into the database. + * @summary Generates asynchronously an e-mail verification token and saves it into the database. * @locus Server * @param {String} userId The id of the user to generate the e-mail verification token for. * @param {String} email Which address of the user to generate the e-mail verification token for. This address must be in the user's `emails` list. If `null`, defaults to the first unverified email in the list. * @param {Object} [extraTokenData] Optional additional data to be added into the token record. - * @returns {Object} Object with {email, user, token} values. + * @returns {Promise} Promise of an object with {email, user, token} values. * @importFromPackage accounts-base */ Accounts.generateVerificationToken = @@ -517,13 +517,13 @@ Accounts.generateVerificationToken = // to set a new password, without the old password. /** - * @summary Send an email with a link the user can use to reset their password. + * @summary Send an email asynchronously with a link the user can use to reset their password. * @locus Server * @param {String} userId The id of the user to send email to. * @param {String} [email] Optional. Which address of the user's to send the email to. This address must be in the user's `emails` list. Defaults to the first email in the list. * @param {Object} [extraTokenData] Optional additional data to be added into the token record. * @param {Object} [extraParams] Optional additional params to be added to the reset url. - * @returns {Object} Object with {email, user, token, url, options} values. + * @returns {Promise} Promise of an object with {email, user, token, url, options} values. * @importFromPackage accounts-base */ Accounts.sendResetPasswordEmail = @@ -549,13 +549,13 @@ Accounts.sendResetPasswordEmail = // want to use enrollment emails. /** - * @summary Send an email with a link the user can use to set their initial password. + * @summary Send an email asynchronously with a link the user can use to set their initial password. * @locus Server * @param {String} userId The id of the user to send email to. * @param {String} [email] Optional. Which address of the user's to send the email to. This address must be in the user's `emails` list. Defaults to the first email in the list. * @param {Object} [extraTokenData] Optional additional data to be added into the token record. * @param {Object} [extraParams] Optional additional params to be added to the enrollment url. - * @returns {Object} Object with {email, user, token, url, options} values. + * @returns {Promise} Promise of an object {email, user, token, url, options} values. * @importFromPackage accounts-base */ Accounts.sendEnrollmentEmail = @@ -728,14 +728,13 @@ Meteor.methods( // address as verified /** - * @summary Send an email with a link the user can use verify their email address. + * @summary Send an email asynchronously with a link the user can use verify their email address. * @locus Server * @param {String} userId The id of the user to send email to. * @param {String} [email] Optional. Which address of the user's to send the email to. This address must be in the user's `emails` list. Defaults to the first unverified email in the list. * @param {Object} [extraTokenData] Optional additional data to be added into the token record. * @param {Object} [extraParams] Optional additional params to be added to the verification url. - * - * @returns {Object} Object with {email, user, token, url, options} values. + * @returns {Promise} Promise of an object with {email, user, token, url, options} values. * @importFromPackage accounts-base */ Accounts.sendVerificationEmail = @@ -831,7 +830,7 @@ Meteor.methods( }); /** - * @summary Add an email address for a user. Use this instead of directly + * @summary Add an email asynchronously address for a user. Use this instead of directly * updating the database. The operation will fail if there is a different user * with an email only differing in case. If the specified user has an existing * email only differing in case however, we replace it. @@ -931,7 +930,7 @@ Accounts.addEmail = } /** - * @summary Remove an email address for a user. Use this instead of updating + * @summary Remove an email address asynchronously for a user. Use this instead of updating * the database directly. * @locus Server * @param {String} userId The ID of the user to update. @@ -1011,7 +1010,7 @@ Meteor.methods( }); /** - * @summary Creates an user and sends an email if `options.email` is informed. + * @summary Creates an user asynchronously and sends an email if `options.email` is informed. * Then if the `sendVerificationEmail` option from the `Accounts` package is * enabled, you'll send a verification email if `options.password` is informed, * otherwise you'll send an enrollment email. diff --git a/packages/ejson/ejson.js b/packages/ejson/ejson.js index 25efbc761d..e83d099279 100644 --- a/packages/ejson/ejson.js +++ b/packages/ejson/ejson.js @@ -384,11 +384,11 @@ EJSON.fromJSONValue = item => { * @locus Anywhere * @param {EJSON} val A value to stringify. * @param {Object} [options] - * @param {Boolean | Integer | String} options.indent Indents objects and + * @param {Boolean | Integer | String} [options.indent] Indents objects and * arrays for easy readability. When `true`, indents by 2 spaces; when an * integer, indents by that number of spaces; and when a string, uses the * string as the indentation pattern. - * @param {Boolean} options.canonical When `true`, stringifies keys in an + * @param {Boolean} [options.canonical] When `true`, stringifies keys in an * object in sorted order. */ EJSON.stringify = handleError((item, options) => { diff --git a/packages/email/email.js b/packages/email/email.js index bbecdfe786..ee17a2f7a2 100644 --- a/packages/email/email.js +++ b/packages/email/email.js @@ -203,7 +203,7 @@ Email.customTransport = undefined; * @locus Server * @return {Promise} * @param {Object} options - * @param {String} [options.from] "From:" address (required) + * @param {String} options.from "From:" address (required) * @param {String|String[]} options.to,cc,bcc,replyTo * "To:", "Cc:", "Bcc:", and "Reply-To:" addresses * @param {String} [options.inReplyTo] Message-ID this message is replying to @@ -273,7 +273,7 @@ Email.sendAsync = async function (options) { * @locus Server * @return {Promise} * @param {Object} options - * @param {String} [options.from] "From:" address (required) + * @param {String} options.from "From:" address (required) * @param {String|String[]} options.to,cc,bcc,replyTo * "To:", "Cc:", "Bcc:", and "Reply-To:" addresses * @param {String} [options.inReplyTo] Message-ID this message is replying to diff --git a/packages/meteor/dynamics_nodejs.js b/packages/meteor/dynamics_nodejs.js index ce9ec9e7d3..bdb147ca83 100644 --- a/packages/meteor/dynamics_nodejs.js +++ b/packages/meteor/dynamics_nodejs.js @@ -44,7 +44,7 @@ class EnvironmentVariableAsync { * @method withValue * @param {any} value The value to set for the duration of the function call * @param {Function} func The function to call with the new value of the - * @param {Object} [options] Optional additional options + * @param {Object} [options] Optional additional properties for adding in [asl](https://nodejs.org/api/async_context.html#class-asynclocalstorage) * @returns {Promise} The return value of the function */ withValue(value, func, options = {}) { diff --git a/packages/meteor/errors.js b/packages/meteor/errors.js index 01a9d50d23..6c6f1028c4 100644 --- a/packages/meteor/errors.js +++ b/packages/meteor/errors.js @@ -42,23 +42,7 @@ Meteor.makeErrorType = function (name, constructor) { * @param {String} error A string code uniquely identifying this kind of error. * This string should be used by callers of the method to determine the * appropriate action to take, instead of attempting to parse the reason - * or details fields. For example: - * - * ``` - * // on the server, pick a code unique to this error - * // the reason field should be a useful debug message - * throw new Meteor.Error("logged-out", - * "The user must be logged in to post a comment."); - * - * // on the client - * Meteor.call("methodName", function (error) { - * // identify the error - * if (error && error.error === "logged-out") { - * // show a nice error message - * Session.set("errorMessage", "Please log in to post a comment."); - * } - * }); - * ``` + * or details fields. * * For legacy reasons, some built-in Meteor functions such as `check` throw * errors with a number in this field. diff --git a/packages/mongo/collection.js b/packages/mongo/collection.js index 498e1608e1..bc3d171c6b 100644 --- a/packages/mongo/collection.js +++ b/packages/mongo/collection.js @@ -20,7 +20,7 @@ Mongo = {}; * @class * @param {String} name The name of the collection. If null, creates an unmanaged (unsynchronized) local collection. * @param {Object} [options] - * @param {Object} options.connection The server connection that will manage this collection. Uses the default connection if not specified. Pass the return value of calling [`DDP.connect`](#ddp_connect) to specify a different server. Pass `null` to specify no connection. Unmanaged (`name` is null) collections cannot specify a connection. + * @param {Object} options.connection The server connection that will manage this collection. Uses the default connection if not specified. Pass the return value of calling [`DDP.connect`](#DDP-connect) to specify a different server. Pass `null` to specify no connection. Unmanaged (`name` is null) collections cannot specify a connection. * @param {String} options.idGeneration The method of generating the `_id` fields of new documents in this collection. Possible values: - **`'STRING'`**: random strings diff --git a/packages/npm-mongo/.npm/package/npm-shrinkwrap.json b/packages/npm-mongo/.npm/package/npm-shrinkwrap.json index 20792c459f..7b005420d7 100644 --- a/packages/npm-mongo/.npm/package/npm-shrinkwrap.json +++ b/packages/npm-mongo/.npm/package/npm-shrinkwrap.json @@ -92,12 +92,10 @@ "version": "3.523.0", "resolved": "https://registry.npmjs.org/@aws-sdk/client-sts/-/client-sts-3.523.0.tgz", "integrity": "sha512-ggAkL8szaJkqD8oOsS68URJ9XMDbLA/INO/NPZJqv9BhmftecJvfy43uUVWGNs6n4YXNzfF0Y+zQ3DT0fZkv9g==" - }, "@aws-sdk/core": { "version": "3.523.0", "resolved": "https://registry.npmjs.org/@aws-sdk/core/-/core-3.523.0.tgz", "integrity": "sha512-JHa3ngEWkTzZ2YTn6EavcADC8gv6zZU4U9WBAleClh6ioXH0kGMBawZje3y0F0mKyLTfLhFqFUlCV5sngI/Qcw==" - }, "@aws-sdk/credential-provider-cognito-identity": { "version": "3.523.0", "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-cognito-identity/-/credential-provider-cognito-identity-3.523.0.tgz", @@ -167,7 +165,6 @@ "version": "3.523.0", "resolved": "https://registry.npmjs.org/@aws-sdk/region-config-resolver/-/region-config-resolver-3.523.0.tgz", "integrity": "sha512-IypIAecBc8b4jM0uVBEj90NYaIsc0vuLdSFyH4LPO7is4rQUet4CkkD+S036NvDdcdxBsQ4hJZBmWrqiizMHhQ==" - }, "@aws-sdk/token-providers": { "version": "3.523.0", "resolved": "https://registry.npmjs.org/@aws-sdk/token-providers/-/token-providers-3.523.0.tgz", @@ -222,7 +219,6 @@ "version": "1.3.5", "resolved": "https://registry.npmjs.org/@smithy/core/-/core-1.3.5.tgz", "integrity": "sha512-Rrc+e2Jj6Gu7Xbn0jvrzZlSiP2CZocIOfZ9aNUA82+1sa6GBnxqL9+iZ9EKHeD9aqD1nU8EK4+oN2EiFpSv7Yw==" - }, "@smithy/credential-provider-imds": { "version": "2.2.4", "resolved": "https://registry.npmjs.org/@smithy/credential-provider-imds/-/credential-provider-imds-2.2.4.tgz", @@ -242,7 +238,6 @@ "version": "2.1.3", "resolved": "https://registry.npmjs.org/@smithy/hash-node/-/hash-node-2.1.3.tgz", "integrity": "sha512-FsAPCUj7VNJIdHbSxMd5uiZiF20G2zdSDgrgrDrHqIs/VMxK85Vqk5kMVNNDMCZmMezp6UKnac0B4nAyx7HJ9g==" - }, "@smithy/invalid-dependency": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/@smithy/invalid-dependency/-/invalid-dependency-2.1.3.tgz", @@ -317,7 +312,6 @@ "version": "2.3.4", "resolved": "https://registry.npmjs.org/@smithy/shared-ini-file-loader/-/shared-ini-file-loader-2.3.4.tgz", "integrity": "sha512-CiZmPg9GeDKbKmJGEFvJBsJcFnh0AQRzOtQAzj1XEa8N/0/uSN/v1LYzgO7ry8hhO8+9KB7+DhSW0weqBra4Aw==" - }, "@smithy/signature-v4": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/@smithy/signature-v4/-/signature-v4-2.1.3.tgz", diff --git a/v3-docs/docs/.gitignore b/v3-docs/docs/.gitignore new file mode 100644 index 0000000000..bcd2cabb66 --- /dev/null +++ b/v3-docs/docs/.gitignore @@ -0,0 +1,6 @@ +/node_modules +/.vitepress/cache +/.vitepress/dist + +/data/data.js +/data/names.json \ No newline at end of file diff --git a/v3-docs/docs/.vitepress/config.mts b/v3-docs/docs/.vitepress/config.mts new file mode 100644 index 0000000000..ea47a0ae68 --- /dev/null +++ b/v3-docs/docs/.vitepress/config.mts @@ -0,0 +1,292 @@ +import { defineConfig } from "vitepress"; + +// https://vitepress.dev/reference/site-config +export default defineConfig({ + title: "Meteor API Docs", + description: "Meteor.js API docs", + head: [["link", { rel: "icon", href: "/logo.png" }]], + lastUpdated: true, + themeConfig: { + // https://vitepress.dev/reference/default-theme-config + nav: [ + { text: "Galaxy", link: "https://www.meteor.com/cloud" }, + { + text: "Tutorials", + link: "https://www.meteor.com/developers/tutorials", + }, + { text: "Guide", link: "https://guide.meteor.com/" }, + { text: "API Docs", link: "/about/what-is" }, + { text: "Forums", link: "https://forums.meteor.com/" }, + ], + sidebar: [ + { + text: "About", + items: [ + { + text: "What is Meteor?", + link: "/about/what-is#what-is-meteor", + }, + { + text: "Meteor resources", + link: "/about/what-is#learning-more", + }, + { + text: "Roadmap", + link: "/about/roadmap", + }, + ], + collapsed: true, + }, + { + text: "Quick Start", + items: [ + { + text: "Install Meteor", + link: "/about/install", + }, + // TODO: Your first app meteor app + ], + collapsed: true, + }, + { + text: "API", + link: "/api/index", + items: [ + { + text: "Accounts", + link: "/api/accounts", + items: [ + { text: "Accounts-Base", link: "/api/accounts#accounts-base" }, + { text: "Multi-server", link: "/api/accounts#multi-server" }, + { text: "Passwords", link: "/api/accounts#passwords" }, + ], + collapsed: true, + }, + { + text: "Meteor", + link: "/api/meteor", + items: [ + { text: "Core", link: "/api/meteor#core" }, + { text: "Methods", link: "/api/meteor#methods" }, + { text: "Publish and Subscribe", link: "/api/meteor#pubsub" }, + { text: "Server connections", link: "/api/meteor#connections" }, + { text: "Timers", link: "/api/meteor#timers" }, + ], + }, + { + text: "Collections", + link: "/api/collections", + }, + { + text: "DDPRateLimiter", + link: "/api/DDPRateLimiter", + }, + { + text: "Check", + link: "/api/check", + }, + { + text: "Session", + link: "/api/session", + }, + { + text: "Blaze", + link: "/api/blaze", + }, + { + text: "Templates", + link: "/api/templates", + }, + { + text: "Email", + link: "/api/email", + }, + { + text: "Tracker", + link: "/api/Tracker", + }, + { + text: "Reactive Var", + link: "/api/ReactiveVar", + }, + { + text: "Reactive Dict", + link: "/api/ReactiveDict", + }, + { + text: "EJSON", + link: "/api/EJSON", + }, + { + text: "Assets", + link: "/api/assets", + }, + { + text: "Mobile Configuration", + link: "/api/app", + }, + { + text: "Package.js", + link: "/api/package", + }, + ], + collapsed: false, + }, + { + text: "Packages", + items: [ + { + text: "accounts-ui", + link: "/packages/accounts-ui", + }, + { + text: "accounts-passwordless", + link: "/packages/accounts-passwordless", + }, + { + text: "accounts-2fa", + link: "/packages/accounts-2fa", + }, + { + text: "appcache", + link: "/packages/appcache", + }, + { + text: "audit-arguments-checks", + link: "/packages/audit-argument-checks", + }, + { + text: "autoupdate", + link: "/packages/autoupdate", + }, + { + text: "browser-policy", + link: "/packages/browser-policy", + }, + { + text: "bundler-visualizer", + link: "/packages/bundle-visualizer", + }, + { + text: "coffeescript", + link: "/packages/coffeescript", + }, + { + text: "ecmascript", + link: "/packages/ecmascript", + }, + { + text: "fetch", + link: "/packages/fetch", + }, + { + text: "hot-module-replacement", + link: "/packages/hot-module-replacement", + }, + { + text: "less", + link: "/packages/less", + }, + { + text: "logging", + link: "/packages/logging", + }, + { + text: "markdown", + link: "/packages/markdown", + }, + { + text: "modules", + link: "/packages/modules", + }, + { + text: "oauth-encryption", + link: "/packages/oauth-encryption", + }, + { + text: "random", + link: "/packages/random", + }, + { + text: "server-render", + link: "/packages/server-render", + }, + { + text: "standard-minifier-css", + link: "/packages/standard-minifier-css", + }, + { + text: "underscore", + link: "/packages/underscore", + }, + { + text: "url", + link: "/packages/url", + }, + { + text: "webapp", + link: "/packages/webapp", + }, + { + link: "packages/packages-listing", + text: "Maintained Packages", + }, + ], + collapsed: true, + }, + { + text: "Troubleshooting", + items: [ + { + text: "Expired Certificates", + link: "/troubleshooting/expired-certificate", + }, + { text: "Windows", link: "/troubleshooting/windows" }, + { + text: "Known issues in 2.13", + link: "/troubleshooting/known-issues", + }, + ], + collapsed: true, + }, + { + text: "Command Line", + items: [ + { link: "cli/index", text: "CLI" }, + { link: "cli/using-core-types", text: "Using Core Types" }, + { link: "cli/environment-variables", text: "Environment Variables" }, + ], + collapsed: true, + }, + { + text: "Changelog", + items: [ + // TODO: Open issue in Vitepress about this + { link: "/history", text: "Current" }, + { + link: "https://docs.meteor.com/changelog#v2020210120", + text: "Pre-2.0", + }, + ], + collapsed: true, + }, + ], + + socialLinks: [{ icon: "github", link: "https://github.com/meteor/meteor" }], + logo: { dark: "/meteor-logo.png", light: "/meteor-blue.png" }, + + search: { + provider: "local", + }, + footer: { + message: + 'Released under the MIT License.', + copyright: + 'Copyright (c) 2011 - present Meteor Software.', + }, + editLink: { + pattern: "https://github.com/meteor/meteor/edit/main/v3-docs/docs/:path", + text: "Edit this page on GitHub", + }, + }, +}); diff --git a/v3-docs/docs/.vitepress/theme/Layout.vue b/v3-docs/docs/.vitepress/theme/Layout.vue new file mode 100644 index 0000000000..67036ae37e --- /dev/null +++ b/v3-docs/docs/.vitepress/theme/Layout.vue @@ -0,0 +1,80 @@ + + + + + diff --git a/v3-docs/docs/.vitepress/theme/index.ts b/v3-docs/docs/.vitepress/theme/index.ts new file mode 100644 index 0000000000..afddc3f960 --- /dev/null +++ b/v3-docs/docs/.vitepress/theme/index.ts @@ -0,0 +1,17 @@ +// .vitepress/theme/index.ts +import type { Theme } from "vitepress"; +import DefaultTheme from "vitepress/theme"; +import ApiBox from "../../components/ApiBox.vue"; +import ApiMap from "../../components/ApiMap.vue"; +import Layout from "./Layout.vue"; +import "./theme.css"; + +export default { + extends: DefaultTheme, + enhanceApp({ app }) { + // register your custom global components + app.component("ApiBox", ApiBox); + app.component("ApiMap", ApiMap); + }, + Layout, +} satisfies Theme; diff --git a/v3-docs/docs/.vitepress/theme/redirects/redirects.json b/v3-docs/docs/.vitepress/theme/redirects/redirects.json new file mode 100644 index 0000000000..f6dc86f381 --- /dev/null +++ b/v3-docs/docs/.vitepress/theme/redirects/redirects.json @@ -0,0 +1,4 @@ +{ + "meteor_call": "meteor-call", + "ddp_connect": "DDP-connect" +} diff --git a/v3-docs/docs/.vitepress/theme/redirects/script.js b/v3-docs/docs/.vitepress/theme/redirects/script.js new file mode 100644 index 0000000000..0e7268824c --- /dev/null +++ b/v3-docs/docs/.vitepress/theme/redirects/script.js @@ -0,0 +1,18 @@ +// import json from './redirects.json'; +/** + * + * @param {string} path + */ +export const redirect = (path) => { + let shouldRedirect = false; + console.log(path) + if (path.includes("_")) { + shouldRedirect = true; + path = path.replace("_", "-"); + } + + return { + path, + shouldRedirect + }; +}; diff --git a/v3-docs/docs/.vitepress/theme/theme.css b/v3-docs/docs/.vitepress/theme/theme.css new file mode 100644 index 0000000000..9fb81aef42 --- /dev/null +++ b/v3-docs/docs/.vitepress/theme/theme.css @@ -0,0 +1,557 @@ +/** + * Colors: Solid + * -------------------------------------------------------------------------- */ + + :root { + --vp-c-white: #ffffff; + --vp-c-black: #000000; + + --vp-c-neutral: var(--vp-c-black); + --vp-c-neutral-inverse: var(--vp-c-white); +} + +.dark { + --vp-c-neutral: var(--vp-c-white); + --vp-c-neutral-inverse: var(--vp-c-black); +} + +/** + * Colors: Palette + * + * The primitive colors used for accent colors. These colors are referenced + * by functional colors such as "Text", "Background", or "Brand". + * + * Each colors have exact same color scale system with 3 levels of solid + * colors with different brightness, and 1 soft color. + * + * - `XXX-1`: The most solid color used mainly for colored text. It must + * satisfy the contrast ratio against when used on top of `XXX-soft`. + * + * - `XXX-2`: The color used mainly for hover state of the button. + * + * - `XXX-3`: The color for solid background, such as bg color of the button. + * It must satisfy the contrast ratio with pure white (#ffffff) text on + * top of it. + * + * - `XXX-soft`: The color used for subtle background such as custom container + * or badges. It must satisfy the contrast ratio when putting `XXX-1` colors + * on top of it. + * + * The soft color must be semi transparent alpha channel. This is crucial + * because it allows adding multiple "soft" colors on top of each other + * to create a accent, such as when having inline code block inside + * custom containers. + * -------------------------------------------------------------------------- */ + +:root { + --vp-c-gray-1: #dddde3; + --vp-c-gray-2: #e4e4e9; + --vp-c-gray-3: #ebebef; + --vp-c-gray-soft: rgba(142, 150, 170, 0.14); + + --vp-c-indigo-1: #3451b2; + --vp-c-indigo-2: #3a5ccc; + --vp-c-indigo-3: #5672cd; + --vp-c-indigo-soft: rgba(100, 108, 255, 0.14); + + --vp-c-blue-1: #383695; + --vp-c-blue-2: #3e3e9e; + --vp-c-blue-3: #4c4ca7; + --vp-c-blue-soft: rgba(100, 108, 255, 0.14); + + --vp-c-green-1: #18794e; + --vp-c-green-2: #299764; + --vp-c-green-3: #30a46c; + --vp-c-green-soft: rgba(16, 185, 129, 0.14); + + --vp-c-orange-1: #FF6A3E; + --vp-c-orange-2: #FF7A4D; + --vp-c-orange-3: #FF8A5C; + --vp-c-orange-soft: rgba(255, 106, 62, 0.14); + + --vp-c-meteor-red-1: #BF212E; + --vp-c-meteor-red-2: #A01A24; + --vp-c-meteor-red-3: #7F141D; + --vp-c-meteor-red-soft: rgba(191, 33, 46, 0.16); + + --vp-c-yellow-1: #915930; + --vp-c-yellow-2: #946300; + --vp-c-yellow-3: #9f6a00; + --vp-c-yellow-soft: rgba(234, 179, 8, 0.14); + + --vp-c-red-1: #b8272c; + --vp-c-red-2: #d5393e; + --vp-c-red-3: #e0575b; + --vp-c-red-soft: rgba(244, 63, 94, 0.14); + + --vp-c-sponsor: #db2777; +} + +.dark { + --vp-c-gray-1: #515c67; + --vp-c-gray-2: #414853; + --vp-c-gray-3: #32363f; + --vp-c-gray-soft: rgba(101, 117, 133, 0.16); + + --vp-c-indigo-1: #a8b1ff; + --vp-c-indigo-2: #5c73e7; + --vp-c-indigo-3: #3e63dd; + --vp-c-indigo-soft: rgba(100, 108, 255, 0.16); + + --vp-c-blue-1: #4b6cb7; + --vp-c-blue-2: #3e4f8c; + --vp-c-blue-3: #36436b; + --vp-c-blue-soft: rgba(100, 108, 255, 0.16); + + --vp-c-green-1: #3dd68c; + --vp-c-green-2: #30a46c; + --vp-c-green-3: #298459; + --vp-c-green-soft: rgba(16, 185, 129, 0.16); + + --vc-c-orange-1: #ff7e17; + --vc-c-orange-2: #e66c00; + --vc-c-orange-3: #b35e00; + --vc-c-orange-soft: rgba(255, 126, 23, 0.16); + + --vc-c-meteor-red-1: #BF212E; + --vc-c-meteor-red-2: #A01A24; + --vc-c-meteor-red-3: #7F141D; + --vc-c-meteor-red-soft: rgba(191, 33, 46, 0.16); + + --vp-c-yellow-1: #f9b44e; + --vp-c-yellow-2: #da8b17; + --vp-c-yellow-3: #a46a0a; + --vp-c-yellow-soft: rgba(234, 179, 8, 0.16); + + --vp-c-red-1: #f66f81; + --vp-c-red-2: #f14158; + --vp-c-red-3: #b62a3c; + --vp-c-red-soft: rgba(244, 63, 94, 0.16); +} + +/** + * Colors: Background + * + * - `bg`: The bg color used for main screen. + * + * - `bg-alt`: The alternative bg color used in places such as "sidebar", + * or "code block". + * + * - `bg-elv`: The elevated bg color. This is used at parts where it "floats", + * such as "dialog". + * + * - `bg-soft`: The bg color to slightly distinguish some components from + * the page. Used for things like "carbon ads" or "table". + * -------------------------------------------------------------------------- */ + +:root { + --vp-c-bg: #ffffff; + --vp-c-bg-alt: #f6f6f7; + --vp-c-bg-elv: #ffffff; + --vp-c-bg-soft: #f6f6f7; +} + +.dark { + + --vp-c-bg: #101926; + --vp-c-bg-alt: #0a0f1f; + --vp-c-bg-elv: #101926; + --vp-c-bg-soft: #0a0f1f; +} + +/** + * Colors: Borders + * + * - `divider`: This is used for separators. This is used to divide sections + * within the same components, such as having separator on "h2" heading. + * + * - `border`: This is designed for borders on interactive components. + * For example this should be used for a button outline. + * + * - `gutter`: This is used to divide components in the page. For example + * the header and the lest of the page. + * -------------------------------------------------------------------------- */ + +:root { + --vp-c-border: #c2c2c4; + --vp-c-divider: #e2e2e3; + --vp-c-gutter: #e2e2e3; +} + +.dark { + --vp-c-border: #3c3f44; + --vp-c-divider: #2e2e32; + --vp-c-gutter: #000000; +} + +/** + * Colors: Text + * + * - `text-1`: Used for primary text. + * + * - `text-2`: Used for muted texts, such as "inactive menu" or "info texts". + * + * - `text-3`: Used for subtle texts, such as "placeholders" or "caret icon". + * -------------------------------------------------------------------------- */ + +:root { + --vp-c-text-1: rgba(60, 60, 67); + --vp-c-text-2: rgba(60, 60, 67, 0.78); + --vp-c-text-3: rgba(60, 60, 67, 0.56); +} + +.dark { + --vp-c-text-1: rgba(255, 255, 245, 0.86); + --vp-c-text-2: rgba(235, 235, 245, 0.6); + --vp-c-text-3: rgba(235, 235, 245, 0.38); +} + +/** + * Colors: Function + * + * - `default`: The color used purely for subtle indication without any + * special meanings attached to it such as bg color for menu hover state. + * + * - `brand`: Used for primary brand colors, such as link text, button with + * brand theme, etc. + * + * - `tip`: Used to indicate useful information. The default theme uses the + * brand color for this by default. + * + * - `warning`: Used to indicate warning to the users. Used in custom + * container, badges, etc. + * + * - `danger`: Used to show error, or dangerous message to the users. Used + * in custom container, badges, etc. + * + * To understand the scaling system, refer to "Colors: Palette" section. + * -------------------------------------------------------------------------- */ + +:root { + --vp-c-default-1: var(--vp-c-gray-1); + --vp-c-default-2: var(--vp-c-gray-2); + --vp-c-default-3: var(--vp-c-gray-3); + --vp-c-default-soft: var(--vp-c-gray-soft); + + --vp-c-brand-1: var(--vp-c-meteor-red-1); + --vp-c-brand-2: var(--vp-c-meteor-red-2); + --vp-c-brand-3: var(--vp-c-meteor-red-3); + --vp-c-brand-soft: var(--vp-c-blue-soft); + + /* DEPRECATED: Use `--vp-c-brand-1` instead. */ + --vp-c-brand: var(--vp-c-brand-1); + + --vp-c-tip-1: var(--vp-c-brand-1); + --vp-c-tip-2: var(--vp-c-brand-2); + --vp-c-tip-3: var(--vp-c-brand-3); + --vp-c-tip-soft: var(--vp-c-brand-soft); + + --vp-c-warning-1: var(--vp-c-yellow-1); + --vp-c-warning-2: var(--vp-c-yellow-2); + --vp-c-warning-3: var(--vp-c-yellow-3); + --vp-c-warning-soft: var(--vp-c-yellow-soft); + + --vp-c-danger-1: var(--vp-c-red-1); + --vp-c-danger-2: var(--vp-c-red-2); + --vp-c-danger-3: var(--vp-c-red-3); + --vp-c-danger-soft: var(--vp-c-red-soft); +} + +/** + * Typography + * -------------------------------------------------------------------------- */ + +:root { + --vp-font-family-base: 'Chinese Quotes', 'Inter var', 'Inter', ui-sans-serif, + system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, + 'Helvetica Neue', Helvetica, Arial, 'Noto Sans', sans-serif, + 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji'; + --vp-font-family-mono: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Monaco, + Consolas, 'Liberation Mono', 'Courier New', monospace; +} + +/** + * Shadows + * -------------------------------------------------------------------------- */ + +:root { + --vp-shadow-1: 0 1px 2px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.06); + --vp-shadow-2: 0 3px 12px rgba(0, 0, 0, 0.07), 0 1px 4px rgba(0, 0, 0, 0.07); + --vp-shadow-3: 0 12px 32px rgba(0, 0, 0, 0.1), 0 2px 6px rgba(0, 0, 0, 0.08); + --vp-shadow-4: 0 14px 44px rgba(0, 0, 0, 0.12), 0 3px 9px rgba(0, 0, 0, 0.12); + --vp-shadow-5: 0 18px 56px rgba(0, 0, 0, 0.16), 0 4px 12px rgba(0, 0, 0, 0.16); +} + +/** + * Z-indexes + * -------------------------------------------------------------------------- */ + +:root { + --vp-z-index-footer: 10; + --vp-z-index-local-nav: 20; + --vp-z-index-nav: 30; + --vp-z-index-layout-top: 40; + --vp-z-index-backdrop: 50; + --vp-z-index-sidebar: 60; +} + +/** + * Icons + * -------------------------------------------------------------------------- */ + +:root { + --vp-icon-copy: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' height='20' width='20' stroke='rgba(128,128,128,1)' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M9 5H7a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2h-2M9 5a2 2 0 0 0 2 2h2a2 2 0 0 0 2-2M9 5a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2'/%3E%3C/svg%3E"); + --vp-icon-copied: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' height='20' width='20' stroke='rgba(128,128,128,1)' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M9 5H7a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2h-2M9 5a2 2 0 0 0 2 2h2a2 2 0 0 0 2-2M9 5a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2m-6 9 2 2 4-4'/%3E%3C/svg%3E"); +} + +/** + * Layouts + * -------------------------------------------------------------------------- */ + +:root { + --vp-layout-max-width: 1440px; +} + +/** + * Component: Header Anchor + * -------------------------------------------------------------------------- */ + +:root { + --vp-header-anchor-symbol: '#'; +} + +/** + * Component: Code + * -------------------------------------------------------------------------- */ + +:root { + --vp-code-line-height: 1.7; + --vp-code-font-size: 0.875em; + --vp-code-color: var(--vp-c-brand-1); + --vp-code-link-color: var(--vp-c-brand-1); + --vp-code-link-hover-color: var(--vp-c-brand-2); + --vp-code-bg: var(--vp-c-default-soft); + + --vp-code-block-color: var(--vp-c-text-2); + --vp-code-block-bg: var(--vp-c-bg-alt); + --vp-code-block-divider-color: var(--vp-c-gutter); + + --vp-code-lang-color: var(--vp-c-text-3); + + --vp-code-line-highlight-color: var(--vp-c-default-soft); + --vp-code-line-number-color: var(--vp-c-text-3); + + --vp-code-line-diff-add-color: var(--vp-c-green-soft); + --vp-code-line-diff-add-symbol-color: var(--vp-c-green-1); + + --vp-code-line-diff-remove-color: var(--vp-c-red-soft); + --vp-code-line-diff-remove-symbol-color: var(--vp-c-red-1); + + --vp-code-line-warning-color: var(--vp-c-yellow-soft); + --vp-code-line-error-color: var(--vp-c-red-soft); + + --vp-code-copy-code-border-color: var(--vp-c-divider); + --vp-code-copy-code-bg: var(--vp-c-bg-soft); + --vp-code-copy-code-hover-border-color: var(--vp-c-divider); + --vp-code-copy-code-hover-bg: var(--vp-c-bg); + --vp-code-copy-code-active-text: var(--vp-c-text-2); + --vp-code-copy-copied-text-content: 'Copied'; + + --vp-code-tab-divider: var(--vp-code-block-divider-color); + --vp-code-tab-text-color: var(--vp-c-text-2); + --vp-code-tab-bg: var(--vp-code-block-bg); + --vp-code-tab-hover-text-color: var(--vp-c-text-1); + --vp-code-tab-active-text-color: var(--vp-c-text-1); + --vp-code-tab-active-bar-color: var(--vp-c-brand-1); +} + +/** + * Component: Button + * -------------------------------------------------------------------------- */ + +:root { + --vp-button-brand-border: transparent; + --vp-button-brand-text: var(--vp-c-white); + --vp-button-brand-bg: var(--vp-c-blue-3); + --vp-button-brand-hover-border: transparent; + --vp-button-brand-hover-text: var(--vp-c-white); + --vp-button-brand-hover-bg: var(--vp-c-blue-2); + --vp-button-brand-active-border: transparent; + --vp-button-brand-active-text: var(--vp-c-white); + --vp-button-brand-active-bg: var(--vp-c-blue-1); + + --vp-button-alt-border: transparent; + --vp-button-alt-text: var(--vp-c-text-1); + --vp-button-alt-bg: var(--vp-c-default-3); + --vp-button-alt-hover-border: transparent; + --vp-button-alt-hover-text: var(--vp-c-text-1); + --vp-button-alt-hover-bg: var(--vp-c-default-2); + --vp-button-alt-active-border: transparent; + --vp-button-alt-active-text: var(--vp-c-text-1); + --vp-button-alt-active-bg: var(--vp-c-default-1); + + --vp-button-sponsor-border: var(--vp-c-text-2); + --vp-button-sponsor-text: var(--vp-c-text-2); + --vp-button-sponsor-bg: transparent; + --vp-button-sponsor-hover-border: var(--vp-c-sponsor); + --vp-button-sponsor-hover-text: var(--vp-c-sponsor); + --vp-button-sponsor-hover-bg: transparent; + --vp-button-sponsor-active-border: var(--vp-c-sponsor); + --vp-button-sponsor-active-text: var(--vp-c-sponsor); + --vp-button-sponsor-active-bg: transparent; +} + +/** + * Component: Custom Block + * -------------------------------------------------------------------------- */ + +:root { + --vp-custom-block-font-size: 14px; + --vp-custom-block-code-font-size: 13px; + + --vp-custom-block-info-border: transparent; + --vp-custom-block-info-text: var(--vp-c-text-1); + --vp-custom-block-info-bg: var(--vp-c-default-soft); + --vp-custom-block-info-code-bg: var(--vp-c-default-soft); + + --vp-custom-block-tip-border: transparent; + --vp-custom-block-tip-text: var(--vp-c-text-1); + --vp-custom-block-tip-bg: var(--vp-c-brand-soft); + --vp-custom-block-tip-code-bg: var(--vp-c-brand-soft); + + --vp-custom-block-warning-border: transparent; + --vp-custom-block-warning-text: var(--vp-c-text-1); + --vp-custom-block-warning-bg: var(--vp-c-warning-soft); + --vp-custom-block-warning-code-bg: var(--vp-c-warning-soft); + + --vp-custom-block-danger-border: transparent; + --vp-custom-block-danger-text: var(--vp-c-text-1); + --vp-custom-block-danger-bg: var(--vp-c-danger-soft); + --vp-custom-block-danger-code-bg: var(--vp-c-danger-soft); + + --vp-custom-block-details-border: var(--vp-custom-block-info-border); + --vp-custom-block-details-text: var(--vp-custom-block-info-text); + --vp-custom-block-details-bg: var(--vp-custom-block-info-bg); + --vp-custom-block-details-code-bg: var(--vp-custom-block-info-code-bg); +} + +/** + * Component: Input + * -------------------------------------------------------------------------- */ + +:root { + --vp-input-border-color: var(--vp-c-border); + --vp-input-bg-color: var(--vp-c-bg-alt); + + --vp-input-switch-bg-color: var(--vp-c-gray-soft); +} + +/** + * Component: Nav + * -------------------------------------------------------------------------- */ + +:root { + --vp-nav-height: 64px; + --vp-nav-bg-color: var(--vp-c-bg); + --vp-nav-screen-bg-color: var(--vp-c-bg); + --vp-nav-logo-height: 24px; +} + +.hide-nav { + --vp-nav-height: 0px; +} + +.hide-nav .VPSidebar { + --vp-nav-height: 22px; +} + +/** + * Component: Local Nav + * -------------------------------------------------------------------------- */ + +:root { + --vp-local-nav-bg-color: var(--vp-c-bg); +} + +/** + * Component: Sidebar + * -------------------------------------------------------------------------- */ + +:root { + --vp-sidebar-width: 272px; + --vp-sidebar-bg-color: var(--vp-c-bg-alt); +} + +/** + * Colors Backdrop + * -------------------------------------------------------------------------- */ + +:root { + --vp-backdrop-bg-color: rgba(0, 0, 0, 0.6); +} + +/** + * Component: Home + * -------------------------------------------------------------------------- */ + +:root { + --vp-home-hero-name-color: var(--vp-c-brand-1); + --vp-home-hero-name-background: transparent; + + --vp-home-hero-image-background-image: none; + --vp-home-hero-image-filter: none; +} + +/** + * Component: Badge + * -------------------------------------------------------------------------- */ + +:root { + --vp-badge-info-border: transparent; + --vp-badge-info-text: var(--vp-c-text-2); + --vp-badge-info-bg: var(--vp-c-default-soft); + + --vp-badge-tip-border: transparent; + --vp-badge-tip-text: var(--vp-c-brand-1); + --vp-badge-tip-bg: var(--vp-c-brand-soft); + + --vp-badge-warning-border: transparent; + --vp-badge-warning-text: var(--vp-c-warning-1); + --vp-badge-warning-bg: var(--vp-c-warning-soft); + + --vp-badge-danger-border: transparent; + --vp-badge-danger-text: var(--vp-c-danger-1); + --vp-badge-danger-bg: var(--vp-c-danger-soft); +} + +/** + * Component: Carbon Ads + * -------------------------------------------------------------------------- */ + +:root { + --vp-carbon-ads-text-color: var(--vp-c-text-1); + --vp-carbon-ads-poweredby-color: var(--vp-c-text-2); + --vp-carbon-ads-bg-color: var(--vp-c-bg-soft); + --vp-carbon-ads-hover-text-color: var(--vp-c-brand-1); + --vp-carbon-ads-hover-poweredby-color: var(--vp-c-text-1); +} + +/** + * Component: Local Search + * -------------------------------------------------------------------------- */ + +:root { + --vp-local-search-bg: var(--vp-c-bg); + --vp-local-search-result-bg: var(--vp-c-bg); + --vp-local-search-result-border: var(--vp-c-divider); + --vp-local-search-result-selected-bg: var(--vp-c-bg); + --vp-local-search-result-selected-border: var(--vp-c-brand-1); + --vp-local-search-highlight-bg: var(--vp-c-brand-1); + --vp-local-search-highlight-text: var(--vp-c-neutral-inverse); +} + +::selection { + background: var(--vp-c-brand-soft); +} + + diff --git a/v3-docs/docs/about/install.md b/v3-docs/docs/about/install.md new file mode 100644 index 0000000000..e503b6402f --- /dev/null +++ b/v3-docs/docs/about/install.md @@ -0,0 +1,133 @@ + +# Install + +You need to install the Meteor command line tool to create, run, and manage your Meteor.js projects. Check the prerequisites and follow the installation process below. + + +## Prerequisites {#prereqs} + +### Node.js version {#prereqs-node} + +> Meteor 2.x runs on a deprecated Node.js version (14). Meteor 3.0 is in progress, and it will run on the latest Node.js version. For more information, please consult our [migration guide](https://guide.meteor.com/3.0-migration.html). + +- Node.js version >= 10 and <= 14 is required. +- We recommend you using [nvm](https://github.com/nvm-sh/nvm) or [Volta](https://volta.sh/) for managing Node.js versions. + + +### Operating System (OS) {#prereqs-os} + +- Meteor currently supports **OS X, Windows, and Linux**. Only 64-bit is supported. +- Meteor supports Windows 7 / Windows Server 2008 R2 and up. +- Apple M1 is natively supported from Meteor 2.5.1 onward (for older versions, rosetta terminal is required). +- If you are on a Mac M1 (Arm64 version) you need to have Rosetta 2 installed, as Meteor uses it for running MongoDB. Check how to install it [here](https://osxdaily.com/2020/12/04/how-install-rosetta-2-apple-silicon-mac/). +- Disabling antivirus (Windows Defender, etc.) will improve performance. +- For compatibility, Linux binaries are built with CentOS 6.4 i386/amd64. + + +### Mobile Development {#prereqs-mobile} + +- iOS development requires the latest Xcode. + + +## Installation + +Install the latest official version of Meteor.js from your terminal by running one of the commands below. You can check our [changelog](https://docs.meteor.com/changelog.html) for the release notes. + +> Run `node -v` to ensure you are using Node.js 14. Meteor 3.0 is in progress, and it will run on the latest Node.js version. + +For Windows, Linux and OS X, you can run the following command: + +```bash +npm install -g meteor +``` + +An alternative for Linux and OS X, is to install Meteor by using curl: + +```bash +curl https://install.meteor.com/ | sh +``` + +You can also install a specific Meteor.js version by using curl: + +```bash +curl https://install.meteor.com/\?release\=2.8 | sh +``` + +> Do not install the npm Meteor Tool in your project's package.json. This library is just an installer. + + +## Troubleshooting {#troubleshooting} + +If your user doesn't have permission to install global binaries, and you need to use sudo, it's necessary to append *--unsafe-perm* to the above command: + +```bash +sudo npm install -g meteor --unsafe-perm +``` + +We strongly discourage the usage of Node.js or Meteor with root permissions. +Only run the above command with sudo if you know what you are doing. + +If you only use sudo because of a distribution default permission system, [check this link for fixing it](https://docs.npmjs.com/resolving-eacces-permissions-errors-when-installing-packages-globally). + +In some cases you can get this error `npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules` because your Node.js installation was performed with wrong permissions. An easy way to fix this is to install Node.js using [nvm](https://github.com/nvm-sh/nvm) and forcing it to be used in your terminal. You can force it in the current session of your terminal by running `nvm use 14`. + + +## PATH management {#path-management} + +By default, the Meteor installer adds its install path (by default, `~/.meteor/`) to your PATH by updating either your `.bashrc`, `.bash_profile`, or `.zshrc` as appropriate. To disable this behavior, install Meteor by running: + +```bash +npm install -g meteor --ignore-meteor-setup-exec-path +``` + +(or by setting the environment variable `npm_config_ignore_meteor_setup_exec_path=true`) + + +## Old Versions on Apple M1 {#old-versions-m1} + +For Apple M1 computers, you can append Rosetta prefix as following, if you need to run older versions of Meteor (before 2.5.1): + +```bash +arch -x86_64 npm install -g meteor +``` + +or select Terminal in the Applications folder, press CMD(⌘)+I and check the "Open using Rosetta" option. + + +## Meteor Docker image {#meteor-docker} + +You can also use a Docker container for running Meteor inside your CI, or even in your local development toolchain. + +We do provide the meteor/meteor-base ubuntu-based Docker image, that comes pre-bundled with Node.JS and Meteor, and runs it as a local user (not as root). + +You can refer to our meteor/galaxy-images repository to see how to use it, and the latest version. [More about meteor-base here.](https://github.com/meteor/galaxy-images/blob/master/meteor-base/README.md) + + + +## Note for Windows users {#windows} + +On Windows, the installer runs faster when [Windows Developer Mode](https://docs.microsoft.com/en-us/windows/apps/get-started/enable-your-device-for-development) is enabled. The installation extracts a large number of small files, which Windows Defender can cause to be very slow. + + + +## Node version manager {#nvm} + +If you use a node version manager that uses a separate global `node_modules` folder for each Node version, you will need to re-install the `meteor` npm package when changing to a Node version for the first time. Otherwise, the `meteor` command will no longer be found. + + +## Note for fish shell users (Linux) {#fish-shell} + +To be able to user `meteor` command from fish it's needed to include `/home//.meteor` in `$PATH`; to do that just add this line in `/home//.config/fish/config.fish` file (replace `` with your username): + +`set PATH /home//.meteor $PATH` + + +## Uninstalling Meteor {#uninstall} + +If you installed Meteor using npm, you can remove it by running: +`meteor-installer uninstall` + +If you installed Meteor using curl, you can remove it by running: +`rm -rf ~/.meteor` +`sudo rm /usr/local/bin/meteor`  + diff --git a/v3-docs/docs/about/roadmap.md b/v3-docs/docs/about/roadmap.md new file mode 100644 index 0000000000..2046182104 --- /dev/null +++ b/v3-docs/docs/about/roadmap.md @@ -0,0 +1,84 @@ +# Roadmap + +Describes the high-level features and actions for the Meteor project in the near-to-medium term future. + +## Introduction + +**Quick update moving items to Finished: June 1, 2023** + +**Last new items added: September 14, 2022.** + +The description of many items include sentences and ideas from Meteor community members. + +Contributors are encouraged to focus their efforts on work that aligns with the roadmap then we can work together in these areas. + + +> As with any roadmap, this is a living document that will evolve as priorities and dependencies shift. + +> If you have new feature requests or ideas you should open a new [discussion](https://github.com/meteor/meteor/discussions/new). + +### Meteor 3.0 release + +- Change how Meteor executes Async code; ([Discussion](https://github.com/meteor/meteor/discussions/11505)) + - Provide new async APIs where Fibers are required; + - Mongo package with Async API; ([PR](https://github.com/meteor/meteor/pull/12028)) + - Provide async versions for Accounts and core packages; + - Adapt Meteor Promise implementation; +- Enable Top-Level Await (TLA) on Meteor server-side; ([PR](https://github.com/meteor/meteor/pull/12095)) +- Support Top-Level Await (TLA) on Reify; +- Remove Fibers dependency from Meteor Public APIs; +- Remove Fibers entirely; +- Update Cordova integration to Meteor 3.0; +- Run Meteor on Node.js 18; +- Change web engine from Connect to Express; + +### Next releases + +- Improve TypeScript support for Meteor and packages; ([Discussion](https://github.com/meteor/meteor/discussions/12080)) +- Linux ARM Support; ([PR](https://github.com/meteor/meteor/pull/11809)) +- Improve release quality with test coverage and CI automation; +- Review and help to modernize Meteor tools; ([Discussion](https://github.com/meteor/meteor/discussions/12073)) +- Improve support for Windows 11 or adopt Windows with WSL; +- Improve Meteor build time; ([Discussion](https://github.com/meteor/meteor/discussions/11587)) +- HTTP/3 Support; +- Tree-shaking; ([PR](https://github.com/meteor/meteor/pull/11164)) +- Support package.json exports fields; ([Discussion](https://github.com/meteor/meteor/discussions/11727)) + +### Candidate items +We need to discuss further to decide whether or not to proceed with these implementations. + +- Update and fix Meteor Client Bundler or Improve DDP Client; +- Improve Passwordless package; ([Discussion](https://github.com/meteor/meteor/discussions/12075)) +- Support building mobile apps using CapacitorJS; +- Bring Redis-oplog to core; ([Repository](https://github.com/Meteor-Community-Packages/redis-oplog)) +- MongoDB Change Streams support; ([Discussion](https://github.com/meteor/meteor/discussions/11842)) +- Better file upload support via DDP; ([Discussion](https://github.com/meteor/meteor/discussions/11523)) + +### Next educational items + +- Create a new Meteor Guide; ([Current Guide](https://guide.meteor.com/)) +- Scaling Meteor Apps course; ([Meteor University](https://university.meteor.com/)) + +### Finished items + +- New Async Tracker; ([Blog Post](https://blog.meteor.com/new-meteor-js-2-10-and-the-async-tracker-feature-ffdbe817c801)) +- New Suspense hooks for React + Meteor; ([Blog Post](https://blog.meteor.com/new-suspense-hooks-for-meteor-5391570b3007)) +- Release Blaze 2.7 supporting async calls; ([Changelog](https://www.blazejs.org/changelog.html)) +- New Scaffold API / generate command; ([Blog Post](https://blog.meteor.com/new-meteor-2-9-and-the-scaffold-api-8b5b2b2b2b2b)) +- Types added to the core; ([Blog Post](https://blog.meteor.com/new-meteor-2-8-1-and-adding-types-to-the-core-8a6ee56f0141)) +- Update Apollo skeleton NPM dependencies; +- MongoDB 6.0 Support; ([Discussion](https://github.com/meteor/meteor/discussions/12092) / [Blog Post](https://blog.meteor.com/new-meteor-2-11-and-the-new-embedded-mongodb-19767076961b)) +- Vite integration; +- SolidJS integration; +- Vue 3 integration; ([Forums](https://forums.meteor.com/t/status-of-vue-3-meteor/57915/25) / [Discussion](https://github.com/meteor/meteor/discussions/11521)) +- SolidJS starter template; +- Login and Accounts Course; ([Meteor University](https://university.meteor.com/)) +- Updated MongoDB driver to 4.8; ([PR](https://github.com/meteor/meteor/pull/12097)) +- Make MongoDB integration stable by fixing critical issues; +- New skeleton for creating Meteor apps with Chakra UI; +- Evaluate and improve support for Meteor in VSCode; ([Repository](https://github.com/matheusccastroo/vscode-meteor-toolbox)) +- Release Blaze 2.6.2; ([Blog Post](https://blog.meteor.com/new-meteor-js-2-12-and-the-blaze-2-6-2-release-b72c2a7a593f)) + +----------- + +For more completed items, refer to our [changelog](https://docs.meteor.com/changelog.html). diff --git a/v3-docs/docs/about/what-is.md b/v3-docs/docs/about/what-is.md new file mode 100644 index 0000000000..f57316e1cf --- /dev/null +++ b/v3-docs/docs/about/what-is.md @@ -0,0 +1,33 @@ + + +> Meteor 2.x runs on a deprecated Node.js version (14). Meteor 3.0 is in progress, and it will run on the latest Node.js version. For more information, please consult our [migration guide](https://guide.meteor.com/3.0-migration.html). + + +# What is Meteor? {#what-is-meteor} + +Meteor is a full-stack JavaScript platform for developing modern web and mobile applications. Meteor includes a key set of technologies for building connected-client reactive applications, a build tool, and a curated set of packages from the Node.js and general JavaScript community. + +- Meteor allows you to develop in **one language**, JavaScript, in all environments: application server, web browser, and mobile device. + +- Meteor uses **data on the wire**, meaning the server sends data, not HTML, and the client renders it. + +- Meteor **embraces the ecosystem**, bringing the best parts of the extremely active JavaScript community to you in a careful and considered way. + +- Meteor provides **full stack reactivity**, allowing your UI to seamlessly reflect the true state of the world with minimal development effort. + +## Meteor resources {#learning-more} + +1. First, learn how to install meteor in the [installation section](/about/install.html). + +1. The place to get started with Meteor is the [tutorials page](https://www.meteor.com/developers/tutorials). + +1. [Meteor Examples](https://github.com/meteor/examples) is a list of examples using Meteor. You can also include your example with Meteor. + +1. Once you are familiar with the basics, the [Meteor Guide](http://guide.meteor.com) covers intermediate material on how to use Meteor in a larger scale app. + +1. Visit the [Meteor discussion forums](https://forums.meteor.com) to announce projects, get help, talk about the community, or discuss changes to core. + +1. [Meteor Slack Community](https://join.slack.com/t/meteor-community/shared_invite/enQtODA0NTU2Nzk5MTA3LWY5NGMxMWRjZDgzYWMyMTEyYTQ3MTcwZmU2YjM5MTY3MjJkZjQ0NWRjOGZlYmIxZjFlYTA5Mjg4OTk3ODRiOTc) is the best place to ask (and answer!) technical questions and also meet Meteor developers. + +1. [Atmosphere](https://atmospherejs.com) is the repository of community packages designed especially for Meteor. + diff --git a/v3-docs/docs/api-examples.md b/v3-docs/docs/api-examples.md new file mode 100644 index 0000000000..6bd8bb5c17 --- /dev/null +++ b/v3-docs/docs/api-examples.md @@ -0,0 +1,49 @@ +--- +outline: deep +--- + +# Runtime API Examples + +This page demonstrates usage of some of the runtime APIs provided by VitePress. + +The main `useData()` API can be used to access site, theme, and page data for the current page. It works in both `.md` and `.vue` files: + +```md + + +## Results + +### Theme Data +
{{ theme }}
+ +### Page Data +
{{ page }}
+ +### Page Frontmatter +
{{ frontmatter }}
+``` + + + +## Results + +### Theme Data +
{{ theme }}
+ +### Page Data +
{{ page }}
+ +### Page Frontmatter +
{{ frontmatter }}
+ +## More + +Check out the documentation for the [full list of runtime APIs](https://vitepress.dev/reference/runtime-api#usedata). diff --git a/v3-docs/docs/api/DDPRateLimiter.md b/v3-docs/docs/api/DDPRateLimiter.md new file mode 100644 index 0000000000..d5c56679a8 --- /dev/null +++ b/v3-docs/docs/api/DDPRateLimiter.md @@ -0,0 +1,81 @@ +# DDPRateLimiter + +Customize rate limiting for methods and subscriptions to avoid a high load of WebSocket messages in your app. + +> Galaxy (Meteor hosting) offers additional App Protection, [read more](https://galaxy-guide.meteor.com/protection.html) and try it with our [free 30-day trial](https://www.meteor.com/hosting). + +By default, `DDPRateLimiter` is configured with a single rule. This rule +limits login attempts, new user creation, and password resets to 5 attempts +every 10 seconds per connection. It can be removed by calling +`Accounts.removeDefaultRateLimit()`. + +To use `DDPRateLimiter` for modifying the default rate-limiting rules, +add the `ddp-rate-limiter` package to your project in your terminal: + +```bash +meteor add ddp-rate-limiter +``` + + + +Custom rules can be added by calling `DDPRateLimiter.addRule`. The rate +limiter is called on every method and subscription invocation. + +A rate limit is reached when a bucket has surpassed the rule's predefined +capacity, at which point errors will be returned for that input until the +buckets are reset. Buckets are regularly reset after the end of a time +interval. + + +Here's example of defining a rule and adding it into the `DDPRateLimiter`: +```js +// Define a rule that matches login attempts by non-admin users. +const loginRule = { + userId(userId) { + const user = Meteor.users.findOne(userId); + return user && user.type !== 'admin'; + }, + + type: 'method', + name: 'login' +}; + +// Add the rule, allowing up to 5 messages every 1000 milliseconds. +DDPRateLimiter.addRule(loginRule, 5, 1000); + +``` + + + + + +Allows developers to specify custom error messages for each rule instead of being +limited to one global error message for every rule. +It adds some clarity to what rules triggered which errors, allowing for better UX +and also opens the door for i18nable error messages per rule instead of the +default English error message. + +Here is an example with a custom error message: +```js +const setupGoogleAuthenticatorRule = { + userId(userId) { + const user = Meteor.users.findOne(userId); + return user; + }, + type: 'method', + name: 'Users.setupGoogleAuthenticator', +}; + +// Add the rule, allowing up to 1 google auth setup message every 60 seconds +const ruleId = DDPRateLimiter.addRule(setupGoogleAuthenticatorRule, 1, 60000); +DDPRateLimiter.setErrorMessageOnRule(ruleId, function (data) { + return `You have reached the maximum number of Google Authenticator attempts. Please try again in ${Math.ceil(data.timeToReset / 1000)} seconds.`; +}); +``` + +Or a more simple approach: + +```js +const ruleId = DDPRateLimiter.addRule(setupGoogleAuthenticatorRule, 1, 60000); +DDPRateLimiter.setErrorMessageOnRule(ruleId, 'Example as a single string error message'); +``` diff --git a/v3-docs/docs/api/EJSON.md b/v3-docs/docs/api/EJSON.md new file mode 100644 index 0000000000..df817913b2 --- /dev/null +++ b/v3-docs/docs/api/EJSON.md @@ -0,0 +1,130 @@ +# EJSON + +EJSON is an extension of JSON to support more types. It supports all JSON-safe types, as well as: + +- **Date** (JavaScript `Date`) +- **Binary** (JavaScript `Uint8Array` or the + result of [`EJSON.newBinary`](#EJSON-newBinary)) +- **Special numbers** (JavaScript `NaN`, `Infinity`, and `-Infinity`) +- **Regular expressions** (JavaScript `RegExp`) +- **User-defined types** (see [`EJSON.addType`](#EJSON-addType). For example, + [`Mongo.ObjectID`](./collections.md#Mongo-ObjectID) is implemented this way.) + +All EJSON serializations are also valid JSON. For example an object with a date +and a binary buffer would be serialized in EJSON as: + +```json +{ + "d": { "$date": 1358205756553 }, + "b": { "$binary": "c3VyZS4=" } +} +``` + +Meteor supports all built-in EJSON data types in publishers, method arguments +and results, Mongo databases, and [`Session`](./session.md) variables. + + + + + +```js +import { EJSON } from "meteor/ejson"; + +EJSON.stringify( + { num: 42, someProp: "foo" }, + options // this param is optional +); +``` + + + + + + + + + + + +Buffers of binary data are represented by `Uint8Array` instances on JavaScript +platforms that support them. On implementations of JavaScript that do not +support `Uint8Array`, binary data buffers are represented by standard arrays +containing numbers ranging from 0 to 255, and the `$Uint8ArrayPolyfill` key +set to `true`. + + + + + +The factory function passed to the `EJSON.addType` method should create an instance of our custom type and initialize it with values from an object passed as the first argument of the factory function. Here is an example: + +```js +class Distance { + constructor(value, unit) { + this.value = value; + this.unit = unit; + } + + // Convert our type to JSON. + toJSONValue() { + return { + value: this.value, + unit: this.unit, + }; + } + + // Unique type name. + typeName() { + return "Distance"; + } +} + +EJSON.addType("Distance", function fromJSONValue(json) { + return new Distance(json.value, json.unit); +}); + +EJSON.stringify(new Distance(10, "m")); +// Returns '{"$type":"Distance","$value":{"value":10,"unit":"m"}}' +``` + +When you add a type to EJSON, Meteor will be able to use that type in: + +- publishing objects of your type if you pass them to publish handlers. +- allowing your type in the return values or arguments to + [methods](./meteor.md#methods). +- storing your type client-side in Minimongo. +- allowing your type in [`Session`](./session.md) variables. + +Instances of your type must implement [`typeName`](#EJSON-CustomType-typeName) and +[`toJSONValue`](#EJSON-CustomType-toJSONValue) methods, and may implement +[`clone`](#EJSON-CustomType-clone) and [`equals`](#EJSON-CustomType-equals) methods if the +default implementations are not sufficient. + + + + +For example, the `toJSONValue` method for +[`Mongo.ObjectID`](./collections.md#Mongo-ObjectID) could be: + +```js +function () { + return this.toHexString(); +} +``` + + + +If your type does not have a `clone` method, `EJSON.clone` will use +[`toJSONValue`](#EJSON-CustomType-toJSONValue) and the factory instead. + + + +The `equals` method should define an [equivalence relation](http://en.wikipedia.org/wiki/Equivalence_relation). It should have +the following properties: + +- _Reflexivity_ - for any instance `a`: `a.equals(a)` must be true. +- _Symmetry_ - for any two instances `a` and `b`: `a.equals(b)` if and only if `b.equals(a)`. +- _Transitivity_ - for any three instances `a`, `b`, and `c`: `a.equals(b)` and `b.equals(c)` implies `a.equals(c)`. + +If your type does not have an `equals` method, `EJSON.equals` will compare the +result of calling [`toJSONValue`](#EJSON-CustomType-toJSONValue) instead. diff --git a/v3-docs/docs/api/ReactiveDict.md b/v3-docs/docs/api/ReactiveDict.md new file mode 100644 index 0000000000..0304f3fdda --- /dev/null +++ b/v3-docs/docs/api/ReactiveDict.md @@ -0,0 +1,119 @@ +# Reactive Dict + +A ReactiveDict stores an arbitrary set of key-value pairs. Use it to manage +internal state in your components, ie. like the currently selected item in a list. +Each key is individully reactive such that calling `set` for a key will +invalidate any Computations that called `get` with that key, according to the +usual contract for reactive data sources. + +That means if you call [`ReactiveDict#get`](#ReactiveDict-get)`('currentList')` +from inside a Blaze template helper, the template will automatically be rerendered +whenever [`ReactiveDict#set`](#ReactiveDict-set)`('currentList', x)` is called. + +To use `ReactiveDict`, add the `reactive-dict` package to your project by running +in your terminal: + +```bash +meteor add reactive-dict +``` + + + + +If you provide a name to its constructor, its contents will be saved across Hot +Code Push client code updates. + + + +Example: + +```js +import { ReactiveDict } from "meteor/reactive-dict"; +import { Tracker } from "meteor/tracker"; +import { Meteor } from "meteor/meteor"; + +const state = new ReactiveDict(); +state.set("currentRoomId", "random"); + +Tracker.autorun(() => { + Meteor.subscribe("chatHistory", { room: state.get("currentRoomId") }); +}); + +// Causes the function passed to `Tracker.autorun` to be rerun, so that the +// 'chatHistory' subscription is moved to the room 'general'. +state.set("currentRoomId", "general"); +``` + +`ReactiveDict.set` can also be called with an object of keys and values, which is +equivalent to calling `ReactiveDict.set` individually on each key/value pair. + +```js +import { ReactiveDict } from "meteor/reactive-dict"; +const state = new ReactiveDict(); +state.set({ + a: "foo", + b: "bar", +}); +``` + + + +This is useful in initialization code, to avoid re-initializing your state +every time a new version of your app is loaded. + + + +Example in Blaze: + +::: code-group + +```html [main.html] + +``` + +```js [main.js] +Template.main.onCreated(function () { + this.state = new ReactiveDict(); + this.state.set("enemy", "Eastasia"); +}); +Template.main.helpers({ + theEnemy() { + const inst = Template.instance(); + return inst.state.get("enemy"); + }, +}); +Template.main.events({ + "click .change-enemy"(event, inst) { + inst.state.set("enemy", "Eurasia"); + }, +}); + +// Clicking the button will change the page to say "We've always been at war with Eurasia" +``` +::: + + + + + +If value is a scalar, then these two expressions do the same thing: + +```js +import { ReactiveDict } from "meteor/reactive-dict"; +const state = new ReactiveDict(); +// ... +state.get("key") === value; +state.equals("key", value); +``` + +However, the second is recommended, as it triggers fewer invalidations +(template redraws), making your program more efficient. + + + + + + diff --git a/v3-docs/docs/api/ReactiveVar.md b/v3-docs/docs/api/ReactiveVar.md new file mode 100644 index 0000000000..76218bce14 --- /dev/null +++ b/v3-docs/docs/api/ReactiveVar.md @@ -0,0 +1,41 @@ +# ReactiveVar + +To use `ReactiveVar`, add the `reactive-var` package to your project by running +in your terminal: + +```bash +meteor add reactive-var +``` + + + + +A ReactiveVar holds a single value that can be get and set, such that calling +`set` will invalidate any Computations that called `get`, according to the +usual contract for reactive data sources. + +A ReactiveVar is similar to a Session variable, with a few differences: + +- ReactiveVars don't have global names, like the "foo" in `Session.get('foo')`. + Instead, they may be created and used locally, for example attached to a + template instance, as in: `this.foo.get()`. + +- ReactiveVars are not automatically migrated across hot code pushes, + whereas Session state is. + +- ReactiveVars can hold any value, while Session variables are limited to + JSON or EJSON. + +An important property of ReactiveVars — which is sometimes a +reason for using one — is that setting the value to the same +value as before has no effect; it does not trigger any invalidations. +So if one autorun sets a ReactiveVar, and another autorun gets the +ReactiveVar, a re-run of the first autorun won't necessarily trigger +the second. By default, only primitive values are compared this way, +while calling `set` on an argument that is an _object_ (not a +primitive) always counts as a change. You can configure this behavior +using the `equalsFunc` argument. + + + + diff --git a/v3-docs/docs/api/Tracker.md b/v3-docs/docs/api/Tracker.md new file mode 100644 index 0000000000..b5242b548d --- /dev/null +++ b/v3-docs/docs/api/Tracker.md @@ -0,0 +1,410 @@ +# Tracker + +Meteor has a simple dependency tracking system which allows it to +automatically rerun templates and other computations whenever +[`Session`](./session.md) variables, database queries, and other data +sources change. + +Unlike most other systems, you don't have to manually declare these +dependencies & it "just works". The mechanism is simple and +efficient. When you call a function that supports reactive updates +(such as a database query), it automatically saves the current +Computation object, if any (representing, for example, the current +template being rendered). Later, when the data changes, the function +can "invalidate" the Computation, causing it to rerun (rerendering the +template). + +Applications will find [`Tracker.autorun`](#Tracker-autorun) useful, while more +advanced facilities such as `Tracker.Dependency` and `onInvalidate` +callbacks are intended primarily for package authors implementing new +reactive data sources. + + + +`Tracker.autorun` allows you to run a function that depends on reactive data +sources, in such a way that if there are changes to the data later, +the function will be rerun. + +For example, you can monitor a cursor (which is a reactive data +source) and aggregate it into a session variable: + +```js +Tracker.autorun(() => { + const oldest = _.max(Monkeys.find().fetch(), (monkey) => { + return monkey.age; + }); + + if (oldest) { + Session.set('oldest', oldest.name); + } +}); +``` + +Or you can wait for a session variable to have a certain value, and do +something the first time it does, calling `stop` on the computation to +prevent further rerunning: + +```js +Tracker.autorun((computation) => { + if (!Session.equals('shouldAlert', true)) { + return; + } + + computation.stop(); + alert('Oh no!'); +}); +``` + +The function is invoked immediately, at which point it may alert and +stop right away if `shouldAlert` is already true. If not, the +function is run again when `shouldAlert` becomes true. + +A change to a data dependency does not cause an immediate rerun, but +rather "invalidates" the computation, causing it to rerun the next +time a flush occurs. A flush will occur automatically as soon as +the system is idle if there are invalidated computations. You can +also use [`Tracker.flush`](#Tracker-flush) to cause an immediate flush of +all pending reruns. + +If you nest calls to `Tracker.autorun`, then when the outer call stops or +reruns, the inner call will stop automatically. Subscriptions and +observers are also automatically stopped when used as part of a +computation that is rerun, allowing new ones to be established. See +[`Meteor.subscribe`](./meteor.md#Meteor-subscribe) for more information about +subscriptions and reactivity. + +If the initial run of an autorun throws an exception, the computation +is automatically stopped and won't be rerun. + +### Tracker.autorun and async callbacks +`Tracker.autorun` can accept an `async` callback function. + To preserve reactivity for the reactive variables inside the async callback function, you must use a `Tracker.withComputation` call as described below: + + + +```javascript +Tracker.autorun(async function example1(computation) { + // Code before the first await will stay reactive. + reactiveVar1.get(); // This will trigger a rerun. + + let links = await LinksCollection.findAsync({}).fetch(); // First async call will stay reactive. + + // Code after the first await looses Tracker.currentComputation: no reactivity. + reactiveVar2.get(); // This won't trigger a rerun. + + // You can bring back reactivity with the Tracker.withCompuation wrapper: + let users = await Tracker.withComputation(computation, () => Meteor.users.findAsync({}).fetch()); + + // Code below will again not be reactive, so you will need another Tracker.withComputation. + const value = Tracker.withComputation(computation, () => reactiveVar3.get()); // This will trigger a rerun. +}); +``` + +As a rule of thumb, you are okay with wrapping all reactive statements inside a `Tracker.withComputation` to preserve current computation. +But it comes at a performance cost - it should be used only where needed. + +Reason behind is, that an await implicitly *"moves"* the code below in a Promise resolved function. When this function runs (after it has been fetched from the micro task queue), `Tracker.withComputation` preserves the reference to the computation of the `Tracker.autorun`. + +The `react-meteor-data` package uses `Tracker.withComputation` to make the `useTracker` accept async callbacks. +More can be seen [here](https://github.com/meteor/react-packages/tree/master/packages/react-meteor-data#maintaining-the-reactive-context) + +### Using async callbacks in versions of Meteor prior to 2.10 +`Tracker.autorun` can accept an `async` callback function. +However, the async call back function will only be dependent on reactive functions called prior to any called functions that return a promise. + +Example 1 - autorun `example1()` **is not** dependent on reactive changes to the `Meteor.users` collection. Because it is dependent on nothing reactive it will run only once: +```javascript + Tracker.autorun(async function example1() { + let asyncData = await asyncDataFunction(); + let users = Meteor.users.find({}).fetch(); + }); +``` + +However, simply changing the order so there are no `async` calls prior to the reactive call to `Meteor.users.find`, will make the async autorun `example2()` dependent on reactive changes to the `Meteor.users` collection. + +Example 2 - autorun `example2()` **is** dependent on reactive changes to the Meteor.users collection. Changes to the `Meteor.users` collection will cause a rerun of `example2()`: +```javascript + Tracker.autorun(async function example2() { + let users = Meteor.users.find({}).fetch(); + let asyncData = await asyncDataFunction(); + }); +``` + + +Normally, when you make changes (like writing to the database), +their impact (like updating the DOM) is delayed until the system is +idle. This keeps things predictable — you can know that the DOM +won't go changing out from under your code as it runs. It's also one +of the things that makes Meteor fast. + +`Tracker.flush` forces all of the pending reactive updates to complete. +For example, if an event handler changes a Session +variable that will cause part of the user interface to rerender, the +handler can call `flush` to perform the rerender immediately and then +access the resulting DOM. + +An automatic flush occurs whenever the system is idle which performs +exactly the same work as `Tracker.flush`. The flushing process consists +of rerunning any invalidated computations. If additional +invalidations happen while flushing, they are processed as part of the +same flush until there is no more work to be done. Callbacks +registered with [`Tracker.afterFlush`](#Tracker-afterFlush) are called +after processing outstanding invalidations. + +It is illegal to call `flush` from inside a `flush` or from a running +computation. + +The [Tracker manual](https://github.com/meteor/docs/blob/master/long-form/tracker-manual.md#the-flush-cycle) +describes the motivation for the flush cycle and the guarantees made by +`Tracker.flush` and `Tracker.afterFlush`. + + + +Calls `func` with `Tracker.currentComputation` temporarily set to `null` +and returns `func`'s own return value. If `func` accesses reactive data +sources, these data sources will never cause a rerun of the enclosing +computation. + + + +This value is useful for data source implementations to determine +whether they are being accessed reactively or not. + + + +This value indicates, whether a flush is in progress or not. + + + +It's very rare to need to access `currentComputation` directly. The +current computation is used implicitly by +[`Tracker.active`](#Tracker-active) (which tests whether there is one), +[`dependency.depend()`](#Tracker-Dependency-depend) (which registers that it depends on a +dependency), and [`Tracker.onInvalidate`](#Tracker-onInvalidate) (which +registers a callback with it). + + + +See [`computation.onInvalidate`](#Tracker-Computation-onInvalidate) for more +details. + + + +Functions scheduled by multiple calls to `afterFlush` are guaranteed +to run in the order that `afterFlush` was called. Functions are +guaranteed to be called at a time when there are no invalidated +computations that need rerunning. This means that if an `afterFlush` +function invalidates a computation, that computation will be rerun +before any other `afterFlush` functions are called. + + +## Tracker.Computation {#tracker_computation} + +A Computation object represents code that is repeatedly rerun in +response to reactive data changes. Computations don't have return +values; they just perform actions, such as rerendering a template on +the screen. Computations are created using [`Tracker.autorun`](#Tracker-autorun). +Use [`stop`](#Tracker-Computation-stop) to prevent further rerunning of a +computation. + +Each time a computation runs, it may access various reactive data +sources that serve as inputs to the computation, which are called its +dependencies. At some future time, one of these dependencies may +trigger the computation to be rerun by invalidating it. When this +happens, the dependencies are cleared, and the computation is +scheduled to be rerun at flush time. + +The *current computation* +([`Tracker.currentComputation`](#Tracker-currentComputation)) is the +computation that is currently being run or rerun (computed), and the +one that gains a dependency when a reactive data source is accessed. +Data sources are responsible for tracking these dependencies using +[`Tracker.Dependency`](#Tracker-Dependency) objects. + +Invalidating a computation sets its `invalidated` property to true +and immediately calls all of the computation's `onInvalidate` +callbacks. When a flush occurs, if the computation has been invalidated +and not stopped, then the computation is rerun by setting the +`invalidated` property to `false` and calling the original function +that was passed to `Tracker.autorun`. A flush will occur when the current +code finishes running, or sooner if `Tracker.flush` is called. + +Stopping a computation invalidates it (if it is valid) for the purpose +of calling callbacks, but ensures that it will never be rerun. + +Example: + +```js +// If we're in a computation, then perform some clean-up when the current +// computation is invalidated (rerun or stopped). +if (Tracker.active) { + Tracker.onInvalidate(() => { + x.destroy(); + y.finalize(); + }); +} +``` + + + +Stopping a computation is irreversible and guarantees that it will +never be rerun. You can stop a computation at any time, including +from the computation's own run function. Stopping a computation that +is already stopped has no effect. + +Stopping a computation causes its `onInvalidate` callbacks to run +immediately if it is not currently invalidated, as well as its +`stop` callbacks. + +Nested computations are stopped automatically when their enclosing +computation is rerun. + + + +Invalidating a computation marks it to be rerun at +[flush time](#Tracker-flush), at +which point the computation becomes valid again. It is rare to +invalidate a computation manually, because reactive data sources +invalidate their calling computations when they change. Reactive data +sources in turn perform this invalidation using one or more +[`Tracker.Dependency`](#Tracker-Dependency) objects. + +Invalidating a computation immediately calls all `onInvalidate` +callbacks registered on it. Invalidating a computation that is +currently invalidated or is stopped has no effect. A computation can +invalidate itself, but if it continues to do so indefinitely, the +result will be an infinite loop. + + + +`onInvalidate` registers a one-time callback that either fires +immediately or as soon as the computation is next invalidated or +stopped. It is used by reactive data sources to clean up resources or +break dependencies when a computation is rerun or stopped. + +To get a callback after a computation has been recomputed, you can +call [`Tracker.afterFlush`](#Tracker-afterFlush) from `onInvalidate`. + + + + + + + +This property is initially false. It is set to true by `stop()` and +`invalidate()`. It is reset to false when the computation is +recomputed at flush time. + + + +This property is a convenience to support the common pattern where a +computation has logic specific to the first run. + + + +`Computation.firstRunPromise` will be set to the result of the call of the autorun function after the initial computation has been completed. If the autorun function is an async function, it'll then contain its promise, thus making the completion of the execution await-able. That allows us to manually synchronize autoruns like this: + +```js + +await Tracker.autorun(async () => { + await Meteor.userAsync(); + (...more async code...) +}).firstRunPromise; + +await Tracker.autorun(async () => { + await asyncSomeOrOther(); + (...more async code...) +}).firstRunPromise; + +``` + +For a better developer experience `firstRunPromise` is automatically appended to your async `autorun` calls so you don't have to write them yourself. Meaning this also works: + +```js + +await Tracker.autorun(async () => { + await Meteor.userAsync(); + (...more async code...) +}); + +await Tracker.autorun(async () => { + await asyncSomeOrOther(); + (...more async code...) +}); + +``` + + +## Tracker.Dependency {#Tracker-Dependency} + +A Dependency represents an atomic unit of reactive data that a +computation might depend on. Reactive data sources such as Session or +Minimongo internally create different Dependency objects for different +pieces of data, each of which may be depended on by multiple +computations. When the data changes, the computations are +invalidated. + +Dependencies don't store data, they just track the set of computations to +invalidate if something changes. Typically, a data value will be +accompanied by a Dependency object that tracks the computations that depend +on it, as in this example: + +```js +let weather = 'sunny'; +const weatherDep = new Tracker.Dependency(); + +function getWeather() { + weatherDep.depend(); + return weather; +} + +function setWeather(newWeather) { + weather = newWeather; + + // Note: We could add logic here to only call `changed` if the new value is + // different from the old value. + weatherDep.changed(); +} +``` + +This example implements a weather data source with a simple getter and +setter. The getter records that the current computation depends on +the `weatherDep` dependency using `depend()`, while the setter +signals the dependency to invalidate all dependent computations by +calling `changed()`. + +The reason Dependencies do not store data themselves is that it can be +useful to associate multiple Dependencies with the same piece of data. +For example, one Dependency might represent the result of a database +query, while another might represent just the number of documents in +the result. A Dependency could represent whether the weather is sunny +or not, or whether the temperature is above freezing. +[`Session.equals`](./session.md#Session-equals) is implemented this way for +efficiency. When you call `Session.equals('weather', 'sunny')`, the +current computation is made to depend on an internal Dependency that +does not change if the weather goes from, say, `rainy` to `cloudy`. + +Conceptually, the only two things a Dependency can do are gain a +dependent and change. + +A Dependency's dependent computations are always valid (they have +`invalidated === false`). If a dependent is invalidated at any time, +either by the Dependency itself or some other way, it is immediately +removed. + +See the [Tracker manual](https://github.com/meteor/docs/blob/master/long-form/tracker-manual.md#creating-a-reactive-value-using-trackerdependency) +to learn how to create a reactive data source using `Tracker.Dependency`. + + + + + +`dependency.depend()` is used in reactive data source implementations to record +the fact that `dependency` is being accessed from the current computation. + + + +For reactive data sources that create many internal Dependencies, +this function is useful to determine whether a particular Dependency is +still tracking any dependency relationships or if it can be cleaned up +to save memory. diff --git a/v3-docs/docs/api/accounts.md b/v3-docs/docs/api/accounts.md new file mode 100644 index 0000000000..039d4c42ad --- /dev/null +++ b/v3-docs/docs/api/accounts.md @@ -0,0 +1,950 @@ +# Accounts + +## Accounts-base {#accounts-base} + +The Meteor Accounts system builds on top of the `userId` support in +[`publish`](./meteor#Subscription-userId) and [`methods`](./meteor#methods-userId). The core +packages add the concept of user documents stored in the database, and +additional packages add [secure password authentication](#passwords), +[integration with third party login services](#Meteor-loginWith%3CExternalService%3E), +and a [pre-built userinterface](/packages/accounts-ui.html). + +The basic Accounts system is in the `accounts-base` package, but +applications typically include this automatically by adding one of the +login provider packages: `accounts-password`, `accounts-facebook`, +`accounts-github`, `accounts-google`, `accounts-meetup`, +`accounts-twitter`, or `accounts-weibo`. + +Read more about customizing user accounts in the [Accounts](http://guide.meteor.com/accounts.html) article in the Meteor Guide. + + + +Retrieves the user record for the current user from +the [`Meteor.users`](#Meteor-users) collection. + +On the client, the available fields will be those that +are published from the server (other fields won't be available on the +client). By default the server publishes `username`, `emails`, and +`profile` (writable by user). See [`Meteor.users`](#Meteor-users) for more on +the fields used in user documents. + +On the server, this will fetch the record from the database. To improve the +latency of a method that uses the user document multiple times, save the +returned record to a variable instead of re-calling `Meteor.user()`. + +Fetching the full user document can cause unnecessary database usage on the +server and over-reactivity on the client, particularly if you store lots of +custom data on it. Therefore it is recommended to use the `options` +parameter to only fetch the fields you need: + +```js +import { Meteor } from "meteor/meteor"; +const userName = Meteor.user({ fields: { "profile.name": 1 } }).profile.name; +``` + + + +Same as [`Meteor.user`](#Meteor-user), but returns a promise and is available on the server. + +```js +import { Meteor } from "meteor/meteor"; +const user = await Meteor.userAsync(); +``` + + + + + +This collection contains one document per registered user. Here's an example +user document: + +```js +{ + _id: 'QwkSmTCZiw5KDx3L6', // Meteor.userId() + username: 'cool_kid_13', // Unique name + emails: [ + // Each email address can only belong to one user. + { address: 'cool@example.com', verified: true }, + { address: 'another@different.com', verified: false } + ], + createdAt: new Date('Wed Aug 21 2013 15:16:52 GMT-0700 (PDT)'), + profile: { + // The profile is writable by the user by default. + name: 'Joe Schmoe' + }, + services: { + facebook: { + id: '709050', // Facebook ID + accessToken: 'AAACCgdX7G2...AbV9AZDZD' + }, + resume: { + loginTokens: [ + { token: '97e8c205-c7e4-47c9-9bea-8e2ccc0694cd', + when: 1349761684048 } + ] + } + } +} +``` + +A user document can contain any data you want to store about a user. Meteor +treats the following fields specially: + +- `username`: a unique String identifying the user. +- `emails`: an Array of Objects with keys `address` and `verified`; + an email address may belong to at most one user. `verified` is + a Boolean which is true if the user has [verified the address](#Accounts-verifyEmail) with a token sent over email. +- `createdAt`: the Date at which the user document was created. +- `profile`: an Object which the user can create and update with any data. + Do not store anything on `profile` that you wouldn't want the user to edit + unless you have a deny rule on the `Meteor.users` collection. +- `services`: an Object containing data used by particular + login services. For example, its `reset` field contains + tokens used by [forgot password](#Accounts-forgotPassword) links, + and its `resume` field contains tokens used to keep you + logged in between sessions. + +Like all [Mongo.Collection](./collections.md)s, you can access all +documents on the server, but only those specifically published by the server are +available on the client. You can also use all Collection methods, for instance +`Meteor.users.remove` on the server to delete a user. + +By default, the current user's `username`, `emails` and `profile` are +published to the client. You can publish additional fields for the +current user with: + +::: code-group + +```js [server.js] +Meteor.publish("userData", function () { + if (this.userId) { + return Meteor.users.find( + { _id: this.userId }, + { + fields: { other: 1, things: 1 }, + } + ); + } else { + this.ready(); + } +}); +``` + +```js [client.js] +Meteor.subscribe("userData"); +``` + +::: +If the autopublish package is installed, information about all users +on the system is published to all clients. This includes `username`, +`profile`, and any fields in `services` that are meant to be public +(eg `services.facebook.id`, +`services.twitter.screenName`). Additionally, when using autopublish +more information is published for the currently logged in user, +including access tokens. This allows making API calls directly from +the client for services that allow this. + +Users are by default allowed to specify their own `profile` field with +[`Accounts.createUser`](#Accounts-createUser) and modify it with +`Meteor.users.update`. To allow users to edit additional fields, use +[`Meteor.users.allow`](./collections.md#Mongo-Collection-allow). To forbid users from making any modifications to +their user document: + +```js +import { Meteor } from "meteor/meteor"; +Meteor.users.deny({ update: () => true }); +``` + + + +For example, [the `accounts-ui` package](../packages/accounts-ui.md) uses this to display an +animation while the login request is being processed. + + + + + + + +For example, when called in a user's browser, connections in that browser +remain logged in, but any other browsers or DDP clients logged in as that user +will be logged out. + + + +If there are multiple users with a username or email only differing in case, a case sensitive match is required. Although `createUser` won't let you create users with ambiguous usernames or emails, this could happen with existing databases or if you modify the users collection directly. + +This method can fail throwing one of the following errors: + +- "Unrecognized options for login request [400]" if `user` or `password` is undefined. +- "Match failed [400]" if `user` isn't an Object or String, or `password` isn't a String. +- "User not found [403]" if the email or username provided in `user` doesn't belong to a registered user. +- "Incorrect password [403]" if the password provided is incorrect. +- "User has no password set [403]" if `user` doesn't have a password. + +This function is provided by the `accounts-password` package. See the +[Passwords](#passwords) section below. + + + +Available functions are: + +- `Meteor.loginWithMeteorDeveloperAccount` +- `Meteor.loginWithFacebook` + - `options` may also include [Facebook's `auth_type` parameter](https://developers.facebook.com/docs/facebook-login/manually-build-a-login-flow#reaskperms) +- `Meteor.loginWithGithub` +- `Meteor.loginWithGoogle` + - `options` may also include [Google's additional URI parameters](https://developers.google.com/identity/protocols/OpenIDConnect#authenticationuriparameters) +- `Meteor.loginWithMeetup` +- `Meteor.loginWithTwitter` + - `options` may also include [Twitter's `force_login` parameter](https://dev.twitter.com/oauth/reference/get/oauth/authenticate) +- `Meteor.loginWithWeibo` + +These functions initiate the login process with an external +service (eg: Facebook, Google, etc), using OAuth. When called they open a new pop-up +window that loads the provider's login page. Once the user has logged in +with the provider, the pop-up window is closed and the Meteor client +logs in to the Meteor server with the information provided by the external +service. + +

Requesting Permissions

+ +In addition to identifying the user to your application, some services +have APIs that allow you to take action on behalf of the user. To +request specific permissions from the user, pass the +`requestPermissions` option the login function. This will cause the user +to be presented with an additional page in the pop-up dialog to permit +access to their data. The user's `accessToken` — with permissions +to access the service's API — is stored in the `services` field of +the user document. The supported values for `requestPermissions` differ +for each login service and are documented on their respective developer +sites: + +- Facebook: +- GitHub: +- Google: +- Meetup: +- Twitter, Weibo, Meteor developer accounts: `requestPermissions` currently not supported + +External login services typically require registering and configuring +your application before use. The easiest way to do this is with the +[`accounts-ui` package](../packages/accounts-ui.md) which presents a step-by-step guide +to configuring each service. However, the data can be also be entered +manually in the `ServiceConfiguration.configurations` collection, which +is exported by the `service-configuration` package. + +## Configuring Services {#service-configuration} + +First, add the service configuration package: + +```bash +meteor add service-configuration +``` + +Then, inside the server of your app (this example is for the Weebo service), import `ServiceConfiguration`: + +```js +import { ServiceConfiguration } from "meteor/service-configuration"; +ServiceConfiguration.configurations.upsert( + { service: "weibo" }, + { + $set: { + loginStyle: "popup", + clientId: "1292962797", // See table below for correct property name! + secret: "75a730b58f5691de5522789070c319bc", + }, + } +); +``` + +Since Meteor 2.7 you no longer need to manually set the configuration and instead can use Meteor settings by setting your services under `Meteor.settings.packages.service-configuration.`. All the properties can be set under the service and will be added to the database as is, so make sure that they are correct. For the example above, the settings would look like: + +```json +{ + "packages": { + "service-configuration": { + "weibo": { + "loginStyle": "popup", + "clientId": "1292962797", + "secret": "75a730b58f5691de5522789070c319bc" + } + } + } +} +``` + +The correct property name to use for the API identifier (i.e. `clientId` in the above example) depends on the login service being used, so be sure to use the correct one: + +| Property Name | Services | +| ------------- | -------------------------------------------------------- | +| `appId` | Facebook | +| `clientId` | Github, Google, Meetup, Meteor Developer Accounts, Weibo | +| `consumerKey` | Twitter | + +Additionally, each external service has its own login provider package and login function. For +example, to support GitHub login, run the following in your terminal: + +```bash +meteor add accounts-github +``` + +and use the `Meteor.loginWithGithub` function: + +```js +import { Meteor } from "meteor/meteor"; +Meteor.loginWithGithub( + { + requestPermissions: ["user", "public_repo"], + }, + (error) => { + if (error) { + Session.set("errorMessage", error.reason || "Unknown error"); + } + } +); +``` + +Login service configuration is sent from the server to the client over DDP when +your app starts up; you may not call the login function until the configuration +is loaded. The function `Accounts.loginServicesConfigured()` is a reactive data +source that will return true once the login service is configured; you should +not make login buttons visible or active until it is true. + +Ensure that your [`$ROOT_URL`](./meteor.md#Meteor-absoluteUrl) matches the authorized +domain and callback URL that you configure with the external service (for +instance, if you are running Meteor behind a proxy server, `$ROOT_URL` should be +the externally-accessible URL, not the URL inside your proxy). + +## Manual service configuration {#manual-service-configuration} + +You can use `Accounts.loginServiceConfiguration` to view and edit the settings collection: + +```js +import { Accounts } from "meteor/accounts-base"; +Accounts.loginServiceConfiguration.find(); +``` + +## Popup versus redirect flow {#popup-vs-redirect-flow} + +When configuring OAuth login with a provider (such as Facebook or Google), Meteor lets you choose a popup- or redirect-based flow. In a popup-based flow, when a user logs in, they will be prompted to login at the provider in a popup window. In a redirect-based flow, the user's whole browser window will be redirected to the login provider, and the window will redirect back to your app when the login is completed. + +You can also pick which type of login to do by passing an option to [`Meteor.loginWith`](#Meteor-loginWith%3CExternalService%3E) + +Usually, the popup-based flow is preferable because the user will not have to reload your whole app at the end of the login flow. However, the popup-based flow requires browser features such as `window.close` and `window.opener` that are not available in all mobile environments. In particular, we recommend using `Meteor.loginWith({ loginStyle: 'redirect' })` in the following environments: + +- Inside UIWebViews (when your app is loaded inside a mobile app) +- In Safari on iOS8 (`window.close` is not supported due to a bug) + + + + + + + +Example: + +```js +import { Accounts } from "meteor/accounts-base"; + +Accounts.ui.config({ + requestPermissions: { + facebook: ["user_likes"], + github: ["user", "repo"], + }, + requestOfflineToken: { + google: true, + }, + passwordSignupFields: "USERNAME_AND_OPTIONAL_EMAIL", +}); +``` + +Since Meteor 2.7 you can configure these in your Meteor settings under `Meteor.settings.public.packages.accounts-ui-unstyled`. + +## Multi-server {#multi-server} + +The `accounts-base` package exports two constructors, called +`AccountsClient` and `AccountsServer`, which are used to create the +`Accounts` object that is available on the client and the server, +respectively. + +This predefined `Accounts` object (along with similar convenience methods +of `Meteor`, such as [`Meteor.logout`](#Meteor-logout)) is sufficient to +implement most accounts-related logic in Meteor apps. Nevertheless, these +two constructors can be instantiated more than once, to create multiple +independent connections between different accounts servers and their +clients, in more complicated authentication situations. + + + +The `AccountsClient` and `AccountsServer` classes share a common +superclass, `AccountsCommon`. Methods defined on +`AccountsCommon.prototype` will be available on both the client and the +server, via the predefined `Accounts` object (most common) or any custom +`accountsClientOrServer` object created using the `AccountsClient` or +`AccountsServer` constructors (less common). + +Here are a few of those methods: + + + + + + + +From Meteor 2.5 you can set these in your Meteor settings under `Meteor.settings.packages.accounts-base`. Note that due to the nature of settings file you won't be able to set parameters that require functions. + + + +See description of [AccountsCommon#onLoginFailure](#AccountsCommon-onLoginFailure) +for details. + + + +Either the `onLogin` or the `onLoginFailure` callbacks will be called +for each login attempt. The `onLogin` callbacks are called after the +user has been successfully logged in. The `onLoginFailure` callbacks are +called after a login attempt is denied. + +These functions return an object with a single method, `stop`. Calling +`stop()` unregisters the callback. + +On the server, the callbacks get a single argument, the same attempt info +object as [`validateLoginAttempt`](#AccountsServer-validateLoginAttempt). On the +client, the callback argument is an object containing a single `error` +property set to the `Error`-object which was received from the failed login +attempt. + + + +On the server, the `func` callback receives a single argument with the object below. On the +client, no arguments are passed. + +```js +import { AccountsCommon } from "meteor/accounts-base"; +const options = { + //... +}; +const accountsCommon = new AccountsCommon(options); + +accountsCommon.onLogout(({ user, connection, collection }) => { + console.log(user); + // ˆˆˆˆˆˆ The Meteor user object of the user which just logged out + console.log(connection); + // ˆˆˆˆˆˆ The connection object the request came in on. See + // `Meteor.onConnection` for details. + + console.log(collection); + // ˆˆˆˆˆˆ The `collection` The name of the Mongo.Collection or the + // Mongo.Collection object to hold the users. +}); +``` + + + +At most one of `options.connection` and `options.ddpUrl` should be +provided in any instantiation of `AccountsClient`. If neither is provided, +`Meteor.connection` will be used as the `.connection` property of the +`AccountsClient` instance. + +Note that `AccountsClient` is currently available only on the client, due +to its use of browser APIs such as `window.localStorage`. In principle, +though, it might make sense to establish a client connection from one +server to another remote accounts server. Please [let us +know](https://github.com/meteor/meteor/wiki/Contributing-to-Meteor#feature-requests) +if you find yourself needing this server-to-server functionality. + +These methods are defined on `AccountsClient.prototype`, and are thus +available only on the client: + + + + + + + + + +These methods are defined on `AccountsServer.prototype`, and are thus +available only on the server: + + + +This can be called multiple times. If any of the functions return `false` or +throw an error, the new user creation is aborted. To set a specific error +message (which will be displayed by [`accounts-ui`](../packages/accounts-ui.md)), throw a new +[`Meteor.Error`](./meteor#meteor-api). + +Example: + +```js +import { Accounts } from "meteor/accounts-base"; + +// Validate username, sending a specific error message on failure. +Accounts.validateNewUser((user) => { + if (user.username && user.username.length >= 3) { + return true; + } else { + throw new Meteor.Error(403, "Username must have at least 3 characters"); + } +}); + +// Validate username, without a specific error message. +Accounts.validateNewUser((user) => { + return user.username !== "root"; +}); +``` + +If the user is being created as part of a login attempt from a client (eg, +calling [`Accounts.createUser`](#Accounts-createUser) from the client, or +[logging in for the first time with an external +service](#meteor_loginwithexternalservice)), these callbacks are called _before_ +the [`Accounts.validateLoginAttempt`](#Accounts-validateLoginAttempt) +callbacks. If these callbacks succeed but those fail, the user will still be +created but the connection will not be logged in as that user. + + + +Use this when you need to do more than simply accept or reject new user +creation. With this function you can programatically control the +contents of new user documents. + +The function you pass will be called with two arguments: `options` and +`user`. The `options` argument comes +from [`Accounts.createUser`](#Accounts-createUser) for +password-based users or from an external service login flow. `options` may come +from an untrusted client so make sure to validate any values you read from +it. The `user` argument is created on the server and contains a +proposed user object with all the automatically generated fields +required for the user to log in, including the `_id`. + +The function should return the user document (either the one passed in or a +newly-created object) with whatever modifications are desired. The returned +document is inserted directly into the [`Meteor.users`](#Meteor-users) collection. + +The default create user function simply copies `options.profile` into +the new user document. Calling `onCreateUser` overrides the default +hook. This can only be called once. + +Example: + +```js +import { Accounts } from "meteor/accounts-base"; +// Support for playing D&D: Roll 3d6 for dexterity. +Accounts.onCreateUser((options, user) => { + const customizedUser = Object.assign( + { + dexterity: _.random(1, 6) + _.random(1, 6) + _.random(1, 6), + }, + user + ); + + // We still want the default hook's 'profile' behavior. + if (options.profile) { + customizedUser.profile = options.profile; + } + + return customizedUser; +}); +``` + + + +Call `validateLoginAttempt` with a callback to be called on login +attempts. It returns an object with a single method, `stop`. Calling +`stop()` unregisters the callback. + +When a login attempt is made, the registered validate login callbacks +are called with a single argument, you can check the example: + +```js +import { AccountsServer } from "meteor/accounts-base"; +const options = { + //... +}; +const accountsServer = new AccountsServer(options); + +accountsServer.validateLoginAttempt( + ({ + type, // String + allowed, // Boolean + error, // Error + user, // Object + connection, // Object + collection, // Object + methodName, // String + methodArguments, // Array + }) => { + console.log(type); + // ˆˆˆˆˆˆ The service name, such as "password" or "twitter". + + console.log(allowed); + // ˆˆˆˆˆˆ Whether this login is allowed and will be successful (if not aborted + // by any of the validateLoginAttempt callbacks). False if the login + // will not succeed (for example, an invalid password or the login was + // aborted by a previous validateLoginAttempt callback). + + console.log(error); + // ˆˆˆˆˆˆ When `allowed` is false, the exception describing why the login + // failed. It will be a `Meteor.Error` for failures reported to the + // user (such as invalid password), and can be a another kind of + // exception for internal errors. + + console.log(user); + // ˆˆˆˆˆˆ When it is known which user was attempting to login, + // the Meteor user object. This will always be present for successful logins. + + console.log(connection); + // ˆˆˆˆˆˆ The `connection` object the request came in on. See + // [`Meteor.onConnection`](#meteor_onconnection) for details. + + console.log(collection); + // ˆˆˆˆˆˆ The `collection` The name of the Mongo.Collection or the + // Mongo.Collection object to hold the users. + + console.log(methodName); + // ˆˆˆˆˆˆ The name of the Meteor method being used to login. + // For example, "login", "loginWithPassword", or "loginWith". + + console.log(methodArguments); + // ˆˆˆˆˆˆ An array of the arguments passed to the login method. + // For example, `["username", "password"]` + } +); +``` + +A validate login callback must return a truthy value for the login to +proceed. If the callback returns a falsy value or throws an +exception, the login is aborted. Throwing a `Meteor.Error` will +report the error reason to the user. + +All registered validate login callbacks are called, even if one of the callbacks +aborts the login. The later callbacks will see the `allowed` field set to +`false` since the login will now not be successful. This allows later callbacks +to override an error from a previous callback; for example, you could override +the "Incorrect password" error with a different message. + +Validate login callbacks that aren't explicitly trying to override a previous +error generally have no need to run if the attempt has already been determined +to fail, and should start with + +```js +if (!attempt.allowed) { + return false; +} +``` + + + +Use this hook if you need to validate that user from an external service should +be allowed to login or create account. + +```js +import { AccountsServer } from "meteor/accounts-base"; +const options = { + //... +}; +const accountsServer = new AccountsServer(options); + +accountsServer.beforeExternalLogin(({ type, data, user }) => { + console.log(type); + // ˆˆˆˆˆˆ The service name, such as "google" or "twitter". Is a String + + console.log(data); + // ˆˆˆˆˆˆ Data retrieved from the service (eg: email, name, etc) + // Is an Object. + + console.log(user); + // ˆˆˆˆˆˆ If user was found in the database that matches the criteria from the service, + // their data will be provided here. Is an Object. +}); +``` + +You should return a `Boolean` value, `true` if the login/registration should +proceed or `false` if it should terminate. In case of termination +the login attempt will throw an error `403`, with the message: `Login forbidden`. + + + +When allowing your users to authenticate with an external service, the process will +eventually call `Accounts.updateOrCreateUserFromExternalService`. By default, this +will search for a user with the `service..id`, and if not found will +create a new user. As that is not always desirable, you can use this hook as an +escape hatch to look up a user with a different selector, probably by `emails.address` or `username`. Note the function will only be called if no user was found with the +`service..id` selector. + +The function will be called with a single argument, the info object: + +```js +import { AccountsServer } from "meteor/accounts-base"; +const options = { + //... +}; +const accountsServer = new AccountsServer(options); + +accountsServer.setAdditionalFindUserOnExternalLogin( + ({ serviceName, serviceData, options }) => { + // serviceName: String + // The external service name, such as "google" or "twitter". + // serviceData: Object + // The data returned by the service oauth request. + // options: Object + // An optional arugment passed down from the oauth service that may contain + // additional user profile information. As the data in `options` comes from an + // external source, make sure you validate any values you read from it. + } +); +``` + +The function should return either a user document or `undefined`. Returning a user +will result in the populating the `service.` in your user document, +while returning `undefined` will result in a new user account being created. +If you would prefer that a new account not be created, you could throw an error +instead of returning. + +Example: + +```js +// If a user has already been created, and used their Google email, this will +// allow them to sign in with the Meteor.loginWithGoogle method later, without +// creating a new user. +Accounts.setAdditionalFindUserOnExternalLogin( + ({ serviceName, serviceData }) => { + if (serviceName === "google") { + // Note: Consider security implications. If someone other than the owner + // gains access to the account on the third-party service they could use + // the e-mail set there to access the account on your app. + // Most often this is not an issue, but as a developer you should be aware + // of how bad actors could play. + return Accounts.findUserByEmail(serviceData.email); + } + } +); +``` + + + +Use this to register your own custom authentication method. This is also used by all of the other inbuilt accounts packages to integrate with the accounts system. + +There can be multiple login handlers that are registered. When a login request is made, it will go through all these handlers to find its own handler. + +The registered handler callback is called with a single argument, the `options` object which comes from the login method. For example, if you want to login with a plaintext password, `options` could be `{ user: { username: }, password: }`,or `{ user: { email: }, password: }`. + +The login handler should return `undefined` if it's not going to handle the login request or else the login result object. + +

Rate Limiting

+ +By default, there are rules added to the [`DDPRateLimiter`](./DDPRateLimiter.md) +that rate limit logins, new user registration and password reset calls to a +limit of 5 requests per 10 seconds per session. These are a basic solution +to dictionary attacks where a malicious user attempts to guess the passwords +of legitimate users by attempting all possible passwords. + +These rate limiting rules can be removed by calling +`Accounts.removeDefaultRateLimit()`. Please see the +[`DDPRateLimiter`](./DDPRateLimiter.md) docs for more information. + + + + + +## Passwords {#passwords} + +The `accounts-password` package contains a full system for password-based +authentication. In addition to the basic username and password-based +sign-in process, it also supports email-based sign-in including +address verification and password recovery emails. + +The Meteor server stores passwords using the +[bcrypt](http://en.wikipedia.org/wiki/Bcrypt) algorithm. This helps +protect against embarrassing password leaks if the server's database is +compromised. + +To add password support to your application, run this command in your terminal: + +```bash +meteor add accounts-password +``` + +> In addition to configuring the [`email`](./email.md) package's `MAIL_URL`, it is critical that you set proper values (specifically the `from` address) in [`Accounts.emailTemplates`](#Accounts-emailTemplates) to ensure proper delivery of e-mails! + +You can construct your own user interface using the +functions below, or use the [`accounts-ui` package](../packages/accounts-ui.md) to +include a turn-key user interface for password-based sign-in. + + + +On the client, this function logs in as the newly created user on +successful completion. On the server, it returns the newly created user +id. + +On the client, you must pass `password` and at least one of `username` or `email` — enough information for the user to be able to log in again later. If there are existing users with a username or email only differing in case, `createUser` will fail. The callback's `error.reason` will be `'Username already exists.'` or `'Email already exists.'` In the latter case, the user can then either [login](accounts.html#Meteor-loginWithPassword) or [reset their password](#Accounts-resetPassword). + +On the server, you do not need to specify `password`, but the user will not be able to log in until it has a password (eg, set with [`Accounts.setPassword`](#Accounts-setPassword)). To create an account without a password on the server and still let the user pick their own password, call `createUser` with the `email` option and then call [`Accounts.sendEnrollmentEmail`](#Accounts-sendEnrollmentEmail). This will send the user an email with a link to set their initial password. + +By default the `profile` option is added directly to the new user document. To +override this behavior, use [`Accounts.onCreateUser`](#Accounts-onCreateUser). + +This function is only used for creating users with passwords. The external +service login flows do not use this function. + +Instead of modifying documents in the [`Meteor.users`](#Meteor-users) collection +directly, use these convenience functions which correctly check for case +insensitive duplicates before updates. + + + + + + + + + +By default, an email address is added with `{ verified: false }`. Use +[`Accounts.sendVerificationEmail`](#Accounts-sendVerificationEmail) to send an +email with a link the user can use to verify their email address. + + + + + +If the user trying to verify the email has 2FA enabled, this error will be thrown: + +- "Email verified, but user not logged in because 2FA is enabled [2fa-enabled]": No longer signing in the user automatically if the user has 2FA enabled. + +This function accepts tokens passed into the callback registered with +[`Accounts.onEmailVerificationLink`](#Accounts-onEmailVerificationLink). + + + + + +Use the below functions to initiate password changes or resets from the server +or the client. + + + + + +This triggers a call +to [`Accounts.sendResetPasswordEmail`](#Accounts-sendResetPasswordEmail) +on the server. When the user visits the link in this email, the callback +registered with [`Accounts.onResetPasswordLink`](#Accounts-onResetPasswordLink) +will be called. + +If you are using the [`accounts-ui` package](../packages/accounts-ui.md), this is handled +automatically. Otherwise, it is your responsibility to prompt the user for the +new password and call `resetPassword`. + + + +This function accepts tokens passed into the callbacks registered with +[`AccountsClient#onResetPasswordLink`](#Accounts-onResetPasswordLink) and +[`Accounts.onEnrollmentLink`](#Accounts-onEnrollmentLink). + +If the user trying to reset the password has 2FA enabled, this error will be thrown: + +- "Changed password, but user not logged in because 2FA is enabled [2fa-enabled]": No longer signing in the user automatically if the user has 2FA enabled. + + + + + +When the user visits the link in this email, the callback registered with +[`AccountsClient#onResetPasswordLink`](#Accounts-onResetPasswordLink) will be called. + +To customize the contents of the email, see +[`Accounts.emailTemplates`](#Accounts-emailTemplates). + + + +When the user visits the link in this email, the callback registered with +[`Accounts.onEnrollmentLink`](#Accounts-onEnrollmentLink) will be called. + +To customize the contents of the email, see +[`Accounts.emailTemplates`](#Accounts-emailTemplates). + + + +When the user visits the link in this email, the callback registered with +[`Accounts.onEmailVerificationLink`](#Accounts-onEmailVerificationLink) will +be called. + +To customize the contents of the email, see +[`Accounts.emailTemplates`](#Accounts-emailTemplates). + + + + + + + + + +This is an `Object` with several fields that are used to generate text/html +for the emails sent by `sendResetPasswordEmail`, `sendEnrollmentEmail`, +and `sendVerificationEmail`. + +Set the fields of the object by assigning to them: + +- `from`: (**required**) A `String` with an [RFC5322](http://tools.ietf.org/html/rfc5322) From + address. By default, the email is sent from `no-reply@example.com`. **If you + want e-mails to send correctly, this should be changed to your own domain + as most e-mail providers will reject mail sent from `example.com`.** +- `siteName`: The public name of your application. Defaults to the DNS name of + the application (eg: `awesome.meteor.com`). +- `headers`: An `Object` for custom email headers as described in + [`Email.send`](./email.md#Email-send). +- `resetPassword`: An `Object` with the fields: +- `from`: A `Function` used to override the `from` address defined + by the `emailTemplates.from` field. +- `subject`: A `Function` that takes a user object and returns + a `String` for the subject line of a reset password email. +- `text`: An optional `Function` that takes a user object and a url, and + returns the body text for a reset password email. +- `html`: An optional `Function` that takes a user object and a + url, and returns the body html for a reset password email. +- `enrollAccount`: Same as `resetPassword`, but for initial password setup for + new accounts. +- `verifyEmail`: Same as `resetPassword`, but for verifying the users email + address. + +Example: + +```js +import { Accounts } from "meteor/accounts-base"; + +Accounts.emailTemplates.siteName = "AwesomeSite"; +Accounts.emailTemplates.from = "AwesomeSite Admin "; + +Accounts.emailTemplates.enrollAccount.subject = (user) => { + return `Welcome to Awesome Town, ${user.profile.name}`; +}; + +Accounts.emailTemplates.enrollAccount.text = (user, url) => { + return ( + "You have been selected to participate in building a better future!" + + " To activate your account, simply click the link below:\n\n" + + url + ); +}; + +Accounts.emailTemplates.resetPassword.from = () => { + // Overrides the value set in `Accounts.emailTemplates.from` when resetting + // passwords. + return "AwesomeSite Password Reset "; +}; +Accounts.emailTemplates.verifyEmail = { + subject() { + return "Activate your account now!"; + }, + text(user, url) { + return `Hey ${user}! Verify your e-mail by following this link: ${url}`; + }, +}; +``` + +

Enable 2FA for this package

+ +You can add 2FA to your login flow by +using the package [accounts-2fa](../packages/accounts-2fa.md). +You can find an example showing how this would look like [here](../packages/accounts-2fa.md#working-with-accounts-password). diff --git a/v3-docs/docs/api/app.md b/v3-docs/docs/api/app.md new file mode 100644 index 0000000000..fc31692154 --- /dev/null +++ b/v3-docs/docs/api/app.md @@ -0,0 +1,107 @@ +# Mobile Configuration + + + +If your Meteor application targets mobile platforms such as iOS or +Android, you can configure your app's metadata and build process +in a special top-level file called +`mobile-config.js` which is *not* included in your application and is used only +for this configuration. + +The code snippet below is an example `mobile-config.js` file. The rest of this +section will explain the specific API commands in greater detail. + +```js +// This section sets up some basic app metadata, the entire section is optional. +App.info({ + id: 'com.example.matt.uber', + name: 'über', + description: 'Get über power in one button click', + author: 'Matt Development Group', + email: 'contact@example.com', + website: 'http://example.com' +}); + +// Set up resources such as icons and launch screens. +App.icons({ + 'iphone_2x': 'icons/icon-60@2x.png', + 'iphone_3x': 'icons/icon-60@3x.png', + // More screen sizes and platforms... +}); + +// Before Meteor 2.6 we had to pass device specific splash screens for iOS, but this behavior was dropped in favor of story board images. +App.launchScreens({ + // iOS + // For most cases you will only need to use the 'ios_universal' and 'ios_universal_3x'. + 'ios_universal': { src: 'splash/Default@2x.png', srcDarkMode: 'splash/Default@2x~dark.png' }, // (2732x2732) - All @2x devices, if device/mode specific is not declared + 'ios_universal_3x': 'splash/Default@3x.png', // (2208x2208) - All @3x devices, if device/mode specific is not declared + + // If you still want to use a universal splash, but want to fine-tune for the device mode (landscape, portrait), then use the following keys: + 'Default@2x~universal~comany': 'splash/Default@2x~universal~comany.png', // (1278x2732) - All @2x devices in portrait mode. + 'Default@2x~universal~comcom': 'splash/Default@2x~universal~comcom.png', // (1334x750) - All @2x devices in landscape (narrow) mode. + 'Default@3x~universal~anycom': 'splash/Default@3x~universal~anycom.png', // (2208x1242) - All @3x devices in landscape (wide) mode. + 'Default@3x~universal~comany': 'splash/Default@3x~universal~comany.png', // (1242x2208) - All @3x devices in portrait mode. + + // However, if you need to fine tune the splash screens for the device idiom (iPhone, iPad, etc). + 'Default@2x~iphone~anyany': 'splash/Default@2xiphoneanyany.png', // (1334x1334) - iPhone SE/6s/7/8/XR + 'Default@2x~iphone~comany': 'splash/Default@2xiphonecomany.png', // (750x1334) - iPhone SE/6s/7/8/XR - portrait mode + 'Default@2x~iphone~comcom': 'splash/Default@2xiphonecomcom.png', // (1334x750) - iPhone SE/6s/7/8/XR - landscape (narrow) mode + 'Default@3x~iphone~anyany': 'Default@3xiphoneanyany.png', // (2208x2208) - iPhone 6s Plus/7 Plus/8 Plus/X/XS/XS Max + 'Default@3x~iphone~anycom': { src: 'splash/Default@3xiphoneanycom.png', srcDarkMode: 'splash/Default@3xiphoneanycom~dark.png' }, // (2208x1242) - iPhone 6s Plus/7 Plus/8 Plus/X/XS/XS Max - landscape (wide) mode + 'Default@3x~iphone~comany': 'Default@3xiphonecomany.png', // (1242x2208) - iPhone 6s Plus/7 Plus/8 Plus/X/XS/XS Max - portrait mode + 'Default@2x~ipad~anyany': 'Default@2xipadanyany.png', // (2732x2732) - iPad Pro 12.9"/11"/10.5"/9.7"/7.9" + 'Default@2x~ipad~comany': 'Default@2xipadcomany.png', // (1278x2732) - iPad Pro 12.9"/11"/10.5"/9.7"/7.9" - portrait mode + + // Android + 'android_universal': 'splash/android_universal.png', // (320x480) +}); + +// Set PhoneGap/Cordova preferences. +App.setPreference('BackgroundColor', '0xff0000ff'); +App.setPreference('HideKeyboardFormAccessoryBar', true); +App.setPreference('Orientation', 'default'); +App.setPreference('Orientation', 'all', 'ios'); + +// Pass preferences for a particular PhoneGap/Cordova plugin. +App.configurePlugin('com.phonegap.plugins.facebookconnect', { + APP_ID: '1234567890', + API_KEY: 'supersecretapikey' +}); + +// Add custom tags for a particular PhoneGap/Cordova plugin to the end of the +// generated config.xml. 'Universal Links' is shown as an example here. +App.appendToConfig(` + + + +`); +``` + + + + + +For example this Cordova whitelist syntax: + +```xml + + +``` + +is equivalent to: + +```js +App.accessRule('https://www.google-analytics.com'); +App.accessRule('https://example.com', { type: 'navigation' }); +``` + + + +> Note: When using `App.configurePlugin` to re-configure a plugin which has been previously configured, the changes may not be reflected without manually clearing the existing Cordova build. To clear the existing Cordova build, remove the `.meteor/local/cordova-build` directory and re-build the application using either `meteor run` or `meteor build`. + + + + + + +> Note: The resource file is copied in two steps : from the **src** of your meteor project to the root of the cordova project, then to the **target** diff --git a/v3-docs/docs/api/assets.md b/v3-docs/docs/api/assets.md new file mode 100644 index 0000000000..8f7c76fb53 --- /dev/null +++ b/v3-docs/docs/api/assets.md @@ -0,0 +1,23 @@ +# Assets + +> Currently, it is not possible to import `Assets` as an ES6 module. Any of the `Assets` methods below can simply be called directly in any Meteor server code. + +`Assets` allows server code in a Meteor application to access static server +assets, which are located in the `private` subdirectory of an application's +tree. Assets are not processed as source files and are copied directly +into your application's bundle. + + + + + +Static server assets are included by placing them in the application's `private` +subdirectory. For example, if an application's `private` subdirectory includes a +directory called `nested` with a file called `data.txt` inside it, then server +code can read `data.txt` by running: + +```js +const data = Assets.getText('nested/data.txt'); +``` + +Note: Packages can only access their own assets. If you need to read the assets of a different package, or of the enclosing app, you need to get a reference to that package's `Assets` object. diff --git a/v3-docs/docs/api/blaze.md b/v3-docs/docs/api/blaze.md new file mode 100644 index 0000000000..97880bd6ac --- /dev/null +++ b/v3-docs/docs/api/blaze.md @@ -0,0 +1,6 @@ + +# Blaze + +How to use Blaze, Meteor's reactive rendering engine. + +This documentation has moved to the [Blaze Community Site](http://blazejs.org/api/templates). diff --git a/v3-docs/docs/api/check.md b/v3-docs/docs/api/check.md new file mode 100644 index 0000000000..d515902838 --- /dev/null +++ b/v3-docs/docs/api/check.md @@ -0,0 +1,233 @@ +# Check + +Documentation on how to use check, Meteor's type checking library. + +The `check` package includes pattern checking functions useful for checking the types and structure +of variables and an [extensible library of patterns](#matchpatterns) to specify which types you are +expecting. + +To add `check` (or `Match`) to your application, run this command in your terminal: + +```bash +meteor add check +``` + + + +Meteor methods and publish functions can take arbitrary [EJSON](./EJSON.md) types as arguments, but most +functions expect their arguments to be of a particular type. `check` is a lightweight function for +checking that arguments and other values are of the expected type. For example: + +```js [server.js] +import { check } from "meteor/check"; +import { Meteor } from "meteor/meteor"; +Meteor.publish("chatsInRoom", function (roomId) { + // Make sure `roomId` is a string, not an arbitrary Mongo selector object. + check(roomId, String); + return Chats.find({ room: roomId }); +}); + +Meteor.methods({ + addChat(roomId, message) { + check(roomId, String); + check(message, { + text: String, + timestamp: Date, + // Optional, but if present must be an array of strings. + tags: Match.Maybe([String]), + }); + + // Do something with the message... + }, +}); +``` + +If the match fails, `check` throws a `Match.Error` describing how it failed. If +this error gets sent over the wire to the client, it will appear only as +`Meteor.Error(400, 'Match Failed')`. The failure details will be written to the +server logs but not revealed to the client. + + + +`Match.test` can be used to identify if a variable has a certain structure. + +```js +import { Match } from "meteor/check"; + +// Will return true for `{ foo: 1, bar: 'hello' }` or similar. +Match.test(value, { foo: Match.Integer, bar: String }); + +// Will return true if `value` is a string. +Match.test(value, String); + +// Will return true if `value` is a string or an array of numbers. +Match.test(value, Match.OneOf(String, [Number])); +``` + +This can be useful if you have a function that accepts several different kinds +of objects, and you want to determine which was passed in. + +## Match Patterns { #matchpatterns } + +The following patterns can be used as pattern arguments to +[`check`](#check) and `Match.test`: + +### `Match.Any` + +Matches any value. + +```js +import { Match } from "meteor/check"; +// Will return true for any value. +Match.test(value, Match.Any); +``` + +### `String`, `Number`, `Boolean`, `undefined`, `null` + +Matches a primitive of the given type. + +```js +import { Match } from "meteor/check"; +let result; +// Will return true if `value` is a string. +result = Match.test(value, String); +console.log(result); // true + +// Will return true if `value` is a number. +result = Match.test(value, Number); +console.log(result); // true + +// Will return true if `value` is a boolean. +result = Match.test(value, Boolean); +console.log(result); // true +``` + +### `Match.Integer` + +Matches a signed 32-bit integer. Doesn't match `Infinity`, `-Infinity`, or `NaN`. + +```js +import { Match } from "meteor/check"; +let result; +// Will return true if `value` is an integer. +result = Match.test(value, Match.Integer); +console.log(result); // true +``` + +### `[pattern]` { #arraypattern } + +A one-element array matches an array of elements, each of which match +_pattern_. For example, `[Number]` matches a (possibly empty) array of numbers; +`[Match.Any]` matches any array. + +```js +import { Match } from "meteor/check"; +let result; +// Will return true if `value` is an array of numbers. +result = Match.test(value, [Number]); +console.log(result); // true +``` + +### `{ key1: pattern1, key2: pattern2, ... }` + +Matches an Object with the given keys, with values matching the given patterns. +If any _pattern_ is a `Match.Maybe` or `Match.Optional`, that key does not need to exist +in the object. The value may not contain any keys not listed in the pattern. +The value must be a plain Object with no special prototype. + +```js +import { Match } from "meteor/check"; +let result; +// Will return true if `value` is an object with keys 'foo' and 'bar'. +result = Match.test(value, { foo: String, bar: Number }); +console.log(result); // true +``` + +### `Match.ObjectIncluding({ key1: pattern1, key2: pattern2, ... })` + +Matches an Object with the given keys; the value may also have other keys +with arbitrary values. + +```js +import { Match } from "meteor/check"; +let result; +// Will return true if `value` is an object with keys 'foo' and 'bar'. +result = Match.test(value, Match.ObjectIncluding({ foo: String, bar: Number })); +console.log(result); // true +``` + +### `Object` + +Matches any plain Object with any keys; equivalent to +`Match.ObjectIncluding({})`. + +```js +import { Match } from "meteor/check"; +let result; +// Will return true if `value` is an object. +result = Match.test(value, Object); +console.log(result); // true +``` + +### `Match.Maybe(pattern)` { #maybepattern } + +Matches either `undefined`, `null`, or _pattern_. If used in an object, matches only if the key is +not set as opposed to the value being set to `undefined` or `null`. This set of conditions was +chosen because `undefined` arguments to Meteor Methods are converted to `null` when sent over the +wire. + +```js +import { Match, check } from "meteor/check"; +// In an object +const pattern = { name: Match.Maybe(String) }; + +check({ name: "something" }, pattern); // OK +check({}, pattern); // OK +check({ name: undefined }, pattern); // Throws an exception +check({ name: null }, pattern); // Throws an exception + +// Outside an object +check(null, Match.Maybe(String)); // OK +check(undefined, Match.Maybe(String)); // OK +``` + +### `Match.Optional(pattern)` { #optionalpattern } + +Behaves like `Match.Maybe` except it doesn't accept `null`. If used in an object, the behavior is +identical to `Match.Maybe`. + +### `Match.OneOf(pattern1, pattern2, ...)` + +Matches any value that matches at least one of the provided patterns. + +### Any constructor function (eg, `Date`) + +Matches any element that is an instance of that type. + +```js +import { Match } from "meteor/check"; +let result; + +// Will return true if `value` is a Date. +result = Match.test(value, Date); +``` + +### `Match.Where(condition)` + +Calls the function _condition_ with the value as the argument. If _condition_ +returns true, this matches. If _condition_ throws a `Match.Error` or returns +false, this fails. If _condition_ throws any other error, that error is thrown +from the call to `check` or `Match.test`. Examples: + +```js +import { Match, check } from "meteor/check"; + +check(buffer, Match.Where(EJSON.isBinary)); + +const NonEmptyString = Match.Where((x) => { + check(x, String); + return x.length > 0; +}); + +check(arg, NonEmptyString); +``` diff --git a/v3-docs/docs/api/collections.md b/v3-docs/docs/api/collections.md new file mode 100644 index 0000000000..9db185defd --- /dev/null +++ b/v3-docs/docs/api/collections.md @@ -0,0 +1,1156 @@ +# Collections + +Meteor stores data in _collections_. To get started, declare a +collection with `new Mongo.Collection`. + + + +Calling this function is analogous to declaring a model in a traditional ORM +(Object-Relation Mapper)-centric framework. It sets up a _collection_ (a storage +space for records, or "documents") that can be used to store a particular type +of information, like users, posts, scores, todo items, or whatever matters to +your application. Each document is a EJSON object. It includes an `_id` +property whose value is unique in the collection, which Meteor will set when you +first create the document. + +```js +// Common code on client and server declares a DDP-managed Mongo collection. +const Chatrooms = new Mongo.Collection("chatrooms"); +const Messages = new Mongo.Collection("messages"); +``` + +The function returns an object with methods to [`insert`](#Mongo-Collection-insert) +documents in the collection, [`update`](#Mongo-Collection-update) their properties, and +[`remove`](#Mongo-Collection-remove) them, and to [`find`](#Mongo-Collection-find) the documents in the +collection that match arbitrary criteria. The way these methods work is +compatible with the popular Mongo database API. The same database API +works on both the client and the server (see below). + +```js +// Return an array of my messages. +const myMessages = await Messages.find({ userId: Meteor.userId() }).fetchAsync(); + +// Create a new message. +await Messages.insertAsync({ text: "Hello, world!" }); + +// Mark my first message as important. +await Messages.updateAsync(myMessages[0]._id, { $set: { important: true } }); +``` + + +If you pass a `name` when you create the collection, then you are +declaring a persistent collection — one that is stored on the +server and seen by all users. Client code and server code can both +access the same collection using the same API. + +Specifically, when you pass a `name`, here's what happens: + +- On the server (if you do not specify a `connection`), a collection with that + name is created on a backend Mongo server. When you call methods on that + collection on the server, they translate directly into normal Mongo operations + (after checking that they match your [access control rules](#Mongo-Collection-allow)). + +- On the client (and on the server if you specify a `connection`), a Minimongo + instance is created. Minimongo is essentially an in-memory, non-persistent + implementation of Mongo in pure JavaScript. It serves as a local cache that + stores just the subset of the database that this client is working with. Queries + ([`find`](#Mongo-Collection-find)) on these collections are served directly out of this cache, + without talking to the server. + +- When you write to the database on the client ([`insert`](#Mongo-Collection-insert), + [`update`](#Mongo-Collection-update), [`remove`](#Mongo-Collection-remove)), the command is executed locally + immediately, and, simultaneously, it's sent to the server and executed + there too. This happens via [stubs](./meteor.md#meteor-methods), because writes are + implemented as methods. + +> When, on the server, you write to a collection which has a specified +> `connection` to another server, it sends the corresponding method to the other +> server and receives the changed values back from it over DDP. Unlike on the +> client, it does not execute the write locally first. + +::: danger +On Meteor 3.x and later using `insert`, `update`, `upsert`, +`remove`, `findOne` on the server will throw and error. Use the +`*Async` counterparts instead. + +For example, instead of `collection.insert(doc)`, use `collection.insertAsync(doc)`. +::: + +If you pass a name to a client-only collection, it will not be synchronized +with the server and you need to populate the collection "manually" using the +low-level publication interface (`added/changed/removed`). +See [`added`](./meteor.md#Subscription-added) for more information. + +If you pass `null` as the `name`, then you're creating a local +collection. It's not synchronized anywhere; it's just a local scratchpad +that supports Mongo-style [`find`](#Mongo-Collection-find), [`insert`](#Mongo-Collection-insert), +[`update`](#Mongo-Collection-update), and [`remove`](#Mongo-Collection-remove) operations. (On both the +client and the server, this scratchpad is implemented using Minimongo.) + +By default, Meteor automatically publishes every document in your +collection to each connected client. To turn this behavior off, remove +the `autopublish` package, in your terminal: + +```bash +meteor remove autopublish +``` + +and instead call [`Meteor.publish`](./meteor.md#Meteor-publish) to specify which parts of +your collection should be published to which users. + +```js +// client.js +// Create a collection called `Posts` and put a document in it. The document +// will be immediately visible in the local copy of the collection. It will be +// written to the server-side database a fraction of a second later, and a +// fraction of a second after that, it will be synchronized down to any other +// clients that are subscribed to a query that includes it (see +// `Meteor.subscribe` and `autopublish`). +const Posts = new Mongo.Collection("posts"); +Posts.insert({ title: "Hello world", body: "First post" }); + +// Changes are visible immediately—no waiting for a round trip to the server. +assert(Posts.find().count() === 1); + +// Create a temporary, local collection. It works just like any other collection +// but it doesn't send changes to the server, and it can't receive any data from +// subscriptions. +const Scratchpad = new Mongo.Collection(); + +for (let i = 0; i < 10; i += 1) { + Scratchpad.insert({ number: i * 2 }); +} + +assert(Scratchpad.find({ number: { $lt: 9 } }).count() === 5); +``` + +Generally, you'll assign `Mongo.Collection` objects in your app to global +variables. You can only create one `Mongo.Collection` object for each +underlying Mongo collection. + +If you specify a `transform` option to the `Collection` or any of its retrieval +methods, documents are passed through the `transform` function before being +returned or passed to callbacks. This allows you to add methods or otherwise +modify the contents of your collection from their database representation. You +can also specify `transform` on a particular `find`, `findOne`, `allow`, or +`deny` call. Transform functions must return an object and they may not change +the value of the document's `_id` field (though it's OK to leave it out). + +```js +// An animal class that takes a document in its constructor. +class Animal { + constructor(doc) { + _.extend(this, doc); + } + + makeNoise() { + console.log(this.sound); + } +} + +// Define a collection that uses `Animal` as its document. +const Animals = new Mongo.Collection("animals", { + transform: (doc) => new Animal(doc), +}); + +// Create an animal and call its `makeNoise` method. +Animals.insert({ name: "raptor", sound: "roar" }); +Animals.findOne({ name: "raptor" }).makeNoise(); // Prints 'roar' +``` + +`transform` functions are not called reactively. If you want to add a +dynamically changing attribute to an object, do it with a function that computes +the value at the time it's called, not by computing the attribute at `transform` +time. + +::: warning +In this release, Minimongo has some limitations: + +- `$pull` in modifiers can only accept certain kinds + of selectors. +- `findAndModify`, aggregate functions, and + map/reduce aren't supported. + +All of these will be addressed in a future release. For full +Minimongo release notes, see packages/minimongo/NOTES +in the repository. +::: + + +::: warning +Minimongo doesn't currently have indexes. It's rare for this to be an +issue, since it's unusual for a client to have enough data that an +index is worthwhile. +::: + +Read more about collections and how to use them in the [Collections](http://guide.meteor.com/collections.html) article in the Meteor Guide. + + + + + +`find` returns a cursor. It does not immediately access the database or return +documents. Cursors provide `fetch` to return all matching documents, `map` and +`forEach` to iterate over all matching documents, and `observe` and +`observeChanges` to register callbacks when the set of matching documents +changes. Cursors also implement ES2015's [iteration protocols](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + +::: warning +Collection cursors are not query snapshots. If the database changes +between calling `Collection.find` and fetching the +results of the cursor, or while fetching results from the cursor, +those changes may or may not appear in the result set. +::: + +Cursors are a reactive data source. On the client, the first time you retrieve a +cursor's documents with `fetch`, `map`, or `forEach` inside a +reactive computation (eg, a template or +[`autorun`](./Tracker.md#Tracker-autorun)), Meteor will register a +dependency on the underlying data. Any change to the collection that +changes the documents in a cursor will trigger a recomputation. To +disable this behavior, pass `{reactive: false}` as an option to +`find`. + +Note that when `fields` are specified, only changes to the included +fields will trigger callbacks in `observe`, `observeChanges` and +invalidations in reactive computations using this cursor. Careful use +of `fields` allows for more fine-grained reactivity for computations +that don't depend on an entire document. + +On the client, there will be a period of time between when the page loads and +when the published data arrives from the server during which your client-side +collections will be empty. + + + + +::: warning +Client only. +For server/isomorphic usage see [findOneAsync](#Mongo-Collection-findOneAsync). +::: + +Equivalent to [`find`](#Mongo-Collection-find)`(selector, options).`[`fetch`](#Mongo-Cursor-fetch)`()[0]` with +`options.limit = 1`. + + + +Async version of [`findOne`](#Mongo-Collection-findOne) that return a `Promise`. + + + +Similar to `cursor.count`, but returns a `Promise`. For a faster version, see `estimatedDocumentCount`. + + + +Returns a `Promise` that resolves to the number of documents in the cursor's result set. The count is an estimate and not guaranteed to be exact. + + + +::: warning +Client only. +For server/isomorphic usage see [insertAsync](#Mongo-Collection-insertAsync). +::: + +Add a document to the collection. A document is just an object, and +its fields can contain any combination of EJSON-compatible datatypes +(arrays, objects, numbers, strings, `null`, true, and false). + +`insert` will generate a unique ID for the object you pass, insert it +in the database, and return the ID. When `insert` is called from +untrusted client code, it will be allowed only if passes any +applicable [`allow`](#Mongo-Collection-allow) and [`deny`](#Mongo-Collection-deny) rules. + +On the server, it should be used `insertAsync` that will return a promise with the `ID` of your +object. + +On the client, `insert` never blocks. If you do not provide a callback +and the insert fails on the server, then Meteor will log a warning to +the console. If you provide a callback, Meteor will call that function +with `error` and `result` arguments. In an error case, `result` is +undefined. If the insert is successful, `error` is undefined and +`result` is the new document ID. + +Example: + +```js +const groceriesId = Lists.insert({ name: "Groceries" }); + +Items.insert({ list: groceriesId, name: "Watercress" }); +Items.insert({ list: groceriesId, name: "Persimmons" }); +``` + + + + +Async version of [`insert`](#Mongo-Collection-insert) that return a `Promise`. + + + +::: warning +Client only. +For server/isomorphic usage see [updateAsync](#Mongo-Collection-updateAsync). +::: + +Modify documents that match `selector` according to `modifier` (see +[modifier documentation](#modifiers)). + +The behavior of `update` differs depending on whether it is called by +trusted or untrusted code. Trusted code includes server code and +method code. Untrusted code includes client-side code such as event +handlers and a browser's JavaScript console. + +- Trusted code can modify multiple documents at once by setting + `multi` to true, and can use an arbitrary [Mongo + selector](#selectors) to find the documents to modify. It bypasses + any access control rules set up by [`allow`](#Mongo-Collection-allow) and + [`deny`](#Mongo-Collection-deny). The number of affected documents will be returned + from the `update` call if you don't pass a callback. + +- Untrusted code can only modify a single document at once, specified + by its `_id`. The modification is allowed only after checking any + applicable [`allow`](#Mongo-Collection-allow) and [`deny`](#Mongo-Collection-deny) rules. The number + of affected documents will be returned to the callback. Untrusted + code cannot perform upserts, except in insecure mode. + +On the server, it should be used `updateAsync`. + +On the client, `update` never blocks. If you do not provide a callback +and the update fails on the server, then Meteor will log a warning to +the console. If you provide a callback, Meteor will call that function +with an error argument if there was an error, or a second argument +indicating the number of affected documents if the update was successful. + +::: code-group + +```js [server.js] +// Give the 'Winner' badge to each user with a score greater than 10. If they +// are logged in and their badge list is visible on the screen, it will update +// automatically as they watch. +Meteor.methods({ + async declareWinners() { + await Players.updateAsync( + { score: { $gt: 10 } }, + { + $addToSet: { badges: "Winner" }, + }, + { multi: true } + ); + }, +}); +``` + +```js [client.js] +// When the 'give points' button in the admin dashboard is pressed, give 5 +// points to the current player. The new score will be immediately visible on +// everyone's screens. +Template.adminDashboard.events({ + "click .give-points"() { + Players.update(Session.get("currentPlayer"), { + $inc: { score: 5 }, + }); + }, +}); +``` + + +You can use `update` to perform a Mongo upsert by setting the `upsert` +option to true. You can also use the [`upsert`](#Mongo-Collection-upsert) method to perform an +upsert that returns the `_id` of the document that was inserted (if there was one) +in addition to the number of affected documents. + + + +Async version of [`update`](#Mongo-Collection-update) that return a `Promise`. + + + +::: warning +Client only. +For server/isomorphic usage see [upsertAsync](#Mongo-Collection-upsertAsync). +::: + +Modify documents that match `selector` according to `modifier`, or insert +a document if no documents were modified. `upsert` is the same as calling +`update` with the `upsert` option set to true, except that the return +value of `upsert` is an object that contain the keys `numberAffected` +and `insertedId`. (`update` returns only the number of affected documents.) + + + +Async version of [`upsert`](#Mongo-Collection-upsert) that return a `Promise`. + + + +::: warning +Client only. +For server/isomorphic usage see [removeAsync](#Mongo-Collection-removeAsync). +::: + +Find all of the documents that match `selector` and delete them from +the collection. + +The behavior of `remove` differs depending on whether it is called by +trusted or untrusted code. Trusted code includes server code and +method code. Untrusted code includes client-side code such as event +handlers and a browser's JavaScript console. + +- Trusted code can use an arbitrary [Mongo selector](#selectors) to + find the documents to remove, and can remove more than one document + at once by passing a selector that matches multiple documents. It + bypasses any access control rules set up by [`allow`](#Mongo-Collection-allow) and + [`deny`](#Mongo-Collection-deny). The number of removed documents will be returned + from `remove` if you don't pass a callback. + + As a safety measure, if `selector` is omitted (or is `undefined`), + no documents will be removed. Set `selector` to `{}` if you really + want to remove all documents from your collection. + +- Untrusted code can only remove a single document at a time, + specified by its `_id`. The document is removed only after checking + any applicable [`allow`](#Mongo-Collection-allow) and [`deny`](#Mongo-Collection-deny) rules. The + number of removed documents will be returned to the callback. + +On the server, it should be used `removeAsync`. + +On the client, `remove` never blocks. If you do not provide a callback +and the remove fails on the server, then Meteor will log a warning to the +console. If you provide a callback, Meteor will call that function with an +error argument if there was an error, or a second argument indicating the number +of removed documents if the remove was successful. + +::: code-group + +```js [server.js] +// When the server starts, clear the log and delete all players with a karma of +// less than -2. +Meteor.startup(async () => { + if (Meteor.isServer) { + await Logs.removeAsync({}); + await Players.removeAsync({ karma: { $lt: -2 } }); + } +}); +``` + +```js [client.js] +// When the 'remove' button is clicked on a chat message, delete that message. +Template.chat.events({ + "click .remove"() { + Messages.remove(this._id); + }, +}); +``` + +::: + + + + + +Async version of [`remove`](#Mongo-Collection-remove) that return a `Promise`. + + + +For efficient and performant queries you will sometimes need to define indexes other than the default `_id` field. +You should add indexes to fields (or combinations of fields) you use to lookup documents in a collection. +This is where `createIndex` comes into play. It takes in 2 objects. First is the key and index type specification (which field and how they should be indexed) and second are options like the index name. +For details on how indexes work read the [MongoDB documentation](https://docs.mongodb.com/manual/indexes/). + +> Note that indexes only apply to server and MongoDB collection. They are not implemented for Minimongo at this time. + +Example defining a simple index on Players collection in Meteor: + +```js +Players.createIndex({ userId: 1 }, { name: "user reference on players" }); +``` + + + +Sometimes you or a package might change an already established indexes. This might throw an error and prevent a startup. +For cases where you can afford to re-build indexes or the change affect too many indexes you can set the `reCreateIndexOnOptionMismatch` +to true in your `settings.json`: + +```json +{ + "packages": { + "mongo": { + "reCreateIndexOnOptionMismatch": true + } + } +} +``` + +> You should use this option only when you are dealing with a change across many indexes and it is not feasible to fix them manually and you can afford the re-building of the indexes as this will destroy the old index and create a new one. Use this carefully. + + + +Async version of [`createIndex`](#Mongo-Collection-createIndex) that return a `Promise`. + + + + +::: warning +While `allow` and `deny` make it easy to get started building an app, it's +harder than it seems to write secure `allow` and `deny` rules. We recommend +that developers avoid `allow` and `deny`, and switch directly to custom methods +once they are ready to remove `insecure` mode from their app. See +[the Meteor Guide on security](https://guide.meteor.com/security.html#allow-deny) +for more details. +::: + +When a client calls `insert`, `update`, or `remove` on a collection, the +collection's `allow` and [`deny`](#Mongo-Collection-deny) callbacks are called +on the server to determine if the write should be allowed. If at least +one `allow` callback allows the write, and no `deny` callbacks deny the +write, then the write is allowed to proceed. + +These checks are run only when a client tries to write to the database +directly, for example by calling `update` from inside an event +handler. Server code is trusted and isn't subject to `allow` and `deny` +restrictions. That includes methods that are called with `Meteor.call` +— they are expected to do their own access checking rather than +relying on `allow` and `deny`. + +You can call `allow` as many times as you like, and each call can +include any combination of `insert`, `update`, and `remove` +functions. The functions should return `true` if they think the +operation should be allowed. Otherwise they should return `false`, or +nothing at all (`undefined`). In that case Meteor will continue +searching through any other `allow` rules on the collection. + +The available callbacks are: + +### Callbacks + +- `insert(userId, doc)` - The user `userId` wants to insert the + document `doc` into the collection. Return `true` if this should be + allowed. + + `doc` will contain the `_id` field if one was explicitly set by the client, or + if there is an active `transform`. You can use this to prevent users from + specifying arbitrary `_id` fields. + +- `update(userId, doc, fieldNames, modifier)` - The user `userId` + wants to update a document `doc` in the database. (`doc` is the + current version of the document from the database, without the + proposed update.) Return `true` to permit the change. + + `fieldNames` is an array of the (top-level) fields in `doc` that the + client wants to modify, for example + `['name', 'score']`. + + `modifier` is the raw Mongo modifier that + the client wants to execute; for example, + `{ $set: { 'name.first': 'Alice' }, $inc: { score: 1 } }`. + + Only Mongo modifiers are supported (operations like `$set` and `$push`). + If the user tries to replace the entire document rather than use + \$-modifiers, the request will be denied without checking the `allow` + functions. + +- `remove(userId, doc)` - the user `userId` wants to remove `doc` from the database. Return + `true` to permit this. + + +When calling `update` or `remove` Meteor will by default fetch the +entire document `doc` from the database. If you have large documents +you may wish to fetch only the fields that are actually used by your +functions. Accomplish this by setting `fetch` to an array of field +names to retrieve. + +Example: + +```js +// Create a collection where users can only modify documents that they own. +// Ownership is tracked by an `owner` field on each document. All documents must +// be owned by the user that created them and ownership can't be changed. Only a +// document's owner is allowed to delete it, and the `locked` attribute can be +// set on a document to prevent its accidental deletion. +const Posts = new Mongo.Collection("posts"); + +Posts.allow({ + insert(userId, doc) { + // The user must be logged in and the document must be owned by the user. + return userId && doc.owner === userId; + }, + + update(userId, doc, fields, modifier) { + // Can only change your own documents. + return doc.owner === userId; + }, + + remove(userId, doc) { + // Can only remove your own documents. + return doc.owner === userId; + }, + + fetch: ["owner"], +}); + +Posts.deny({ + update(userId, doc, fields, modifier) { + // Can't change owners. + return _.contains(fields, "owner"); + }, + + remove(userId, doc) { + // Can't remove locked documents. + return doc.locked; + }, + + fetch: ["locked"], // No need to fetch `owner` +}); +``` + +If you never set up any `allow` rules on a collection then all client +writes to the collection will be denied, and it will only be possible to +write to the collection from server-side code. In this case you will +have to create a method for each possible write that clients are allowed +to do. You'll then call these methods with `Meteor.call` rather than +having the clients call `insert`, `update`, and `remove` directly on the +collection. + + +Meteor also has a special "insecure mode" for quickly prototyping new +applications. In insecure mode, if you haven't set up any `allow` or `deny` +rules on a collection, then all users have full write access to the +collection. This is the only effect of insecure mode. If you call `allow` or +`deny` at all on a collection, even `Posts.allow({})`, then access is checked +just like normal on that collection. **New Meteor projects start in insecure +mode by default.** To turn it off just run in your terminal: + +```bash +meteor remove insecure +``` + + + +::: warning +While `allow` and `deny` make it easy to get started building an app, it's +harder than it seems to write secure `allow` and `deny` rules. We recommend +that developers avoid `allow` and `deny`, and switch directly to custom methods +once they are ready to remove `insecure` mode from their app. See +[the Meteor Guide on security](https://guide.meteor.com/security.html#allow-deny) +for more details. +::: + +This works just like [`allow`](#Mongo-Collection-allow), except it lets you +make sure that certain writes are definitely denied, even if there is an +`allow` rule that says that they should be permitted. + +When a client tries to write to a collection, the Meteor server first +checks the collection's `deny` rules. If none of them return true then +it checks the collection's `allow` rules. Meteor allows the write only +if no `deny` rules return `true` and at least one `allow` rule returns +`true`. + + + +The methods (like `update` or `insert`) you call on the resulting _raw_ collection return promises and can be used outside of a Fiber. + + + + +## Cursors {#mongo_cursor} + +To create a cursor, use [`find`](#Mongo-Collection-find). To access the documents in a +cursor, use [`forEach`](#Mongo-Cursor-forEach), [`map`](##Mongo-Cursor-map), [`fetch`](#Mongo-Cursor-fetch), +[`forEachAsync`](#Mongo-Cursor-forEachAsync), [`mapAsync`](#Mongo-Cursor-mapAsync), [`fetchAsync`](#Mongo-Cursor-fetchAsync) or ES2015's [iteration protocols](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + + + +This interface is compatible with [Array.forEach](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach). + +When called from a reactive computation, `forEach` registers dependencies on +the matching documents. + +Examples: + +```js +// Print the titles of the five top-scoring posts. +const topPosts = Posts.find({}, { sort: { score: -1 }, limit: 5 }); +let count = 0; + +topPosts.forEach((post) => { + console.log(`Title of post ${count}: ${post.title}`); + count += 1; +}); +``` + +::: warning +Client only. +For server/isomorphic usage see [removeAsync](#Mongo-Cursor-forEachAsync). +::: + + + +Async version of [`forEach`](#Mongo-Cursor-forEach) that return a `Promise`. + +The same example as from `forEach` but using `forEachAsync`: + +```js + +// Print the titles of the five top-scoring posts. +const topPosts = Posts.find({}, { sort: { score: -1 }, limit: 5 }); +let count = 0; + +await topPosts.forEachAsync((post) => { + console.log(`Title of post ${count}: ${post.title}`); + count += 1; +}); + +console.log("All done!"); // This will be printed after all the posts are printed. + +``` + + + +This interface is compatible with [Array.map](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map). + +When called from a reactive computation, `map` registers dependencies on +the matching documents. + + + +On the server, if `callback` yields, other calls to `callback` may occur while +the first call is waiting. If strict sequential execution is necessary, use +`forEach` instead. + +::: warning +Client only. +For server/isomorphic usage see [mapAsync](#Mongo-Cursor-mapAsync). +::: + + + + +Async version of [`map`](#Mongo-Cursor-map) that return a `Promise`. + + + +When called from a reactive computation, `fetch` registers dependencies on +the matching documents. + +::: warning +Client only. +For server/isomorphic usage see [fetchAsync](#Mongo-Cursor-fetchAsync). +::: + + + +Async version of [`fetch`](#Mongo-Cursor-fetch) that return a `Promise`. + + + + +Unlike the other functions, `count` registers a dependency only on the +number of matching documents. (Updates that just change or reorder the +documents in the result set will not trigger a recomputation.) + +::: warning +Client only. +For server/isomorphic usage see [countAsync](#Mongo-Cursor-countAsync). +::: + + + +Async version of [`count`](#Mongo-Cursor-count) that return a `Promise`. + + + +Establishes a _live query_ that invokes callbacks when the result of +the query changes. The callbacks receive the entire contents of the +document that was affected, as well as its old contents, if +applicable. If you only need to receive the fields that changed, see +[`observeChanges`](#Mongo-Cursor-observeChanges). + +`callbacks` may have the following functions as properties: + + +### Callbacks + +- `added(document)` or `addedAt(document, atIndex, before)` + A new document `document` entered the result set. The new document + appears at position `atIndex`. It is immediately before the document + whose `_id` is `before`. `before` will be `null` if the new document + is at the end of the results. + +- `changed(newDocument, oldDocument)` or `changedAt(newDocument, oldDocument, atIndex)` + The contents of a document were previously `oldDocument` and are now + `newDocument`. The position of the changed document is `atIndex`. + +- `removed(oldDocument)` or `removedAt(oldDocument, atIndex)` + The document `oldDocument` is no longer in the result set. It used + to be at position `atIndex`. + +- `movedTo(document, fromIndex, toIndex, before)` + A document changed its position in the result set, from `fromIndex` + to `toIndex` (which is before the document with id `before`). Its + current contents is `document`. + +Use `added`, `changed`, and `removed` when you don't care about the +order of the documents in the result set. They are more efficient than +`addedAt`, `changedAt`, and `removedAt`. + +Before `observe` returns, `added` (or `addedAt`) will be called zero +or more times to deliver the initial results of the query. + + +`observe` returns a live query handle, which is an object with a `stop` method. +Call `stop` with no arguments to stop calling the callback functions and tear +down the query. **The query will run forever until you call this.** If +`observe` is called from a `Tracker.autorun` computation, it is automatically +stopped when the computation is rerun or stopped. + +Live query handles have also `isReady` and `isReadyPromise` properties that +indicate if the cursor is ready to be observed. + +::: warning +`observe` in server returns a promise. +::: + +(If the cursor was created with the option `reactive` set to false, it will +only deliver the initial results and will not call any further callbacks; +it is not necessary to call `stop` on the handle.) + + + + +Establishes a _live query_ that invokes callbacks when the result of +the query changes. In contrast to [`observe`](#Mongo-Cursor-observe), +`observeChanges` provides only the difference between the old and new +result set, not the entire contents of the document that changed. + +`callbacks` may have the following functions as properties: + +### Callbacks + + +- `added(id, fields)` or `addedBefore(id, fields, before)` + A new document entered the result set. It has the `id` and `fields` + specified. `fields` contains all fields of the document excluding the + `_id` field. The new document is before the document identified by + `before`, or at the end if `before` is `null`. + +- `changed(id, fields)` + The document identified by `id` changed its contents. `fields` + contains the changed fields with their new values. If a field was + removed from the document then it will be present in `fields` with a + value of `undefined`. + +- `removed(id)` + The document identified by `id` is no longer in the result set. + +- `movedBefore(id, before)` + The document identified by `id` changed its position in the result + set, and now appears before the document identified by `before`. + +`observeChanges` is significantly more efficient if you do not use +`addedBefore` or `movedBefore`. + +Before `observeChanges` returns, `added` (or `addedBefore`) will be called +zero or more times to deliver the initial results of the query. + +`observeChanges` returns a live query handle, which is an object with a `stop` +method. Call `stop` with no arguments to stop calling the callback functions +and tear down the query. **The query will run forever until you call this.** +If +`observeChanges` is called from a `Tracker.autorun` computation, it is automatically +stopped when the computation is rerun or stopped. + +Live query handles have also `isReady` and `isReadyPromise` properties that +indicate if the cursor is ready to be observed. + +::: warning +`observe` in server returns a promise. +::: + +(If the cursor was created with the option `reactive` set to false, it will +only deliver the initial results and will not call any further callbacks; +it is not necessary to call `stop` on the handle.) + +> Unlike `observe`, `observeChanges` does not provide absolute position +> information (that is, `atIndex` positions rather than `before` +> positions.) This is for efficiency. + +Example: + +```js +// Keep track of how many administrators are online. +let count = 0; +const cursor = Users.find({ admin: true, onlineNow: true }); + +const handle = cursor.observeChanges({ + added(id, user) { + count += 1; + console.log(`${user.name} brings the total to ${count} admins.`); + }, + + removed() { + count -= 1; + console.log(`Lost one. We're now down to ${count} admins.`); + }, +}); + +// After five seconds, stop keeping the count. +setTimeout(() => handle.stop(), 5000); +``` + + + + +`Mongo.ObjectID` follows the same API as the [Node MongoDB driver `ObjectID`](http://mongodb.github.io/node-mongodb-native/3.0/api/ObjectID.html) +class. Note that you must use the `equals` method (or [`EJSON.equals`](./EJSON.md#EJSON-equals)) to +compare them; the `===` operator will not work. If you are writing generic code +that needs to deal with `_id` fields that may be either strings or `ObjectID`s, use +[`EJSON.equals`](./EJSON.md#EJSON-equals) instead of `===` to compare them. + +> `ObjectID` values created by Meteor will not have meaningful answers to their `getTimestamp` +> method, since Meteor currently constructs them fully randomly. + + + +## Selectors {#selectors} + +The simplest selectors are just a string or +[`Mongo.ObjectID`](#Mongo-ObjectID). These selectors match the +document with that value in its `_id` field. + +A slightly more complex form of selector is an object containing a set of keys +that must match in a document: + +```js +// Matches all documents where `deleted` is false. +{ deleted: false } + +// Matches all documents where the `name` and `cognomen` are as given. +{ name: 'Rhialto', cognomen: 'the Marvelous' } + +// Matches every document. +{} +``` + + +But they can also contain more complicated tests: + +```js +// Matches documents where `age` is greater than 18. +{ + age: { + $gt: 18; + } +} + +// Matches documents where `tags` is an array containing 'popular'. +{ + tags: "popular"; +} + +// Matches documents where `fruit` is one of three possibilities. +{ + fruit: { + $in: ["peach", "plum", "pear"]; + } +} +``` + +See the [complete documentation](http://docs.mongodb.org/manual/reference/operator/). + +## Modifiers {#modifiers} + + +A modifier is an object that describes how to update a document in +place by changing some of its fields. Some examples: + +```js +// Set the `admin` property on the document to true. +{ $set: { admin: true } } + +// Add 2 to the `votes` property and add 'Traz' to the end of the `supporters` +// array. +{ $inc: { votes: 2 }, $push: { supporters: 'Traz' } } +``` + +But if a modifier doesn't contain any \$-operators, then it is instead +interpreted as a literal document, and completely replaces whatever was +previously in the database. (Literal document modifiers are not currently +supported by [validated updates](#Mongo-Collection-allow).) + + +```js +// Find the document with ID '123' and completely replace it. +Users.update({ _id: "123" }, { name: "Alice", friends: ["Bob"] }); +``` + +See the [full list of modifiers](http://docs.mongodb.org/manual/reference/operator/update/). + +## Sort specifiers {#sortspecifiers} + +Sorts may be specified using your choice of several syntaxes: + +```js +// All of these do the same thing (sort in ascending order by key `a`, breaking +// ties in descending order of key `b`). +[['a', 'asc'], ['b', 'desc']] +['a', ['b', 'desc']] +{ a: 1, b: -1 } + +// Sorted by `createdAt` descending. +Users.find({}, { sort: { createdAt: -1 } }); + +// Sorted by `createdAt` descending and by `name` ascending. +Users.find({}, { sort: [['createdAt', 'desc'], ['name', 'asc']] }); +``` + +The last form will only work if your JavaScript implementation +preserves the order of keys in objects. Most do, most of the time, but +it's up to you to be sure. + +For local collections you can pass a comparator function which receives two +document objects, and returns -1 if the first document comes first in order, +1 if the second document comes first, or 0 if neither document comes before +the other. This is a Minimongo extension to MongoDB. + +## Field specifiers {#fieldspecifiers} + +Queries can specify a particular set of fields to include or exclude from the +result object. + +To exclude specific fields from the result objects, the field specifier is a +dictionary whose keys are field names and whose values are `0`. All unspecified +fields are included. + +```js +Users.find({}, { fields: { password: 0, hash: 0 } }); +``` + +To include only specific fields in the result documents, use `1` as +the value. The `_id` field is still included in the result. + +```js +Users.find({}, { fields: { firstname: 1, lastname: 1 } }); +``` + +With one exception, it is not possible to mix inclusion and exclusion styles: +the keys must either be all 1 or all 0. The exception is that you may specify +`_id: 0` in an inclusion specifier, which will leave `_id` out of the result +object as well. However, such field specifiers can not be used with +[`observeChanges`](#Mongo-Cursor-observeChanges), [`observe`](#Mongo-Cursor-observe), cursors returned +from a [publish function](./meteor.md#Meteor-publish). They may be used with [`fetch`](#Mongo-Cursor-fetch), +[`findOne`](#Mongo-Collection-findOne), [`forEach`](#Mongo-Cursor-forEach), and [`map`](#Mongo-Cursor-map). + +Field +operators such as `$` and `$elemMatch` are not available on the client side +yet. + + +A more advanced example: + +```js +Users.insert({ + alterEgos: [ + { name: "Kira", alliance: "murderer" }, + { name: "L", alliance: "police" }, + ], + name: "Yagami Light", +}); + +Users.findOne({}, { fields: { "alterEgos.name": 1, _id: 0 } }); +// Returns { alterEgos: [{ name: 'Kira' }, { name: 'L' }] } +``` + + + +See +the MongoDB docs for details of the nested field rules and array behavior. + +## Connecting to your database {#mongo_url} + +When developing your application, Meteor starts a local MongoDB instance and +automatically connects to it. In production, you must specify a `MONGO_URL` +environment variable pointing at your database in [the standard mongo connection +string format](https://docs.mongodb.com/manual/reference/connection-string). + +> You can also set `MONGO_URL` in development if you want to connect to a +> different MongoDB instance. + +If you want to use oplog tailing for livequeries, you should also set +`MONGO_OPLOG_URL` (generally you'll need a special user with oplog access, but +the detail can differ depending on how you host your MongoDB. Read more [here](https://github.com/meteor/docs/blob/master/long-form/oplog-observe-driver.md)). + +> As of Meteor 1.4, you must ensure you set the `replicaSet` parameter on your +> `METEOR_OPLOG_URL` + +## MongoDB connection options {#mongo_connection_options} + +MongoDB provides many connection options, usually the default works but in some +cases you may want to pass additional options. You can do it in two ways: + +### Meteor settings {#mongo_connection_options_settings} + +You can use your Meteor settings file to set the options in a property called +`options` inside `packages` > `mongo`, these values will be provided as options for MongoDB in +the connect method. + +> this option was introduced in Meteor 1.10.2 + +For example, you may want to specify a certificate for your +TLS connection ([see the options here](https://mongodb.github.io/node-mongodb-native/3.5/tutorials/connect/tls/)) then you could use these options: + +```json + "packages": { + "mongo": { + "options": { + "tls": true, + "tlsCAFileAsset": "certificate.pem" + } + } + } +``` + +Meteor will convert relative paths to absolute paths if the option name (key) +ends with `Asset`, for this to work properly you need to place the files in the +`private` folder in the root of your project. In the example Mongo connection would +receive this: + +```json + "packages": { + "mongo": { + "options": { + "tls": true, + "tlsCAFile": "/absolute/path/certificate.pem" + } + } + } +``` + +See that the final option name (key) does not contain `Asset` in the end as +expected by MongoDB. + +This configuration is necessary in some MongoDB host providers to avoid this +error `MongoNetworkError: failed to connect to server [sg-meteorappdb-32194.servers.mongodirector.com:27017] on first connect [Error: self signed certificate`. + +Another way to avoid this error is to allow invalid certificates with this +option: + +```json + "packages": { + "mongo": { + "options": { + "tlsAllowInvalidCertificates": true + } + } + } +``` + +You can pass any MongoDB valid option, these are just examples using +certificates configurations. + +### Mongo.setConnectionOptions(options) + +You can also call `Mongo.setConnectionOptions` to set the connection options but +you need to call it before any other package using Mongo connections is +initialized so you need to add this code in a package and add it above the other +packages, like accounts-base in your `.meteor/packages` file. + +> this option was introduced in Meteor 1.4 diff --git a/v3-docs/docs/api/email.md b/v3-docs/docs/api/email.md new file mode 100644 index 0000000000..89c46d8483 --- /dev/null +++ b/v3-docs/docs/api/email.md @@ -0,0 +1,166 @@ +# Email + +The `email` package allows sending email from a Meteor app. To use it, add the +package to your project by running in your terminal: + +```bash +meteor add email +``` + +There are two ways on how to setup the package for sending e-mail. + +First is to set `MAIL_URL`. The server reads from the `MAIL_URL` environment +variable to determine how to send mail. The `MAIL_URL` should reference an +[SMTP](https://en.wikipedia.org/wiki/Simple_Mail_Transfer_Protocol) server and +use the form `smtp://USERNAME:PASSWORD@HOST:PORT` or +`smtps://USERNAME:PASSWORD@HOST:PORT`. The `smtps://` form (the `s` is for +"secure") should be used if the mail server requires TLS/SSL (and does not use +`STARTTLS`) and is most common on port 465. Connections which start unencrypted +prior to being upgraded to TLS/SSL (using `STARTTLS`) typically use port 587 +(and _sometimes_ 25) and should use `smtp://`. For more information see the +[Nodemailer docs](https://nodemailer.com/smtp/) + +Second, if you are using a one of the [supported services](https://community.nodemailer.com/smtp/well-known/#supported-services) you can setup the sending options in your app settings like this: + +```json +{ + "packages": { + "email": { + "service": "Mailgun", + "user": "postmaster@meteor.com", + "password": "superDuperPassword" + } + } +} +``` + +The package will take care of the rest. + +> If you use a supported service the package will try to match to supported service and use the stored settings instead. +> You can force this by switching protocol like `smtp` to the name of the service. +> Though you should only use this as a stop-gap measure and instead set the settings properly. + +If neither option is set, `Email.send` outputs the message to standard output +instead. + +> Package setting is only available since Email v2.2 + + + +You must provide the `from` option and at least one of `to`, `cc`, and `bcc`; +all other options are optional. + +`Email.send` only works on the server. Here is an example of how a +client could use a server method call to send an email. (In an actual +application, you'd need to be careful to limit the emails that a +client could send, to prevent your server from being used as a relay +by spammers.) + +::: code-group + +```js [server.js] +import { Meteor } from "meteor/meteor"; +import { Email } from "meteor/email"; +import { check } from "meteor/check"; +// Server: Define a method that the client can call. +Meteor.methods({ + sendEmail({ to, from, subject, text }) { + // Make sure that all arguments are strings. + check([to, from, subject, text], [String]); + + Email.send({ to, from, subject, text }); + }, +}); +``` + +```js [client.js] +import { Meteor } from "meteor/meteor"; +// Client: Asynchronously send an email. +Meteor.callAsync("sendEmail", { + to: "Alice ", + from: "bob@example.com", + subject: "Hello from Meteor!", + text: "This is a test of Email.send.", +}); +``` + +::: + + + +`sendAsync` only works on the server. It has the same behavior as `Email.send`, but returns a Promise. +If you defined `Email.customTransport`, the `callAsync` method returns the return value from the `customTransport` method or a Promise, if this method is async. + +```js +// Server: Define a method that the client can call. +Meteor.methods({ + sendEmail({ to, from, subject, text }) { + // Make sure that all arguments are strings. + check([to, from, subject, text], [String]); + + return Email.sendAsync({ to, from, subject, text }).catch((err) => { + // do something with the error + }); + }, +}); +``` + + + +```js +import { Email } from 'meteor/email' + +Email.hookSend(({to}) => { + if (to === 'ceo@company.com') { + console.log(`Let's not send email to the CEO`); + return false; + } + return true; +}) +``` + +`hookSend` is a convenient hook if you want to: prevent sending certain emails, +send emails via your own integration instead of the default one provided by +Meteor, or do something else with the data. This is especially useful +if you want to intercept emails sent by core packages like accounts-password +or other packages where you can't modify the email code. + +The hook function will receive an object with the options for Nodemailer. + + + + +> `Email.customTransport` is only available since Email v2.2 + +There are scenarios when you have your own transport set up, be it an SDK +for your mailing service or something else. This is where `customTransport` +comes in. If you set this function all sending events will be passed to it +(after `hookSend` is run) with an object of the options passed into `send` +function with addition of `packageSettings` key which will pass in package settings +set in your app settings (if any). It is up to you what you do in that function +as it will override the original sending function. + +Here is a simple example with Mailgun: + +```javascript +import { Email } from 'meteor/email' +import { Log } from 'meteor/logging' +import Mailgun from 'mailgun-js' + +Email.customTransport = (data) => { + // `options.packageSettings` are settings from `Meteor.settings.packages.email` + // The rest of the options are from Email.send options + const mailgun = Mailgun({ apiKey: data.packageSettings.mailgun.privateKey, domain: 'mg.mygreatapp.com' }) + + // Since the data object that we receive already includes the correct key names for sending + // we can just pass it to the mailgun sending message. + mailgun.messages().send(data, (error, body) => { + if (error) Log.error(error) + if (body) Log.info(body) + }) +} +``` + +> Note that this also overrides the development display of messages in console +> so you might want to differentiate between production and development for +> setting this function. diff --git a/v3-docs/docs/api/index.md b/v3-docs/docs/api/index.md new file mode 100644 index 0000000000..d3fb2c693b --- /dev/null +++ b/v3-docs/docs/api/index.md @@ -0,0 +1,2 @@ + + diff --git a/v3-docs/docs/api/meteor.md b/v3-docs/docs/api/meteor.md new file mode 100644 index 0000000000..4afc4ce547 --- /dev/null +++ b/v3-docs/docs/api/meteor.md @@ -0,0 +1,958 @@ +# Meteor API + +Meteor global object has many functions and properties for handling utilities, network and much more. + +### Core APIs {#core} + + + +On a server, the function will run as soon as the server process is +finished starting. On a client, the function will run as soon as the DOM +is ready. Code wrapped in `Meteor.startup` always runs after all app +files have loaded, so you should put code here if you want to access +shared variables from other files. + +The `startup` callbacks are called in the same order as the calls to +`Meteor.startup` were made. + +On a client, `startup` callbacks from packages will be called +first, followed by `` templates from your `.html` files, +followed by your application code. + +::: code-group + +```js [server.js] +import { Meteor } from "meteor/meteor"; +import { LinksCollection } from "/imports/api/links"; + +Meteor.startup(async () => { + // If the Links collection is empty, add some data. + if ((await LinksCollection.find().countAsync()) === 0) { + await LinksCollection.insertAsync({ + title: "Do the Tutorial", + url: "https://www.meteor.com/tutorials/react/creating-an-app", + }); + } +}); +``` + +```js [client.js] +import React from "react"; +import { createRoot } from "react-dom/client"; +import { Meteor } from "meteor/meteor"; +import { App } from "/imports/ui/App"; + +// Setup react root +Meteor.startup(() => { + const container = document.getElementById("react-target"); + const root = createRoot(container); + root.render(); +}); +``` + +::: + + + + + + + + + + + +::: danger +`Meteor.isServer` can be used to limit where code runs, but it does not prevent code from +being sent to the client. Any sensitive code that you don’t want served to the client, +such as code containing passwords or authentication mechanisms, +should be kept in the `server` directory. +::: + + + + + + + + + + + +### Method APIs {#methods} + +Meteor Methods are Remote Procedure Calls (RPCs) are functions defined by `Meteor.methods` +and called by [`Meteor.call`](#Meteor-call). + + + +The most basic way to define a method is to provide a function: + +::: code-group + +```js [server.js] +import { Meteor } from "meteor/meteor"; + +Meteor.methods({ + sum(a, b) { + return a + b; + }, +}); +``` + +```js [client.js] +import { Meteor } from "meteor/meteor"; + +const result = await Meteor.callAsync("sum", 1, 2); +console.log(result); // 3 +``` + +::: + +You can use `Meteor.methods` to define multiple methods at once. + +You can think of `Meteor.methods` as a way of defining a remote object that is your server API. + +A more complete example: + +::: code-group + +```js [server.js] +import { Meteor } from "meteor/meteor"; +import { check } from "meteor/check"; +import { LinksCollection } from "/imports/api/links"; + +Meteor.methods({ + async addLink(link) { + check(link, String); // check if the link is a string + + // Do stuff... + const linkID = await LinksCollection.insertAsync(link); + if (/* you want to throw an error */) { + throw new Meteor.Error('Something is wrong', "Some details"); + } + + return linkID; + }, + + bar() { + // Do other stuff... + return 'baz'; + } +}); +``` + +```js [client.js] +import React from "react"; +import { Meteor } from "meteor/meteor"; + +function Component() { + const addLink = () => + Meteor.callAsync( + "addLink", + "https://www.meteor.com/tutorials/react/creating-an-app" + ); + + return ( +
+ +
+ ); +} +``` + +::: + +Calling `methods` on the server defines functions that can be called remotely by +clients. They should return an [EJSON](./EJSON)-able value or throw an +exception. Inside your method invocation, `this` is bound to a method +invocation object, which provides the following: + +- `isSimulation`: a boolean value, true if this invocation is a stub. +- `unblock`: when called, allows the next method from this client to + begin running. +- `userId`: the id of the current user. +- `setUserId`: a function that associates the current client with a user. +- `connection`: on the server, the [connection](#Meteor-onConnection) this method call was received on. + +Calling `methods` on the client defines _stub_ functions associated with +server methods of the same name. You don't have to define a stub for +your method if you don't want to. In that case, method calls are just +like remote procedure calls in other systems, and you'll have to wait +for the results from the server. + +If you do define a stub, when a client invokes a server method it will +also run its stub in parallel. On the client, the return value of a +stub is ignored. Stubs are run for their side-effects: they are +intended to _simulate_ the result of what the server's method will do, +but without waiting for the round trip delay. If a stub throws an +exception it will be logged to the console. + +You use methods all the time, because the database mutators +([`insert`](./collections#Mongo-Collection-insert), [`update`](./collections#Mongo-Collection-update), [`remove`](./collections#Mongo-Collection-remove)) are implemented +as methods. When you call any of these functions on the client, you're invoking +their stub version that update the local cache, and sending the same write +request to the server. When the server responds, the client updates the local +cache with the writes that actually occurred on the server. + +You don't have to put all your method definitions into a single `Meteor.methods` +call; you may call it multiple times, as long as each method has a unique name. + +If a client calls a method and is disconnected before it receives a response, +it will re-call the method when it reconnects. This means that a client may +call a method multiple times when it only means to call it once. If this +behavior is problematic for your method, consider attaching a unique ID +to each method call on the client, and checking on the server whether a call +with this ID has already been made. Alternatively, you can use +[`Meteor.apply`](#Meteor-apply) with the noRetry option set to true. + +Read more about methods and how to use them in the [Methods](http://guide.meteor.com/methods.html) article in the Meteor Guide. + + + +This method can be used to determine if the current method invocation is +asynchronous. It returns true if the method is running on the server and came from +an async call(`Meteor.callAsync`) + +::: code-group + +```js [server.js] +import { Meteor } from "meteor/meteor"; + +Meteor.methods({ + async foo() { + return Meteor.isAsyncCall(); + }, +}); +``` + +```js [client.js] +import { Meteor } from "meteor/meteor"; + +const result = await Meteor.callAsync("foo"); +console.log(result); // true + +Meteor.call("foo", (err, result) => { + console.log(result); // false +}); +``` + +::: + +## this.userId {#methods-userId} + +The user id is an arbitrary string — typically the id of the user record +in the database. You can set it with the `setUserId` function. If you're using +the [Meteor accounts system](./accounts.md) then this is handled for you. + +```js +import { Meteor } from "meteor/meteor"; + +Meteor.methods({ + foo() { + console.log(this.userId); + }, +}); +``` + +## this.setUserId {#methods-setUserId} + +Call this function to change the currently logged-in user on the +connection that made this method call. This simply sets the value of +`userId` for future method calls received on this connection. Pass +`null` to log out the connection. + +If you are using the [built-in Meteor accounts system](./accounts) then this +should correspond to the `_id` field of a document in the +[`Meteor.users`](./accounts.md#Meteor-user) collection. + +`setUserId` is not retroactive. It affects the current method call and +any future method calls on the connection. Any previous method calls on +this connection will still see the value of `userId` that was in effect +when they started. + +If you also want to change the logged-in user on the client, then after calling +`setUserId` on the server, call `Meteor.connection.setUserId(userId)` on the +client. + +```js +import { Meteor } from "meteor/meteor"; + +Meteor.methods({ + foo() { + this.setUserId("some-id"); + }, +}); +``` + +## this.connection {#methods-connection} + +Access inside a method invocation. The [connection](#Meteor-onConnection) that this method was received on. +null if the method is not associated with a connection, +eg. a server initiated method call. Calls to methods +made from a server method which was in turn initiated from the client share the same +connection. + + + +For example: + +::: code-group + +```js [server.js] +import { Meteor } from "meteor/meteor"; +// on the server, pick a code unique to this error +// the reason field should be a useful debug message +Meteor.methods({ + methodName() { + throw new Meteor.Error( + "logged-out", + "The user must be logged in to post a comment." + ); + }, +}); +``` + +```js [client.js] +import { Meteor } from "meteor/meteor"; +// on the client +Meteor.call("methodName", function (error) { + // identify the error + if (error && error.error === "logged-out") { + // show a nice error message + Session.set("errorMessage", "Please log in to post a comment."); + } +}); +``` + +::: + +If you want to return an error from a method, throw an exception. Methods can +throw any kind of exception. But `Meteor.Error` is the only kind of error that +a server will send to the client. If a method function throws a different +exception, then it will be mapped to a sanitized version on the +wire. Specifically, if the `sanitizedError` field on the thrown error is set to +a `Meteor.Error`, then that error will be sent to the client. Otherwise, if no +sanitized version is available, the client gets +`Meteor.Error(500, 'Internal server error')`. + + + +This is how to invoke a method with a sync stub. It will run the method on the server. If a +stub is available, it will also run the stub on the client. (See also +[`Meteor.apply`](#Meteor-apply), which is identical to `Meteor.call` except that +you specify the parameters as an array instead of as separate arguments and you +can specify a few options controlling how the method is executed.) + +If you include a callback function as the last argument (which can't be +an argument to the method, since functions aren't serializable), the +method will run asynchronously: it will return nothing in particular and +will not throw an exception. When the method is complete (which may or +may not happen before `Meteor.call` returns), the callback will be +called with two arguments: `error` and `result`. If an error was thrown, +then `error` will be the exception object. Otherwise, `error` will be +`undefined` and the return value (possibly `undefined`) will be in `result`. + +```js +// Asynchronous call +Meteor.call('foo', 1, 2, (error, result) => { ... }); +``` + +If you do not pass a callback on the server, the method invocation will +block until the method is complete. It will eventually return the +return value of the method, or it will throw an exception if the method +threw an exception. (Possibly mapped to 500 Server Error if the +exception happened remotely and it was not a `Meteor.Error` exception.) + +```js +// Synchronous call +const result = Meteor.call("foo", 1, 2); +``` + +On the client, if you do not pass a callback and you are not inside a +stub, `call` will return `undefined`, and you will have no way to get +the return value of the method. That is because the client doesn't have +fibers, so there is not actually any way it can block on the remote +execution of a method. + +Finally, if you are inside a stub on the client and call another +method, the other method is not executed (no RPC is generated, nothing +"real" happens). If that other method has a stub, that stub stands in +for the method and is executed. The method call's return value is the +return value of the stub function. The client has no problem executing +a stub synchronously, and that is why it's okay for the client to use +the synchronous `Meteor.call` form from inside a method body, as +described earlier. + +Meteor tracks the database writes performed by methods, both on the client and +the server, and does not invoke `asyncCallback` until all of the server's writes +replace the stub's writes in the local cache. In some cases, there can be a lag +between the method's return value being available and the writes being visible: +for example, if another method still outstanding wrote to the same document, the +local cache may not be up to date until the other method finishes as well. If +you want to process the method's result as soon as it arrives from the server, +even if the method's writes are not available yet, you can specify an +`onResultReceived` callback to [`Meteor.apply`](#Meteor-apply). + + + +`Meteor.callAsync` is just like `Meteor.call`, except that it'll return a promise that you need to solve to get the result. + + + +`Meteor.apply` is just like `Meteor.call`, except that the method arguments are +passed as an array rather than directly as arguments, and you can specify +options about how the client executes the method. + + + +`Meteor.applyAsync` is just like `Meteor.apply`, except it is an async function, and it will consider that the stub is async. + +### Publish and subscribe {#pubsub} + +These functions control how Meteor servers publish sets of records and +how clients can subscribe to those sets. + + +To publish records to clients, call `Meteor.publish` on the server with +two parameters: the name of the record set, and a _publish function_ +that Meteor will call each time a client subscribes to the name. + +Publish functions can return a +[`Collection.Cursor`](./collections.md#mongo_cursor), in which case Meteor +will publish that cursor's documents to each subscribed client. You can +also return an array of `Collection.Cursor`s, in which case Meteor will +publish all of the cursors. + +::: warning +If you return multiple cursors in an array, they currently must all be from +different collections. We hope to lift this restriction in a future release. +::: + + + + + +```js +import { Meteor } from "meteor/meteor"; +import { check } from "meteor/check"; +import { Rooms } from "/imports/api/Rooms"; +import { Messages } from "/imports/api/Messages"; + +// Server: Publish the `Rooms` collection, minus secret info... +Meteor.publish("rooms", function () { + return Rooms.find( + {}, + { + fields: { secretInfo: 0 }, + } + ); +}); + +// ...and publish secret info for rooms where the logged-in user is an admin. If +// the client subscribes to both publications, the records are merged together +// into the same documents in the `Rooms` collection. Note that currently object +// values are not recursively merged, so the fields that differ must be top +// level fields. +Meteor.publish("adminSecretInfo", function () { + return Rooms.find( + { admin: this.userId }, + { + fields: { secretInfo: 1 }, + } + ); +}); + +// Publish dependent documents and simulate joins. +Meteor.publish("roomAndMessages", function (roomId) { + check(roomId, String); + + return [ + Rooms.find( + { _id: roomId }, + { + fields: { secretInfo: 0 }, + } + ), + Messages.find({ roomId }), + ]; +}); +``` + +Alternatively, a publish function can directly control its published record set +by calling the functions [`added`](#Subscription-added) (to add a new document to the +published record set), [`changed`](#Subscription-changed) (to change or clear some +fields on a document already in the published record set), and +[`removed`](#Subscription-removed) (to remove documents from the published record +set). These methods are provided by `this` in your publish function. + +If a publish function does not return a cursor or array of cursors, it is +assumed to be using the low-level `added`/`changed`/`removed` interface, and it +**must also call [`ready`](#Subscription-ready) once the initial record set is +complete**. + +::: code-group + +```js [collections.js] +import { Mongo } from "meteor/mongo"; + +export const Rooms = new Mongo.Collection("rooms"); +export const SecretData = new Mongo.Collection("messages"); +``` + +```js [server.js] +import { Meteor } from "meteor/meteor"; +import { check } from "meteor/check"; +import { Rooms, SecretData } from "/imports/api/collections"; + +// Publish the current size of a collection. +Meteor.publish("countsByRoom", function (roomId) { + check(roomId, String); + + let count = 0; + let initializing = true; + + // `observeChanges` only returns after the initial `added` callbacks have run. + // Until then, we don't want to send a lot of `changed` messages—hence + // tracking the `initializing` state. + const handle = Messages.find({ roomId }).observeChanges({ + added: (id) => { + count += 1; + + if (!initializing) { + this.changed("counts", roomId, { count }); + } + }, + + removed: (id) => { + count -= 1; + this.changed("counts", roomId, { count }); + }, + + // We don't care about `changed` events. + }); + + // Instead, we'll send one `added` message right after `observeChanges` has + // returned, and mark the subscription as ready. + initializing = false; + this.added("counts", roomId, { count }); + this.ready(); + + // Stop observing the cursor when the client unsubscribes. Stopping a + // subscription automatically takes care of sending the client any `removed` + // messages. + this.onStop(() => handle.stop()); +}); + +// Sometimes publish a query, sometimes publish nothing. +Meteor.publish("secretData", function () { + if (this.userId === "superuser") { + return SecretData.find(); + } else { + // Declare that no data is being published. If you leave this line out, + // Meteor will never consider the subscription ready because it thinks + // you're using the `added/changed/removed` interface where you have to + // explicitly call `this.ready`. + return []; + } +}); +``` + +```js [client.js] +import { Meteor } from "meteor/meteor"; +import { Mongo } from "meteor/mongo"; +import { Session } from "meteor/session"; +// Declare a collection to hold the count object. +const Counts = new Mongo.Collection("counts"); + +// Subscribe to the count for the current room. +Tracker.autorun(() => { + Meteor.subscribe("countsByRoom", Session.get("roomId")); +}); + +// Use the new collection. +const roomCount = Counts.findOne(Session.get("roomId")).count; +console.log(`Current room has ${roomCount} messages.`); +``` + +::: warning + +Meteor will emit a warning message if you call `Meteor.publish` in a +project that includes the `autopublish` package. Your publish function +will still work. + +::: + +Read more about publications and how to use them in the +[Data Loading](http://guide.meteor.com/data-loading.html) article in the Meteor Guide. + + + +This is constant. However, if the logged-in user changes, the publish +function is rerun with the new value, assuming it didn't throw an error at the previous run. + + + + + + + +If you call [`observe`](./collections.md#Mongo-Cursor-observe) or [`observeChanges`](./collections.md#Mongo-Cursor-observeChanges) in your +publish handler, this is the place to stop the observes. + + + + + + + +When you subscribe to a record set, it tells the server to send records to the +client. The client stores these records in local [Minimongo collections](./collections.md), with the same name as the `collection` +argument used in the publish handler's [`added`](#Subscription-added), +[`changed`](#Subscription-changed), and [`removed`](#Subscription-removed) +callbacks. Meteor will queue incoming records until you declare the +[`Mongo.Collection`](./collections.md) on the client with the matching +collection name. + +```js +// It's okay to subscribe (and possibly receive data) before declaring the +// client collection that will hold it. Assume 'allPlayers' publishes data from +// the server's 'players' collection. +Meteor.subscribe("allPlayers"); + +// The client queues incoming 'players' records until the collection is created: +const Players = new Mongo.Collection("players"); +``` + +The client will see a document if the document is currently in the published +record set of any of its subscriptions. If multiple publications publish a +document with the same `_id` for the same collection the documents are merged for +the client. If the values of any of the top level fields conflict, the resulting +value will be one of the published values, chosen arbitrarily. + +::: warning +Currently, when multiple subscriptions publish the same document _only the top +level fields_ are compared during the merge. This means that if the documents +include different sub-fields of the same top level field, not all of them will +be available on the client. We hope to lift this restriction in a future release. +::: + +The `onReady` callback is called with no arguments when the server [marks the subscription as ready](#Subscription-ready). The `onStop` callback is called with +a [`Meteor.Error`](#Meteor-Error) if the subscription fails or is terminated by +the server. If the subscription is stopped by calling `stop` on the subscription +handle or inside the publication, `onStop` is called with no arguments. + +`Meteor.subscribe` returns a subscription handle, which is an object with the +following properties: + +```ts +import { Meteor } from "meteor/meteor"; +const handle = Meteor.subscribe("allPlayers"); + +handle.ready(); // True when the server has marked the subscription as ready + +handle.stop(); // Stop this subscription and unsubscribe from the server + +handle.subscriptionId; // The id of the subscription this handle is for. +``` + +When you run Meteor.subscribe inside of Tracker.autorun, the handles you get will always have the same subscriptionId field. +You can use this to deduplicate subscription handles if you are storing them in some data structure. + +If you call `Meteor.subscribe` within a reactive computation, +for example using +[`Tracker.autorun`](./Tracker#Tracker-autorun), the subscription will automatically be +cancelled when the computation is invalidated or stopped; it is not necessary +to call `stop` on +subscriptions made from inside `autorun`. However, if the next iteration +of your run function subscribes to the same record set (same name and +parameters), Meteor is smart enough to skip a wasteful +unsubscribe/resubscribe. For example: + +```js +Tracker.autorun(() => { + Meteor.subscribe("chat", { room: Session.get("currentRoom") }); + Meteor.subscribe("privateMessages"); +}); +``` + +This subscribes you to the chat messages in the current room and to your private +messages. When you change rooms by calling `Session.set('currentRoom', +'newRoom')`, Meteor will subscribe to the new room's chat messages, +unsubscribe from the original room's chat messages, and continue to +stay subscribed to your private messages. + +## Publication strategies + +> The following features are available from Meteor 2.4 or `ddp-server@2.5.0` + +Once you start scaling your application you might want to have more control on how the data from publications is being handled on the client. +There are three publications strategies: + +#### SERVER_MERGE + +`SERVER_MERGE` is the default strategy. When using this strategy, the server maintains a copy of all data a connection is subscribed to. +This allows us to only send deltas over multiple publications. + +#### NO_MERGE_NO_HISTORY + +The `NO_MERGE_NO_HISTORY` strategy results in the server sending all publication data directly to the client. +It does not remember what it has previously sent to client and will not trigger removed messages when a subscription is stopped. +This should only be chosen for special use cases like send-and-forget queues. + +#### NO_MERGE + +`NO_MERGE` is similar to `NO_MERGE_NO_HISTORY` but the server will remember the IDs it has +sent to the client so it can remove them when a subscription is stopped. +This strategy can be used when a collection is only used in a single publication. + +When `NO_MERGE` is selected the client will be handling gracefully duplicate events without throwing an exception. +Specifically: + +- When we receive an added message for a document that is already present in the client's collection, it will be changed. +- When we receive a change message for a document that is not in the client's collection, it will be added. +- When we receive a removed message for a document that is not in the client's collection, nothing will happen. + +You can import the publication strategies from `DDPServer`. + +```js +import { DDPServer } from "meteor/ddp-server"; + +const { SERVER_MERGE, NO_MERGE_NO_HISTORY, NO_MERGE } = + DDPServer.publicationStrategies; +``` + +You can use the following methods to set or get the publication strategy for publications: + + + +For the `foo` collection, you can set the `NO_MERGE` strategy as shown: + +```js +import { DDPServer } from "meteor/ddp-server"; +Meteor.server.setPublicationStrategy( + "foo", + DDPServer.publicationStrategies.NO_MERGE +); +``` + + + +### Server connections {#connections} + +Functions to manage and inspect the network connection between the Meteor client and server. + + + +```js +import { Meteor } from "meteor/meteor"; +const status = Meteor.status(); + +console.log(status); +// ^^^^ +// { +// connected: Boolean, +// status: String, +// retryCount: Number, +// retryTime: Number, +// reason: String, +// } +``` + +Status object has the following fields: + +- `connected` - _*Boolean*_ : True if currently connected to the server. If false, changes and + method invocations will be queued up until the connection is reestablished. +- `status` - _*String*_: Describes the current reconnection status. The possible + values are `connected` (the connection is up and + running), `connecting` (disconnected and trying to open a + new connection), `failed` (permanently failed to connect; e.g., the client + and server support different versions of DDP), `waiting` (failed + to connect and waiting to try to reconnect) and `offline` (user has disconnected the connection). +- `retryCount` - _*Number*_: The number of times the client has tried to reconnect since the + connection was lost. 0 when connected. +- `retryTime` - _*Number or undefined*_: The estimated time of the next reconnection attempt. To turn this + into an interval until the next reconnection, This key will be set only when `status` is `waiting`. + You canuse this snippet: + ```js + retryTime - new Date().getTime(); + ``` +- `reason` - _*String or undefined*_: If `status` is `failed`, a description of why the connection failed. + + + + + +Call this method to disconnect from the server and stop all +live data updates. While the client is disconnected it will not receive +updates to collections, method calls will be queued until the +connection is reestablished, and hot code push will be disabled. + +Call [Meteor.reconnect](#Meteor-reconnect) to reestablish the connection +and resume data transfer. + +This can be used to save battery on mobile devices when real time +updates are not required. + + + +```js +import { Meteor } from "meteor/meteor"; + +const handle = Meteor.onConnection((connection) => { + console.log(connection); + // ^^^^^^^^^^^ + // { + // id: String, + // close: Function, + // onClose: Function, + // clientAddress: String, + // httpHeaders: Object, + // } +}); + +handle.stop(); // Unregister the callback +``` + +`onConnection` returns an object with a single method `stop`. Calling +`stop` unregisters the callback, so that this callback will no longer +be called on new connections. + +The callback is called with a single argument, the server-side +`connection` representing the connection from the client. This object +contains the following fields: + +- `id` - _*String*_: A globally unique id for this connection. +- `close` - _*Function*_: Close this DDP connection. The client is free to reconnect, but will + receive a different connection with a new `id` if it does. +- `onClose` - _*Function*_: Register a callback to be called when the connection is closed. + If the connection is already closed, the callback will be called immediately. +- `clientAddress` - _*String*_: The IP address of the client in dotted form (such as `127.0.0.1`). If you're running your Meteor server behind a proxy (so that clients + are connecting to the proxy instead of to your server directly), + you'll need to set the `HTTP_FORWARDED_COUNT` environment variable + for the correct IP address to be reported by `clientAddress`. + + Set `HTTP_FORWARDED_COUNT` to an integer representing the number of + proxies in front of your server. For example, you'd set it to `1` + when your server was behind one proxy. + +- `httpHeaders` - _*Object*_: When the connection came in over an HTTP transport (such as with + Meteor's default SockJS implementation), this field contains + whitelisted HTTP headers. + + Cookies are deliberately excluded from the headers as they are a + security risk for this transport. For details and alternatives, see + the [SockJS documentation](https://github.com/sockjs/sockjs-node#authorisation). + +> Currently when a client reconnects to the server (such as after +> temporarily losing its Internet connection), it will get a new +> connection each time. The `onConnection` callbacks will be called +> again, and the new connection will have a new connection `id`. + +> In the future, when client reconnection is fully implemented, +> reconnecting from the client will reconnect to the same connection on +> the server: the `onConnection` callback won't be called for that +> connection again, and the connection will still have the same +> connection `id`. + + + +```js +import { DDP } from "meteor/ddp-client"; +import { Mongo } from "meteor/mongo"; +import { Meteor } from "meteor/meteor"; +const options = {...}; + +const otherServer = DDP.connect("http://example.com", options); + +otherServer.call("foo.from.other.server", 1, 2, function (err, result) { + // ... +}); + +Metepr.call("foo.from.this.server", 1, 2, function (err, result) { + // ... +}); +const remoteColl = new Mongo.Collection("collectionName", { connection: otherServer }); +remoteColl.find(...); + + +``` + +To call methods on another Meteor application or subscribe to its data +sets, call `DDP.connect` with the URL of the application. +`DDP.connect` returns an object which provides: + +- `subscribe` - + Subscribe to a record set. See + [Meteor.subscribe](#Meteor-subscribe). +- `call` - + Invoke a method. See [Meteor.call](#Meteor-call). +- `apply` - + Invoke a method with an argument array. See + [Meteor.apply](#Meteor-apply). +- `methods` - + Define client-only stubs for methods defined on the remote server. See + [Meteor.methods](#Meteor-methods). +- `status` - + Get the current connection status. See + [Meteor.status](#Meteor-status). +- `reconnect` - + See [Meteor.reconnect](#Meteor-reconnect). +- `disconnect` - + See [Meteor.disconnect](#Meteor-disconnect). + +By default, clients open a connection to the server from which they're loaded. +When you call `Meteor.subscribe`, `Meteor.status`, `Meteor.call`, and +`Meteor.apply`, you are using a connection back to that default +server. + + + +## Timers { #timers } + +Meteor uses global environment variables +to keep track of things like the current request's user. To make sure +these variables have the right values, you need to use +`Meteor.setTimeout` instead of `setTimeout` and `Meteor.setInterval` +instead of `setInterval`. + +These functions work just like their native JavaScript equivalents. +If you call the native function, you'll get an error stating that Meteor +code must always run within a Fiber, and advising to use +`Meteor.bindEnvironment`. + + + +Returns a handle that can be used by `Meteor.clearTimeout`. + + + +Returns a handle that can be used by `Meteor.clearInterval`. + + + + +## Enviroment variables {#envs} + +teor runs most app code within Fibers, which allows keeping track of the context a function is running in. `Meteor.EnvironmentVariable` works with `Meteor.bindEnvironment`, promises, and many other Meteor API's to preserve the context in async code. Some examples of how it is used in Meteor are to store the current user in methods, and record which arguments have been checked when using `audit-argument-checks`. + +```js +import { Meteor } from "meteor/meteor"; +const currentRequest = new Meteor.EnvironmentVariable(); + +function log(message) { + const requestId = currentRequest.get() || "None"; + console.log(`[${requestId}]`, message); +} + +currentRequest.withValue("12345", () => { + log("Handling request"); // Logs: [12345] Handling request +}); +``` + + + + + + + diff --git a/v3-docs/docs/api/package.md b/v3-docs/docs/api/package.md new file mode 100644 index 0000000000..387906174d --- /dev/null +++ b/v3-docs/docs/api/package.md @@ -0,0 +1,482 @@ +# Package.js + +A package is a directory containing a package.js file, which +contains roughly three major sections: a basic description, a package +definition, and a test definition. By default, the directory name is the name of +the package. + +The `package.js` file below is an example of how to use the packaging API. The +rest of this section will explain the specific API commands in greater detail. + +```js +// Information about this package: +Package.describe({ + // Short two-sentence summary + summary: 'What this does', + // Version number + version: '1.0.0', + // Optional, default is package directory name + name: 'username:package-name', + // Optional GitHub URL to your source repository + git: 'https://github.com/something/something.git' +}); + +// This defines your actual package: +Package.onUse((api) => { + // If no version is specified for an `api.use` dependency, use the one defined + // in Meteor 1.12.1. + api.versionsFrom('1.12.1'); + // Use the `underscore` package, but only on the server. Version not + // specified, so it will be as of Meteor 1.12.1. + api.use('underscore', 'server'); + // Use `ostrio:flow-router-extra`, version 3.9.0 or newer. + api.use('ostrio:flow-router-extra@3.9.0'); + // Give users of this package access to active-route's JavaScript helpers. + api.imply('zimme:active-route@2.3.2') + // Export the object `Email` to packages or apps that use this package. + api.export('Email', 'server'); + // Specify the source code for the package. + api.addFiles('email.js', 'server'); + // When using `ecmascript` or `modules` packages, you can use this instead of + // `api.export` and `api.addFiles`. + api.mainModule('email.js', 'server'); +}); + +// This defines the tests for the package: +Package.onTest((api) => { + // Sets up a dependency on this package. + api.use('username:package-name'); + // Use the Mocha test framework. + api.use('practicalmeteor:mocha@2.4.5_6'); + // Specify the source code for the package tests. + api.addFiles('email_tests.js', 'server'); +}); + +// This lets you use npm packages in your package: +Npm.depends({ + simplesmtp: '0.3.10', + 'stream-buffers': '0.2.5' +}); +``` + +`api.mainModule` is documented in the [modules](../packages/modules.md#modular-application-structure) section. + +Build plugins are created with +[`Package.registerBuildPlugin`](#PackageNamespace-registerBuildPlugin). See the +coffeescript package for an example. Build plugins are fully-fledged Meteor +programs in their own right and have their own namespace, package dependencies, +source files and npm requirements. + +> You can use local packages to define custom build plugins +for your app, with one caveat. In published packages, build plugins are already +bundled with their transitive dependencies. So if you want a dependency of a +build plugin to be satisfied by a local package, you must use a local copy of +the package that defines the plugin (even if you make no changes to that +package) so that Meteor will pick up the local dependency. + +> In a lifecycle of a package there might come time to end the development for various reasons, or +it gets superseded. In either case Meteor allows you to easily notify the users of the package by +setting the deprecated flag to true: `deprecated: true` in the package description. In addition, you +replace it with a string that tells the users where to find replacement or what to do. + +Provide basic package information with `Package.describe(options)`. To publish a +package, you must define `summary` and `version`. + + + +Define dependencies and expose package methods with the +`Package.onUse` handler. This section lets you define what packages your package +depends on, what packages are implied by your package, and what object your +package is exported to. + + + + + +> Choose Meteor versions carefully. First determine the minimum version of Meteor you need for the API you use in your package. + This should be based on specific needs of your package like needed the *Async calls, which would require minimum version to be + at least 2.8. Another example are where packages had a major version bump, for example this has happened with the accounts packages + in Meteor 2.3. If you want to be backward and forward compatible it is good to include Meteor version before 2.3 and then 2.3.6 in the array. + A general recommendation for most compatibility for accounts packages (unless you need API that was affected in Meteor 2.3) is to have the following + array in `versionsFrom`: `['1.12.1', '2.3.6', '2.8.1']`, this gives us the widest range. For general packages you can leave out version `2.3.6`. + If you want the widest compatibility range it is recommended that the lowest be `1.12.1` and that you also include another + version near the current version of Meteor. + + + + + + + +Set up your tests with the `Package.onTest` handler, which has an interface +that's parallel to that of the `onUse` handler. The tests will need to depend on +the package that you have just created. For example, if your package is the +`email` package, you have to call `api.use('email')` in order to test the +package. + +If you used `meteor create` to set up your package, Meteor will create the +required scaffolding in `package.js`, and you'll only need to add unit test code +in the `_test.js` file that was created. + + + +Meteor packages can include NPM packages and Cordova plugins by using +`Npm.depends` and `Cordova.depends` in the `package.js` file. + + + + + + + +## Options + +In some cases we need to offer options in packages where these options are not going to change in runtime. + +We prefer to have these options defined in a configuration file instead of using JS code to call specific functions to define options in runtime. + +For example, in `quave:collections` package you can force collections to be available only in the server like this: + +```json + "packages": { + "quave:collections": { + "isServerOnly": true + } + } +``` + +We encourage every package author to follow this standard to offer options: + +1. Use the official Meteor `settings` file +2. Inside the `settings` file read from a `Meteor`.`packages`.``.`` + > If it needs to be available in the client follow the same structure inside the `public` key. + +You can use [quave:settings](https://github.com/quavedev/settings) package to read options in the format above already merging the private and public options. + +This way we avoid having to call a specific code before another specific code in a package as the setting is stored in the settings, and the package can load it when necessary instead of relying on a specific order of calls from the developer in the app code. + +> We've started to adopt this standard also in core packages on Meteor 1.10.2. + + + +## Build Plugins API {#build-plugin-api} + +Meteor packages can provide build plugins - programs that integrate with the +build tool Isobuild used to compile and bundle your application. + +Starting with Meteor 1.2, the API used to plug into the build process is called +"Build Plugins". There are 3 phases when a package's plugin can run: linting, +compilation and minification. Here is an overview of operations Isobuild +performs on the application and packages source: + +1. Gather source files from the app folder or read `package.js` file for a + package. +2. Lint all source files and print the linting warnings. +3. Compile the source files like CoffeeScript, ES2015, Less, or Templates to plain + JavaScript and CSS. +4. Link the JavaScript files: wrap them into closures and provide necessary + package imports. +5. Minify JavaScript and CSS files. Can also include concatenation of all files. + +Build plugins fill the phases 2, 3 and 5. + +Usually build plugins implement a class that is given a list of files to +process. Commonly, such files have the following methods: + + - `getContentsAsBuffer` - Returns the full contents of the file as a buffer. + - `getContentsAsString` - Returns the full contents of the file as a string. + - `getPackageName` - Returns the name of the package or `null` if the file is not in a package. + - `getPathInPackage` - Returns the relative path of file to the package or app root directory. The returned path always uses forward slashes. + - `getSourceHash` - Returns a hash string for the file that can be used to implement caching. + - `getArch` - Returns the architecture that is targeted while processing this file. + - `getBasename` - Returns the filename of the file. + - `getDirname` - Returns the directory path relative to the package or app root. The returned path always uses forward slashes. + - `error` - Call this method to raise a compilation or linting error for the file. + + +## Linters {#build-plugin-linters} + +Linters are programs that check the code for undeclared variables or find code +that doesn't correspond to certain style guidelines. Some of the popular +examples of linters are [JSHint](http://jshint.com/about/) and +[ESLint](http://eslint.org/). Some of the non-JavaScript linter examples include +[CoffeeLint](https://github.com/clutchski/coffeelint) for CoffeeScript and +[CSSLint](http://csslint.net/) for CSS. + +To register a linter build plugin in your package, you need to do a couple of +things in your `package.js`: +- depend on the `isobuild:linter-plugin@1.0.0` package +- register a build plugin: `Package.registerBuildPlugin({ name, sources, ... });` + (see [docs](#PackageNamespace-registerBuildPlugin)) + +In your build plugin sources, register a Linter Plugin: provide details such as +a name, list of extensions and filenames the plugin will handle and a factory +function that returns an instance of a linter class. Example: + +```js +Plugin.registerLinter({ + extensions: ['js'], + filenames: ['.linterrc'] +}, () => new MyLinter); +``` + +In this example, we register a linter that runs on all `js` files and also reads +a file named `.linterrc` to get a configuration. + +The `MyLinter` class should now implement the `processFilesForPackage` +method. The method should accept two arguments: a list of files and an options +object. + +```js +class MyLinter { + processFilesForPackage(files, options) { + files.forEach((file) => { + // Lint the file. + const lint = lintFile(file.getContentsAsString()); + + if (lint) { + // If there are linting errors, output them. + const { message, line, column } = lint; + file.error({ message, line, column }); + } + }); + } +} +``` + +The globals are passed in the options object so that the linters can omit the +warnings about the package imports that look like global variables. + +Each file in the list is an object that has all the methods provided by all +build plugins, described above. + +See an example of a linting plugin implemented in Core: [jshint](https://github.com/meteor/meteor/tree/devel/packages/jshint). + + +## Compilers {#build-plugin-compilers} + +Compilers are programs that take the source files and output JavaScript or +CSS. They also can output parts of HTML that is added to the `` tag and +static assets. Examples for the compiler plugins are: CoffeeScript, Babel.js, +JSX compilers, Pug templating compiler and others. + +To register a compiler plugin in your package, you need to do the following in +your `package.js` file: +- depend on the `isobuild:compiler-plugin@1.0.0` package +- register a build plugin: `Package.registerBuildPlugin({ name, sources, ... });` + (see [docs](#PackageNamespace-registerBuildPlugin)) + +In your build plugin source, register a Compiler Plugin: similar to other types +of build plugins, provide the details, extensions and filenames and a factory +function that returns an instance of the compiler. Ex.: + +```js +Plugin.registerCompiler({ + extensions: ['pug', 'tpl.pug'], + filenames: [] +}, () => new PugCompiler); +``` + +The compiler class must implement the `processFilesForTarget` method that is +given the source files for a target (server or client part of the package/app). + +```js +class PugCompiler { + processFilesForTarget(files) { + files.forEach((file) => { + // Process and add the output. + const output = compilePug(file.getContentsAsString()); + + file.addJavaScript({ + data: output, + path: `${file.getPathInPackage()}.js` + }); + }); + } +} +``` + +Besides the common methods available on the input files' class, the following +methods are available: + + - `getExtension` - Returns the extension that matched the compiler plugin. The + longest prefix is preferred. + - `getDeclaredExports` - Returns a list of symbols declared as exports in this + target. The result of `api.export('symbol')` calls in target's control file + such as package.js. + - `getDisplayPath` Returns a relative path that can be used to form error + messages or other display properties. Can be used as an input to a source map. + - `addStylesheet` - Web targets only. Add a stylesheet to the document. Not + available for linter build plugins. + - `addJavaScript` - Add JavaScript code. The code added will only see the + namespaces imported by this package as runtime dependencies using + ['api.use'](#PackageAPI-use). If the file being compiled was added with the + bare flag, the resulting JavaScript won't be wrapped in a closure. + - `addAsset` - Add a file to serve as-is to the browser or to include on the + browser, depending on the target. On the web, it will be served at the exact + path requested. For server targets, it can be retrieved using + `Assets.getText` or `Assets.getBinary`. + - `addHtml` - Works in web targets only. Add markup to the `head` or `body` + section of the document. + - `hmrAvailable` - Returns true if the file can be updated with HMR. Among other things, + it checks if HMR supports the current architecture and build mode, and that the unibuild + uses the `hot-module-replacement` package. There are rare situations where `hmrAvailable` + returns true, but when more information is available later in the build process Meteor + decides the file can not be updated with HMR. + - `readAndWatchFileWithHash` - Accepts an absolute path, and returns { contents, hash } + Makes sure Meteor watches the file so any changes to it will trigger a rebuild + +Meteor implements a couple of compilers as Core packages, good examples would be +the +[Blaze templating](https://github.com/meteor/meteor/tree/devel/packages/templating) +package and the +[ecmascript](https://github.com/meteor/meteor/tree/devel/packages/ecmascript) +package (compiles ES2015+ to JavaScript that can run in the browsers). + +## Minifiers {#build-plugin-minifiers} + +Minifiers run last after the sources has been compiled and JavaScript code has +been linked. Minifiers are only ran for the client programs (`web.browser` and +`web.cordova`). + +There are two types of minifiers one can add: a minifier processing JavaScript +(registered extensions: `['js']`) and a minifier processing CSS (extensions: +`['css']`). + +To register a minifier plugin in your package, add the following in your +`package.js` file: +- depend on `isobuild:minifier-plugin@1.0.0` package +- register a build plugin: `Package.registerBuildPlugin({ name, sources, ... });` + (see [docs](#PackageNamespace-registerBuildPlugin)) + +In your build plugin source, register a Minifier Plugin. Similar to Linter and +Compiler plugin, specify the interested extensions (`css` or `js`). The factory +function returns an instance of the minifier class. + +```js +Plugin.registerMinifier({ + extensions: ['js'] +}, () => new UglifyJsMinifier); +``` + +The minifier class must implement the method `processFilesForBundle`. The first +argument is a list of processed files and the options object specifies if the +minifier is ran in production mode or development mode. + +::: info +This method can be asynchronous. If it returns a Promise, the build process will +wait for it to resolve before continuing. +::: + +```js +class UglifyJsMinifier { + processFilesForBundle(files, options) { + const { minifyMode } = options; + + if (minifyMode === 'development') { + // Don't minify in development. + file.forEach((file) => { + file.addJavaScript({ + data: file.getContentsAsBuffer(), + sourceMap: file.getSourceMap(), + path: file.getPathInBundle() + }); + }); + + return; + } + + // Minify in production. + files.forEach((file) => { + file.addJavaScript({ + data: uglifyjs.minify(file.getContentsAsBuffer()), + path: file.getPathInBundle() + }); + }); + } +} +``` + +In this example, we re-add the same files in the development mode to avoid +unnecessary work and then we minify the files in production mode. + +Besides the common input files' methods, these methods are available: +- `getPathInBundle` - returns a path of the processed file in the bundle. +- `getSourcePath` - returns absolute path of the input file if available, or null. +- `getSourceMap` - returns the source-map for the processed file if there is such. +- `addJavaScript` - same as compilers +- `addStylesheet` - same as compilers +- `readAndWatchFileWithHash` - only available for css minifiers. Same as compilers. + +Right now, Meteor Core ships with the `standard-minifiers` package that can be +replaced with a custom one. The +[source](https://github.com/meteor/meteor/tree/devel/packages/standard-minifiers) +of the package is a good example how to build your own minification plugin. + +In development builds, minifiers must meet these requirements to not prevent hot module replacement: + +- Call `addJavasScript` once for each file to add the file's contents +- The contents of the files are not modified + +In the future Meteor will allow minifiers to concatenate or modify files in development without affected hot module replacement. + + +## Caching {#build-plugin-caching} + +Since the API allows build plugins to process multiple files at once, we encourage package authors to implement at least some in-memory caching for their plugins. Using the `getSourceHash` function for linters and compilers will allow quick incremental recompilations if the file is not reprocessed even when the contents didn't change. + +For the fast rebuilds between the Isobuild process runs, plugins can implement on-disk caching. If a plugin implements the `setDiskCacheDirectory` method, it will be called from time to time with a new path on disk where the plugin can write its offline cache. The folder is correctly reset when the plugin is rebuilt or cache should be invalidated for any reason (for example, picked package versions set has changed). + +### Caching Compiler {#build-plugin-caching-compiler} + +There is a core package called `caching-compiler` that implements most of the common logic of keeping both in-memory and on-disk caches. The easiest way to implement caching correctly is to subclass the `CachingCompiler` or `MultiFileCachingCompiler` class from this package in your build plugin. `CachingCompiler` is for compilers that consider each file completely independently; `MultiFileCachingCompiler` is for compilers that allow files to reference each other. To get this class in your plugin namespace, add a dependency to the plugin definition: + +```js +Package.registerBuildPlugin({ + name: 'compileGG', + use: ['caching-compiler@1.0.0'], + sources: ['plugin/compile-gg.js'] +}); +``` + +## Accessing File System {#build-plugin-file-system} + +Since the build plugins run as part of the Meteor tool, they follow the same file-system access convention - all file system paths always look like a Unix path: using forward slashes and having a root at '/', even on Windows. For example: paths `/usr/bin/program` and `/C/Program Files/Program/program.exe` are valid paths, and `C:\Program Files\Program\program.exe` is not. + +So whenever you get a path in your build plugin implementation, via `getPathInPackage` or in an argument of the `setDiskCacheDirectory` method, the path will be a Unix path. + +Now, on running on Windows, the usual node modules `fs` and `path` expect to get a DOS path. To assist you to write correct code, the `Plugin` symbol provides its own versions of `fs` and `path` that you can use instead (note that all methods on `fs` are fiberized and sync versions prefer using Fibers rather than freezing the whole event loop). + +Also `Plugin` provides helper functions `convertToStandardPath` and `convertToOSPath` to convert to a Unix path or to the path expected by the node libraries regardless of the path origin. + +Example: + +```js +// On Windows +const fs = Plugin.fs; +const path = Plugin.path; + +const filePath = path.join('/C/Program Files', 'Program/file.txt'); +console.log(filePath); // Prints '/C/Program Files/Program/file.txt' + +fs.writeFileSync(filePath, 'Hello.'); // Writes to 'C:\Program Files\Program\file.txt' + +console.log(Plugin.convertToOsPath(filePath)); // Prints 'C:\Program Files\Program\file.txt' +``` + + +## Isobuild Feature Packages {#isobuild-features} + +Starting with Meteor 1.2, packages can declare that they need a version of the Meteor tool whose Isobuild build system supports a certain feature. For example, packages must write `api.use('isobuild:compiler-plugin@1.0.0')` in order to call `Plugin.registerCompiler`. This means that a package can transition from the old `registerSourceHandler` API to `registerCompiler` and Version Solver will properly prevent the `registerCompiler` version from being chosen by older tools that don't know how to handle it. + +This is the known Isobuild feature "packages" sorted by the first release of Meteor which supports them. + +### Introduced in Meteor 1.2s {#isobuild-features-1.2} + +- `compiler-plugin@1.0.0`: Allows use of `Plugin.registerCompiler`. +- `linter-plugin@1.0.0`: Allows use of `Plugin.registerLinter`. +- `minifier-plugin@1.0.0`: Allows use of `Plugin.registerMinifier`. +- `isopack-2@1.0.0`: This package is published only in `isopack-2` format and won't work in versions +of Meteor that don't support that format. +- `prod-only@1.0.0`: Allows use of the `prodOnly` flag in `Package.describe`. +- `isobuild:cordova@5.4.0`: This package depends on a specific version of Cordova, most likely as a result of the Cordova plugins it depends on. diff --git a/v3-docs/docs/api/packages-listing.md b/v3-docs/docs/api/packages-listing.md new file mode 100644 index 0000000000..416865ca2a --- /dev/null +++ b/v3-docs/docs/api/packages-listing.md @@ -0,0 +1,152 @@ + + +[//]: # (Do not edit this file by hand.) + +[//]: # (This is a generated file.) + +[//]: # (If you want to change something in this file) + +[//]: # (go to meteor/docs/generators/packages-listing) + +# Core Packages + + +### [blaze](https://github.com/meteor/blaze) {#blaze} +### [react-packages](https://github.com/meteor/react-packages) {#react-packages} +### [accounts-2fa](https://github.com/meteor/meteor/tree/devel/packages/accounts-2fa) {#accounts-2fa} +### [accounts-base](https://github.com/meteor/meteor/tree/devel/packages/accounts-base) {#accounts-base} +### [accounts-facebook](https://github.com/meteor/meteor/tree/devel/packages/accounts-facebook) {#accounts-facebook} +### [accounts-github](https://github.com/meteor/meteor/tree/devel/packages/accounts-github) {#accounts-github} +### [accounts-google](https://github.com/meteor/meteor/tree/devel/packages/accounts-google) {#accounts-google} +### [accounts-meetup](https://github.com/meteor/meteor/tree/devel/packages/accounts-meetup) {#accounts-meetup} +### [accounts-meteor-developer](https://github.com/meteor/meteor/tree/devel/packages/accounts-meteor-developer) {#accounts-meteor-developer} +### [accounts-oauth](https://github.com/meteor/meteor/tree/devel/packages/accounts-oauth) {#accounts-oauth} +### [accounts-password](https://github.com/meteor/meteor/tree/devel/packages/accounts-password) {#accounts-password} +### [accounts-passwordless](https://github.com/meteor/meteor/tree/devel/packages/accounts-passwordless) {#accounts-passwordless} +### [accounts-twitter](https://github.com/meteor/meteor/tree/devel/packages/accounts-twitter) {#accounts-twitter} +### [accounts-ui](https://github.com/meteor/meteor/tree/devel/packages/accounts-ui) {#accounts-ui} +### [accounts-ui-unstyled](https://github.com/meteor/meteor/tree/devel/packages/accounts-ui-unstyled) {#accounts-ui-unstyled} +### [accounts-weibo](https://github.com/meteor/meteor/tree/devel/packages/accounts-weibo) {#accounts-weibo} +### [allow-deny](https://github.com/meteor/meteor/tree/devel/packages/allow-deny) {#allow-deny} +### [audit-argument-checks](https://github.com/meteor/meteor/tree/devel/packages/audit-argument-checks) {#audit-argument-checks} +### [autopublish](https://github.com/meteor/meteor/tree/devel/packages/autopublish) {#autopublish} +### [autoupdate](https://github.com/meteor/meteor/tree/devel/packages/autoupdate) {#autoupdate} +### [babel-compiler](https://github.com/meteor/meteor/tree/devel/packages/babel-compiler) {#babel-compiler} +### [babel-runtime](https://github.com/meteor/meteor/tree/devel/packages/babel-runtime) {#babel-runtime} +### [base64](https://github.com/meteor/meteor/tree/devel/packages/base64) {#base64} +### [binary-heap](https://github.com/meteor/meteor/tree/devel/packages/binary-heap) {#binary-heap} +### [boilerplate-generator](https://github.com/meteor/meteor/tree/devel/packages/boilerplate-generator) {#boilerplate-generator} +### [boilerplate-generator-tests](https://github.com/meteor/meteor/tree/devel/packages/boilerplate-generator-tests) {#boilerplate-generator-tests} +### [browser-policy](https://github.com/meteor/meteor/tree/devel/packages/browser-policy) {#browser-policy} +### [browser-policy-common](https://github.com/meteor/meteor/tree/devel/packages/browser-policy-common) {#browser-policy-common} +### [browser-policy-content](https://github.com/meteor/meteor/tree/devel/packages/browser-policy-content) {#browser-policy-content} +### [browser-policy-framing](https://github.com/meteor/meteor/tree/devel/packages/browser-policy-framing) {#browser-policy-framing} +### [caching-compiler](https://github.com/meteor/meteor/tree/devel/packages/caching-compiler) {#caching-compiler} +### [callback-hook](https://github.com/meteor/meteor/tree/devel/packages/callback-hook) {#callback-hook} +### [check](https://github.com/meteor/meteor/tree/devel/packages/check) {#check} +### [constraint-solver](https://github.com/meteor/meteor/tree/devel/packages/constraint-solver) {#constraint-solver} +### [core-runtime](https://github.com/meteor/meteor/tree/devel/packages/core-runtime) {#core-runtime} +### [crosswalk](https://github.com/meteor/meteor/tree/devel/packages/crosswalk) {#crosswalk} +### [ddp](https://github.com/meteor/meteor/tree/devel/packages/ddp) {#ddp} +### [ddp-client](https://github.com/meteor/meteor/tree/devel/packages/ddp-client) {#ddp-client} +### [ddp-common](https://github.com/meteor/meteor/tree/devel/packages/ddp-common) {#ddp-common} +### [ddp-rate-limiter](https://github.com/meteor/meteor/tree/devel/packages/ddp-rate-limiter) {#ddp-rate-limiter} +### [ddp-server](https://github.com/meteor/meteor/tree/devel/packages/ddp-server) {#ddp-server} +### [deprecated](https://github.com/meteor/meteor/tree/devel/packages/deprecated) {#deprecated} +### [dev-error-overlay](https://github.com/meteor/meteor/tree/devel/packages/dev-error-overlay) {#dev-error-overlay} +### [diff-sequence](https://github.com/meteor/meteor/tree/devel/packages/diff-sequence) {#diff-sequence} +### [disable-oplog](https://github.com/meteor/meteor/tree/devel/packages/disable-oplog) {#disable-oplog} +### [dynamic-import](https://github.com/meteor/meteor/tree/devel/packages/dynamic-import) {#dynamic-import} +### [ecmascript](https://github.com/meteor/meteor/tree/devel/packages/ecmascript) {#ecmascript} +### [ecmascript-runtime](https://github.com/meteor/meteor/tree/devel/packages/ecmascript-runtime) {#ecmascript-runtime} +### [ecmascript-runtime-client](https://github.com/meteor/meteor/tree/devel/packages/ecmascript-runtime-client) {#ecmascript-runtime-client} +### [ecmascript-runtime-server](https://github.com/meteor/meteor/tree/devel/packages/ecmascript-runtime-server) {#ecmascript-runtime-server} +### [ejson](https://github.com/meteor/meteor/tree/devel/packages/ejson) {#ejson} +### [email](https://github.com/meteor/meteor/tree/devel/packages/email) {#email} +### [es5-shim](https://github.com/meteor/meteor/tree/devel/packages/es5-shim) {#es5-shim} +### [facebook-config-ui](https://github.com/meteor/meteor/tree/devel/packages/facebook-config-ui) {#facebook-config-ui} +### [facebook-oauth](https://github.com/meteor/meteor/tree/devel/packages/facebook-oauth) {#facebook-oauth} +### [facts-base](https://github.com/meteor/meteor/tree/devel/packages/facts-base) {#facts-base} +### [facts-ui](https://github.com/meteor/meteor/tree/devel/packages/facts-ui) {#facts-ui} +### [fetch](https://github.com/meteor/meteor/tree/devel/packages/fetch) {#fetch} +### [force-ssl](https://github.com/meteor/meteor/tree/devel/packages/force-ssl) {#force-ssl} +### [force-ssl-common](https://github.com/meteor/meteor/tree/devel/packages/force-ssl-common) {#force-ssl-common} +### [geojson-utils](https://github.com/meteor/meteor/tree/devel/packages/geojson-utils) {#geojson-utils} +### [github-config-ui](https://github.com/meteor/meteor/tree/devel/packages/github-config-ui) {#github-config-ui} +### [github-oauth](https://github.com/meteor/meteor/tree/devel/packages/github-oauth) {#github-oauth} +### [google-config-ui](https://github.com/meteor/meteor/tree/devel/packages/google-config-ui) {#google-config-ui} +### [google-oauth](https://github.com/meteor/meteor/tree/devel/packages/google-oauth) {#google-oauth} +### [hot-code-push](https://github.com/meteor/meteor/tree/devel/packages/hot-code-push) {#hot-code-push} +### [hot-module-replacement](https://github.com/meteor/meteor/tree/devel/packages/hot-module-replacement) {#hot-module-replacement} +### [id-map](https://github.com/meteor/meteor/tree/devel/packages/id-map) {#id-map} +### [insecure](https://github.com/meteor/meteor/tree/devel/packages/insecure) {#insecure} +### [inter-process-messaging](https://github.com/meteor/meteor/tree/devel/packages/inter-process-messaging) {#inter-process-messaging} +### [launch-screen](https://github.com/meteor/meteor/tree/devel/packages/launch-screen) {#launch-screen} +### [localstorage](https://github.com/meteor/meteor/tree/devel/packages/localstorage) {#localstorage} +### [logging](https://github.com/meteor/meteor/tree/devel/packages/logging) {#logging} +### [logic-solver](https://github.com/meteor/meteor/tree/devel/packages/logic-solver) {#logic-solver} +### [meetup-config-ui](https://github.com/meteor/meteor/tree/devel/packages/meetup-config-ui) {#meetup-config-ui} +### [meetup-oauth](https://github.com/meteor/meteor/tree/devel/packages/meetup-oauth) {#meetup-oauth} +### [meteor](https://github.com/meteor/meteor/tree/devel/packages/meteor) {#meteor} +### [meteor-base](https://github.com/meteor/meteor/tree/devel/packages/meteor-base) {#meteor-base} +### [meteor-developer-config-ui](https://github.com/meteor/meteor/tree/devel/packages/meteor-developer-config-ui) {#meteor-developer-config-ui} +### [meteor-developer-oauth](https://github.com/meteor/meteor/tree/devel/packages/meteor-developer-oauth) {#meteor-developer-oauth} +### [meteor-tool](https://github.com/meteor/meteor/tree/devel/packages/meteor-tool) {#meteor-tool} +### [minifier-css](https://github.com/meteor/meteor/tree/devel/packages/minifier-css) {#minifier-css} +### [minifier-js](https://github.com/meteor/meteor/tree/devel/packages/minifier-js) {#minifier-js} +### [minimongo](https://github.com/meteor/meteor/tree/devel/packages/minimongo) {#minimongo} +### [mobile-experience](https://github.com/meteor/meteor/tree/devel/packages/mobile-experience) {#mobile-experience} +### [mobile-status-bar](https://github.com/meteor/meteor/tree/devel/packages/mobile-status-bar) {#mobile-status-bar} +### [modern-browsers](https://github.com/meteor/meteor/tree/devel/packages/modern-browsers) {#modern-browsers} +### [modules](https://github.com/meteor/meteor/tree/devel/packages/modules) {#modules} +### [modules-runtime](https://github.com/meteor/meteor/tree/devel/packages/modules-runtime) {#modules-runtime} +### [modules-runtime-hot](https://github.com/meteor/meteor/tree/devel/packages/modules-runtime-hot) {#modules-runtime-hot} +### [mongo](https://github.com/meteor/meteor/tree/devel/packages/mongo) {#mongo} +### [mongo-dev-server](https://github.com/meteor/meteor/tree/devel/packages/mongo-dev-server) {#mongo-dev-server} +### [mongo-id](https://github.com/meteor/meteor/tree/devel/packages/mongo-id) {#mongo-id} +### [mongo-livedata](https://github.com/meteor/meteor/tree/devel/packages/mongo-livedata) {#mongo-livedata} +### [npm-mongo](https://github.com/meteor/meteor/tree/devel/packages/npm-mongo) {#npm-mongo} +### [oauth](https://github.com/meteor/meteor/tree/devel/packages/oauth) {#oauth} +### [oauth-encryption](https://github.com/meteor/meteor/tree/devel/packages/oauth-encryption) {#oauth-encryption} +### [oauth1](https://github.com/meteor/meteor/tree/devel/packages/oauth1) {#oauth1} +### [oauth2](https://github.com/meteor/meteor/tree/devel/packages/oauth2) {#oauth2} +### [ordered-dict](https://github.com/meteor/meteor/tree/devel/packages/ordered-dict) {#ordered-dict} +### [package-stats-opt-out](https://github.com/meteor/meteor/tree/devel/packages/package-stats-opt-out) {#package-stats-opt-out} +### [package-version-parser](https://github.com/meteor/meteor/tree/devel/packages/package-version-parser) {#package-version-parser} +### [promise](https://github.com/meteor/meteor/tree/devel/packages/promise) {#promise} +### [random](https://github.com/meteor/meteor/tree/devel/packages/random) {#random} +### [rate-limit](https://github.com/meteor/meteor/tree/devel/packages/rate-limit) {#rate-limit} +### [react-fast-refresh](https://github.com/meteor/meteor/tree/devel/packages/react-fast-refresh) {#react-fast-refresh} +### [reactive-dict](https://github.com/meteor/meteor/tree/devel/packages/reactive-dict) {#reactive-dict} +### [reactive-var](https://github.com/meteor/meteor/tree/devel/packages/reactive-var) {#reactive-var} +### [reload](https://github.com/meteor/meteor/tree/devel/packages/reload) {#reload} +### [reload-safetybelt](https://github.com/meteor/meteor/tree/devel/packages/reload-safetybelt) {#reload-safetybelt} +### [retry](https://github.com/meteor/meteor/tree/devel/packages/retry) {#retry} +### [routepolicy](https://github.com/meteor/meteor/tree/devel/packages/routepolicy) {#routepolicy} +### [server-render](https://github.com/meteor/meteor/tree/devel/packages/server-render) {#server-render} +### [service-configuration](https://github.com/meteor/meteor/tree/devel/packages/service-configuration) {#service-configuration} +### [session](https://github.com/meteor/meteor/tree/devel/packages/session) {#session} +### [sha](https://github.com/meteor/meteor/tree/devel/packages/sha) {#sha} +### [shell-server](https://github.com/meteor/meteor/tree/devel/packages/shell-server) {#shell-server} +### [socket-stream-client](https://github.com/meteor/meteor/tree/devel/packages/socket-stream-client) {#socket-stream-client} +### [standard-minifier-css](https://github.com/meteor/meteor/tree/devel/packages/standard-minifier-css) {#standard-minifier-css} +### [standard-minifier-js](https://github.com/meteor/meteor/tree/devel/packages/standard-minifier-js) {#standard-minifier-js} +### [standard-minifiers](https://github.com/meteor/meteor/tree/devel/packages/standard-minifiers) {#standard-minifiers} +### [static-html](https://github.com/meteor/meteor/tree/devel/packages/static-html) {#static-html} +### [test-helpers](https://github.com/meteor/meteor/tree/devel/packages/test-helpers) {#test-helpers} +### [test-in-browser](https://github.com/meteor/meteor/tree/devel/packages/test-in-browser) {#test-in-browser} +### [test-in-console](https://github.com/meteor/meteor/tree/devel/packages/test-in-console) {#test-in-console} +### [test-server-tests-in-console-once](https://github.com/meteor/meteor/tree/devel/packages/test-server-tests-in-console-once) {#test-server-tests-in-console-once} +### [tinytest](https://github.com/meteor/meteor/tree/devel/packages/tinytest) {#tinytest} +### [tinytest-harness](https://github.com/meteor/meteor/tree/devel/packages/tinytest-harness) {#tinytest-harness} +### [tracker](https://github.com/meteor/meteor/tree/devel/packages/tracker) {#tracker} +### [twitter-config-ui](https://github.com/meteor/meteor/tree/devel/packages/twitter-config-ui) {#twitter-config-ui} +### [twitter-oauth](https://github.com/meteor/meteor/tree/devel/packages/twitter-oauth) {#twitter-oauth} +### [typescript](https://github.com/meteor/meteor/tree/devel/packages/typescript) {#typescript} +### [underscore](https://github.com/meteor/meteor/tree/devel/packages/underscore) {#underscore} +### [underscore-tests](https://github.com/meteor/meteor/tree/devel/packages/underscore-tests) {#underscore-tests} +### [url](https://github.com/meteor/meteor/tree/devel/packages/url) {#url} +### [webapp](https://github.com/meteor/meteor/tree/devel/packages/webapp) {#webapp} +### [webapp-hashing](https://github.com/meteor/meteor/tree/devel/packages/webapp-hashing) {#webapp-hashing} +### [weibo-config-ui](https://github.com/meteor/meteor/tree/devel/packages/weibo-config-ui) {#weibo-config-ui} +### [weibo-oauth](https://github.com/meteor/meteor/tree/devel/packages/weibo-oauth) {#weibo-oauth} \ No newline at end of file diff --git a/v3-docs/docs/api/session.md b/v3-docs/docs/api/session.md new file mode 100644 index 0000000000..8bce790187 --- /dev/null +++ b/v3-docs/docs/api/session.md @@ -0,0 +1,145 @@ +# Session + +Documentation of Meteor's client-side session API. + + +`Session` provides a global object on the client that you can use to +store an arbitrary set of key-value pairs. Use it to store things like +the currently selected item in a list. + +What's special about `Session` is that it's reactive. If +you call [`Session.get`](#Session-get)`('currentList')` +from inside a template, the template will automatically be rerendered +whenever [`Session.set`](#Session-set)`('currentList', x)` is called. + +To add `Session` to your application, run this command in your terminal: + +```bash +meteor add session +``` + + + + +```js +import { Session } from 'meteor/session'; +import { Tracker } from 'meteor/tracker'; +import { Meteor } from 'meteor/meteor'; + +Tracker.autorun(() => { + Meteor.subscribe('chatHistory', { room: Session.get('currentRoomId') }); +}); + +// Causes the function passed to `Tracker.autorun` to be rerun, so that the +// 'chatHistory' subscription is moved to the room 'home'. +Session.set('currentRoomId', 'home'); +``` + + +`Session.set` can also be called with an object of keys and values, which is +equivalent to calling `Session.set` individually on each key/value pair. + +```js +Session.set({ + a: 'foo', + b: 'bar' +}); +``` + + + + +This is useful in initialization code, to avoid re-initializing a session +variable every time a new version of your app is loaded. + + + + +This example in Blaze.js +::: code-group + +```html [main.html] + +``` + +```js [main.js] +Template.main.helpers({ + theEnemy() { + return Session.get('enemy'); + } +}); + +Session.set('enemy', 'Eastasia'); +// Page will say "We've always been at war with Eastasia" + +Session.set('enemy', 'Eurasia'); +// Page will change to say "We've always been at war with Eurasia" +``` +::: + + + + + +If value is a scalar, then these two expressions do the same thing: + +```js +Session.get('key') === value +Session.equals('key', value) +``` + +...but the second one is always better. It triggers fewer invalidations +(template redraws), making your program more efficient. + +This example in Blaze.js: + +::: code-group + +```html [main.html] + + + + +``` + +```js [main.js] + +Template.postsView.helpers({ + posts() { + return Posts.find(); + } +}); + +Template.postItem.helpers({ + postClass() { + return Session.equals('selectedPost', this._id) + ? 'selected' + : ''; + } +}); + +Template.postItem.events({ + 'click'() { + Session.set('selectedPost', this._id); + } +}); +``` + +Using Session.equals here means that when the user clicks +on an item and changes the selection, only the newly selected +and the newly unselected items are re-rendered. + +If Session.get had been used instead of Session.equals, then +when the selection changed, all the items would be re-rendered. + +For object and array session values, you cannot use `Session.equals`; instead, +you need to use the `underscore` package and write +`_.isEqual(Session.get(key), value)`. diff --git a/v3-docs/docs/api/templates.md b/v3-docs/docs/api/templates.md new file mode 100644 index 0000000000..2e0dd7b6e9 --- /dev/null +++ b/v3-docs/docs/api/templates.md @@ -0,0 +1,5 @@ + +# Templates +Documentation of Meteor's client-side session API. + +This documentation has moved to the [Blaze Community Site](http://blazejs.org/api/templates). diff --git a/v3-docs/docs/cli/environment-variables.md b/v3-docs/docs/cli/environment-variables.md new file mode 100644 index 0000000000..1d46eadbc0 --- /dev/null +++ b/v3-docs/docs/cli/environment-variables.md @@ -0,0 +1,121 @@ + +# Environment Variables +List of environment variables that you can use with your Meteor application. + + +## BIND_IP +(_production_) + +Bind the application server to a specific network interface by IP address, for example: `BIND_IP=192.168.0.2`. + +See also: [`PORT`](#port). + +> In development, this can be accomplished with `meteor run --port a.b.c.d:port`. + +## DDP_DEFAULT_CONNECTION_URL +(_develoment, production_) + +There are some situations where it is valuable for the meteor client to use a different DDP server than the `ROOT_URL` server. + +Setting `DDP_DEFAULT_CONNECTION_URL` when running a meteor server (development: `meteor run` or production: `node main.js`) will set the DDP server to the value in `DDP_DEFAULT_CONNECTION_URL`. + +Setting `DDP_DEFAULT_CONNECTION_URL` when building (`meteor build`) will define the DDP server for `cordova` builds. + +## DISABLE_WEBSOCKETS +(_development, production_) + +In the event that your own deployment platform does not support WebSockets, or you are confident that you will not benefit from them, setting this variable with `DISABLE_WEBSOCKETS=1` will explicitly disable WebSockets and forcibly resort to the fallback polling-mechanism, instead of trying to detect this automatically. + +## DISABLE_SOCKJS +(_development, production_) + +Set `DISABLE_SOCKJS=1` if you want to use the native WebSocket implementation instead of SockJS on the client side, for example, if you want to use a custom WebSocket implementation (e.g. [uWebSockets.js](https://github.com/uNetworking/uWebSockets.js/)) on the server side. + +## HTTP_FORWARDED_COUNT +(_production_) + +Set this to however many number of proxies you have running before your Meteor application. For example, if have an NGINX server acting as a proxy before your Meteor application, you would set `HTTP_FORWARDED_COUNT=1`. If you have a load balancer in front of that NGINX server, the count is 2. + +## MAIL_URL +(_development, production_) + +Use this variable to set the SMTP server for sending e-mails. [Postmark](https://www.postmarkapp.com), [Mandrill](https://www.mandrillapp.com), [MailGun](https://www.mailgun.com) and [SendGrid](https://www.sendgrid.com) (among others) are companies who can provide this service. The `MAIL_URL` contains all of the information for connecting to the SMTP server and, like a URL, should look like `smtp://user:pass@yourservice.com:587` or `smtps://user:pass@yourservice.com:465`. + +The `smtp://` form is for mail servers which support encryption via `STARTTLS` or those that do not use encryption at all and is most common for servers on port 587 and _sometimes_ port 25. On the other hand, the `smtps://` form (the `s` stands for "secure") should be used if the server only supports TLS/SSL (and does not support connection upgrade with `STARTTLS`) and is most common for servers on port 465. + +## METEOR_DISABLE_OPTIMISTIC_CACHING +(_production_) + +When running `meteor build` or `meteor deploy` you can set `METEOR_DISABLE_OPTIMISTIC_CACHING=1` to speed up your build time. + +Since optimistic in-memory caching is one of the more memory-intensive parts of the build system, setting the environment variable `METEOR_DISABLE_OPTIMISTIC_CACHING=1` can help improve memory usage during meteor build, which seems to improve the total build times. This configuration is perfectly safe because the whole point of optimistic caching is to keep track of previous results for future rebuilds, but in the case of meteor `build` or `deploy` there's only ever one initial build, so the extra bookkeeping is unnecessary. + +## METEOR_PROFILE +(_development_) + +In development, you may need to diagnose what has made builds start taking a long time. To get the callstack and times during builds, you can run `METEOR_PROFILE=1 meteor`. + +## METEOR_PACKAGE_DIRS +(_development, production_) + +Colon-delimited list of local package directories to look in, outside your normal application structure, for example: `METEOR_PACKAGE_DIRS="/usr/local/my_packages/"`. Note that this used to be `PACKAGE_DIRS` but was changed in Meteor 1.4.2. + +## METEOR_SETTINGS +(_production_) + +When running your bundled application in production mode, pass a string of JSON containing your settings with `METEOR_SETTINGS='{ "server_only_setting": "foo", "public": { "client_and_server_setting": "bar" } }'`. + +> In development, this is accomplished with `meteor --settings [file.json]` in order to provide full-reactivity when changing settings. Those settings are simply passed as a string here. Please see the [Meteor.settings](../api/meteor#Meteor-settings) documentation for further information. + +## METEOR_SQLITE_JOURNAL_MODE +(_development_) + +The Meteor package catalog uses the `WAL` [SQLite Journal Mode](https://www.sqlite.org/pragma.html#pragma_journal_mode) by default. The Journal mode for the package catalog can be modifed by setting `METEOR_SQLITE_JOURNAL_MODE`. + +When running multiple concurrent meteor servers on [Windows Subsystem for Linux (WSL)](https://docs.microsoft.com/en-us/windows/wsl/) some meteor developers have seen issues with the package catalog. Setting the environment variable `METEOR_SQLITE_JOURNAL_MODE=TRUNCATE` can overcome the issue. + +## MONGO_OPLOG_URL +(_development, production_) + +MongoDB server oplog URL. If you're using a replica set (which you should), construct this url like so: `MONGO_OPLOG_URL="mongodb://user:password@myserver.com:10139/local?replicaSet=(your replica set)&authSource=(your auth source)"` + +## MONGO_URL +(_development, production_) + +MongoDB server URL. Give a fully qualified URL (or comma-separated list of URLs) like `MONGO_URL="mongodb://user:password@myserver.com:10139"`. For more information see the [MongoDB docs](https://docs.mongodb.com/manual/reference/connection-string/). + +## PORT +(_production_) + +Which port the app should listen on, for example: `PORT=3030` + +See also: [`BIND_IP`](#bind-ip). + +> In development, this can be accomplished with `meteor run --port `. + +## ROOT_URL +(_development, production_) + +Used to generate URLs to your application by, among others, the accounts package. Provide a full URL to your application like this: `ROOT_URL="https://www.myapp.com"`. + +## TOOL_NODE_FLAGS +(_development, production_) + +Used to pass flags/variables to Node inside Meteor build. For example you can use this to pass a link to icu data: `TOOL_NODE_FLAGS="--icu-data-dir=node_modules/full-icu"` +For full list of available flags see the [Node documentation](https://nodejs.org/dist/latest-v12.x/docs/api/cli.html). + +## UNIX_SOCKET_GROUP +(_production_) + +This overrides the default UNIX group of the socket file configured in `UNIX_SOCKET_PATH`. It can be set to a group name or a numerical gid. + +## UNIX_SOCKET_PATH +(_production_) + +Configure Meteor's HTTP server to listen on a UNIX socket file path (e.g. `UNIX_SOCKET_PATH=/tmp/meteor.sock`) instead of a TCP port. This is useful when running a local reverse proxy server like Nginx to handle client HTTP requests and direct them to your Meteor application. Leveraging UNIX domain sockets for local communication on the same host avoids the Operating System overhead required by TCP based communication and can also improve security. This UNIX socket file is created when Meteor starts and removed when Meteor exits. + +## UNIX_SOCKET_PERMISSIONS +(_production_) + +This overrides the default UNIX file permissions on the UNIX socket file configured in `UNIX_SOCKET_PATH`. For example, `UNIX_SOCKET_PERMISSIONS=660` would set read/write permissions for both the user and group. + diff --git a/v3-docs/docs/cli/index.md b/v3-docs/docs/cli/index.md new file mode 100644 index 0000000000..97af8129a5 --- /dev/null +++ b/v3-docs/docs/cli/index.md @@ -0,0 +1,1014 @@ +# Command Line +Documentation of the various command line options of the Meteor tool. + +--- + +The following are some of the more commonly used commands in the `meteor` +command-line tool. This is just an overview and does not mention every command +or every option to every command; for more details, use the `meteor help` +command. + +## meteor help {meteorhelp} + +Get help on meteor command line usage. Running `meteor help` by +itself will list the common meteor +commands. Running meteor help command will print +detailed help about the command. + + +## meteor run {meteorrun} + +Run a meteor development server in the current project. Searches +upward from the current directory for the root directory of a Meteor +project. Whenever you change any of the application's source files, the +changes are automatically detected and applied to the running +application. + +You can use the application by pointing your web browser at +localhost:3000. No Internet connection is +required. + +This is the default command. Simply running `meteor` is the +same as `meteor run`. + +To pass additional options to Node.js use the `SERVER_NODE_OPTIONS` environment variable. E.g. for Windows PowerShell: +`$env:SERVER_NODE_OPTIONS = '--inspect' | meteor run`. Or for Linux: `SERVER_NODE_OPTIONS=--inspect-brk meteor run`. + +To specify a port to listen on (instead of the default 3000), use `--port [PORT]`. +(The development server also uses port `N+1` for the default MongoDB instance) + +For example: `meteor run --port 4000` +will run the development server on `http://localhost:4000` +and the development MongoDB instance on `mongodb://localhost:4001`. + +Run `meteor help run` to see the full list of options. + +## meteor debug {meteordebug} + +Run the project, but suspend the server process for debugging. + +> **NOTE:** The `meteor debug` command has been superseded by the more flexible +> `--inspect` and `--inspect-brk` command-line flags, which work for any `run`, +> `test`, or `test-packages` command. +> +> The syntax of these flags is the same as the equivalent Node.js +> [flags](https://nodejs.org/en/docs/inspector/#command-line-options), +> with two notable differences: +> +> * The flags affect the server process spawned by the build process, +> rather than affecting the build process itself. +> +> * The `--inspect-brk` flag causes the server process to pause just after +> server code has loaded but before it begins to execute, giving the +> developer a chance to set breakpoints in server code. + +The server process will be suspended just before the first statement of +server code that would normally execute. In order to continue execution of +server code, use either the web-based Node Inspector or the command-line +debugger (further instructions will be printed in the console). + +Breakpoints can be set using the `debugger` keyword, or through the web UI of Node Inspector ("Sources" tab). + +The server process debugger will listen for incoming connections from +debugging clients, such as node-inspector, on port 5858 by default. To +specify a different port use the `--debug-port ` option. + +The same debugging functionality can be achieved by adding the `--debug-port ` +option to other `meteor` tool commands, such as `meteor run` and `meteor test-packages`. + +> **Note:** Due to a [bug in `node-inspector`](https://github.com/node-inspector/node-inspector/issues/903), pushing "Enter" after a command on the Node Inspector Console will not successfully send the command to the server. If you require this functionality, please consider using Safari or `meteor shell` in order to interact with the server console until the `node-inspector` project [fixes the bug](https://github.com/node-inspector/node-inspector/pull/955). Alternatively, there is a hot-patch available [in this comment](https://github.com/meteor/meteor/issues/7991#issuecomment-266709459) on [#7991](https://github.com/meteor/meteor/issues/7991). + + +## meteor create _app-name_ {meteorcreate} + +The command `meteor create app-name` is the default command for creating a new Meteor project. It creates a subdirectory +named `app-name` and copies a template app into it. You can pass an absolute or relative path. If you pass a relative +path, it will be resolved relative to the current working directory. By default, it generates a React project. + +See the flags below to learn how you can generate different types of apps. + + +## --apollo {apollo} + +The command `meteor create --apollo app-name` creates a Meteor app with [React](https://react.dev/), +[Apollo](https://www.apollographql.com/) (GraphQL), and [MongoDB](https://www.mongodb.com/). To create a complete app, +including testing and deployment, follow the [React tutorial](https://react-tutorial.meteor.com/). To learn how to use +Apollo, refer to the [GraphQL section](https://react-tutorial.meteor.com/simple-todos-graphql/). + +Npm packages included: `@apollo/client`, `@apollo/server`, `@babel/runtime`, `body-parser`, `express`, +`graphql` `meteor-node-stubs`, `react`, `react-dom`. + +Meteor packages included: `meteor-base`, `mobile-experience`, `mongo`, `reactive-var`, `standard-minifier-css`, +`standard-minifier-js`, `es5-shim`, `ecmascript`, `typescript`, `shell-server`, `hot-module-replacement`, `static-html`, +`react-meteor-data`, `apollo`, `swydo:graphql`. + +## --bare {bare} + +The command `meteor create --bare app-name` creates an empty Meteor app with [Blaze](https://blazejs.org) and +[MongoDB](https://www.mongodb.com/). To create a complete app, including testing and deployment, follow the +[Blaze tutorial](https://blaze-tutorial.meteor.com/). + +Npm packages included: `@babel/runtime`, `meteor-node-stubs`, `jquery`. + +Meteor packages included: `meteor-base`, `mobile-experience`, `mongo`, `reactive-var`, `tracker`, `standard-minifier-css`, +`standard-minifier-js`, `es5-shim`, `ecmascript`, `typescript`, `shell-server`. + + +## --blaze {blaze-app} + +The command `meteor create --blaze app-name` creates a Meteor app with [Blaze](https://blazejs.org) and +[MongoDB](https://www.mongodb.com/). To create a complete app, including testing and deployment, follow the +[Blaze tutorial](https://blaze-tutorial.meteor.com/). + +Npm packages included: `@babel/runtime`, `meteor-node-stubs`, `jquery`. + +Meteor packages included: `meteor-base`, `mobile-experience`, `mongo`, `blaze-html-templates`, `jquery`, `reactive-var`, +`tracker`, `standard-minifier-css`, `standard-minifier-js`, `es5-shim`, `ecmascript`, `typescript`, `shell-server`, +`hot-module-replacement`, `blaze-hot`. + + +## --chakra-ui {chakra-ui} + +The command `meteor create --chakra-ui app-name` creates a Meteor app with [React](https://react.dev/), +[Chakra-UI](https://chakra-ui.com/), and [MongoDB](https://www.mongodb.com/). To create a complete app, including +testing and deployment, follow the [React tutorial](https://react-tutorial.meteor.com/). To learn how to use Chakra-UI, +refer to the [Simple Tasks](https://github.com/fredmaiaarantes/simpletasks) example. + +Npm packages included: `@babel/runtime`, `meteor-node-stubs`, `react`, `react-dom`, `@chakra-ui/icons`, `@chakra-ui/react`, `@emotion/react` +`@emotion/styled`, `@react-icons/all-files`, `framer-motion`. + +Meteor packages included: `meteor-base`, `mobile-experience`, `mongo`, `reactive-var`, `standard-minifier-css`, +`standard-minifier-js`, `es5-shim`, `ecmascript`, `typescript`, `shell-server`, `hot-module-replacement`, `static-html`, +`react-meteor-data`. + + +## --full {full} + +The command `meteor create --full app-name` creates a Meteor app with [Blaze](https://blazejs.org) and +[MongoDB](https://www.mongodb.com/). It creates a more complete, imports-based project that closely matches the +[file structure](https://guide.meteor.com/structure.html#javascript-structure) recommended by the +[Meteor Guide](https://guide.meteor.com/). To create a complete app, including testing and deployment, follow the +[Blaze tutorial](https://blaze-tutorial.meteor.com/). + +Npm packages included: `@babel/runtime`, `meteor-node-stubs`, `jquery`, `chai`. + +Meteor packages included: `meteor-base`, `mobile-experience`, `mongo`, `blaze-html-templates`, `jquery`, `reactive-var`, +`tracker`, `standard-minifier-css`, `standard-minifier-js`, `es5-shim`, `ecmascript`, `typescript`, `shell-server`, +`ostrio:flow-router-extra`, `less`, `meteortesting:mocha`, `johanbrook:publication-collector`. + + +## --minimal {minimal} + +The command `meteor create --minimal app-name` creates a project with as few Meteor packages as possible. + +Npm packages included: `@babel/runtime`, `meteor-node-stubs`. + +Meteor packages included: `meteor`, `standard-minifier-css`, `standard-minifier-js`, `es5-shim`, `ecmascript`, `typescript`, `shell-server`, +`static-html`, `webapp`, `server-render`, `hot-module-replacement`. + + +## --package {package} + +The command `meteor create --package package-name` creates a new package. If used in an existing app, it will create a +package in the `packages` directory. Check the [Meteor Guide](https://guide.meteor.com/writing-atmosphere-packages.html) +for more information on how to get started writing packages. + + +## --prototype {prototype} + +The command `meteor create --prototype app-name` creates a project with the prototype purpose packages (`autopublish` +and `insecure`). If you use them, you can change your collections quickly and create prototype apps very quickly. +However, these packages are not supposed to be used in production. + +For more information about security, you can read our [security checklist](https://guide.meteor.com/security.html#checklist). +It can be used with other flags that create apps, such as `--react`, `blaze`, or `--typescript`. + + +## --react {react} + +The command `meteor create --react app-name` creates a Meteor app with [React](https://react.dev/) and +[MongoDB](https://www.mongodb.com/). It functions in the same way as if you don't use any flags. To create a complete +app, including testing and deployment, follow the [React tutorial](https://react-tutorial.meteor.com/). + +Npm packages included: `@babel/runtime`, `meteor-node-stubs`, `react`, `react-dom`. + +Meteor packages included: `meteor-base`, `mobile-experience`, `mongo`, `reactive-var`, `standard-minifier-css`, +`standard-minifier-js`, `es5-shim`, `ecmascript`, `typescript`, `shell-server`, `hot-module-replacement`, `static-html`, +`react-meteor-data`. + + + +## --release {release} + +The command `meteor create app-name --release {meteor-version}` creates a Meteor app with the release specified in the +command. For instance, you can create a Meteor app with the `2.8` release using `meteor create app-name --release 2.8`. +By default, it generates a React app, but you can use it with other flags that create apps such as `--blaze`, +`--svelte`, `--vue`, or `--typescript`. + + +## --solid {solid} + +The command `meteor create --solid app-name` creates a Meteor app with [Solid](https://www.solidjs.com/), +[Vite](https://vitejs.dev/), and [MongoDB](https://www.mongodb.com/). You can see an example on the +[meteor-solid-app](https://github.com/fredmaiaarantes/meteor-solid-app/releases/tag/milestone-2.0) repository. + +Npm packages included: `@babel/runtime`, `meteor-node-stubs`, `solid-js`, `babel-preset-solid`, `vite`, `vite-plugin-solid`, `vite-plugin-solid-svg`. + +Meteor packages included: `meteor-base`, `mobile-experience`, `mongo`, `reactive-var`, `standard-minifier-css`, +`standard-minifier-js`, `es5-shim`, `ecmascript`, `typescript`, `shell-server`, `hot-module-replacement`, `static-html`, +`vite:bundler`. + + +## --svelte {svelte} + +The command `meteor create --svelte app-name` creates a Meteor app with [Svelte](https://svelte.dev/) and +[MongoDB](https://www.mongodb.com/). To create a complete app, including testing and deployment, follow the +[Svelte tutorial](https://svelte-tutorial.meteor.com/). + +Npm packages included: `@babel/runtime`, `meteor-node-stubs`, `svelte`, `svelte-preprocess`. + +Meteor packages included: `meteor-base`, `mobile-experience`, `mongo`, `standard-minifier-css`, +`standard-minifier-js`, `es5-shim`, `ecmascript`, `typescript`, `shell-server`, `hot-module-replacement`, `static-html`, +`zodern:melte`, `zodern:types`. + +You can also use [Svelte](https://svelte.dev/) with [Vite](https://vitejs.dev/) by using the [jorgenvatle:meteor-vite](https://github.com/JorgenVatle/meteor-vite) package. +You can see an example on the [meteor-vite](https://github.com/JorgenVatle/meteor-vite/tree/release/examples/svelte) repository. + + +## --tailwind {tailwind} + +The command `meteor create --tailwind app-name` creates a Meteor app with [React](https://react.dev/), +[Tailwind CSS](https://tailwindcss.com), and [MongoDB](https://www.mongodb.com/). + +Npm packages included: `@babel/runtime`, `meteor-node-stubs`, `react`, `react-dom`, `autoprefixer`, `postcss`, `postcss-load-config`, `tailwindcss`. + +Meteor packages included: `meteor-base`, `mobile-experience`, `mongo`, `reactive-var`, `standard-minifier-css`, +`standard-minifier-js`, `es5-shim`, `ecmascript`, `typescript`, `shell-server`, `hot-module-replacement`, `static-html`, +`react-meteor-data`. + + +## --typescript {typescript} + +The command `meteor create --typescript app-name` creates a Meteor app with [React](https://react.dev/), +[TypeScript](https://www.typescriptlang.org/), and [MongoDB](https://www.mongodb.com/). Check the +[Meteor Guide](https://guide.meteor.com/build-tool.html#typescript) for more information about TypeScript and how to +use it with other UI frameworks. + +Npm packages included: `@babel/runtime`, `meteor-node-stubs`, `react`, `react-dom`, `@types/mocha`, `@types/node`, `@types/react`, `@types/react-dom`, `typescript`. + +Meteor packages included: `meteor-base`, `mobile-experience`, `mongo`, `reactive-var`, `standard-minifier-css`, +`standard-minifier-js`, `es5-shim`, `ecmascript`, `typescript`, `shell-server`, `hot-module-replacement`, `static-html`, +`react-meteor-data`, `zodern:types`. + + +## --vue {vue} + +The command `meteor create --vue app-name` creates a Meteor app with [Vue 3](https://vuejs.org/), +[Tailwind CSS](https://tailwindcss.com), [Vite](https://vitejs.dev/), and [MongoDB](https://www.mongodb.com/). To +create a complete app, including testing and deployment, follow the [Vue 3 tutorial](https://vue3-tutorial.meteor.com/). + +Npm packages included: `@babel/runtime`, `meteor-node-stubs`, `vue`, `vue-meteor-tracker`, `vue-router`, `@types/meteor`, `@vitejs/plugin-vue`, `autoprefixer`, `postcss`, `tailwindcss`, `vite`. + +Meteor packages included: `meteor-base`, `mobile-experience`, `mongo`, `reactive-var`, `standard-minifier-css`, +`standard-minifier-js`, `es5-shim`, `ecmascript`, `typescript`, `shell-server`, `hot-module-replacement`, `static-html`, +`vite:bundler`. + +You can also use Vue 3 with Vite by using the [jorgenvatle:meteor-vite](https://github.com/JorgenVatle/meteor-vite) +package. You can see an example on the [meteor-vite](https://github.com/JorgenVatle/meteor-vite/tree/release/examples/vue) +repository. + + +## --vue-2 {vue-2} + +The command `meteor create --vue-2 app-name` creates a Meteor app with [Vue 2](https://v2.vuejs.org/) and +[MongoDB](https://www.mongodb.com/). To create a complete app, including testing and deployment, follow the +[Vue 2 tutorial](https://vue-tutorial.meteor.com/). + +Npm packages included: `@babel/runtime`, `meteor-node-stubs`, `vue`, `vue-meteor-tracker`. + +Meteor packages included: `meteor-base`, `mobile-experience`, `mongo`, `reactive-var`, `standard-minifier-css`, +`standard-minifier-js`, `es5-shim`, `ecmascript`, `typescript`, `shell-server`, `tracker`, `static-html`, `akryum:vue-component`, +`meteortesting:mocha`, `johanbrook:publication-collector`. + + +## meteor generate {meteorgenerate} + +``meteor generate`` is a command for generating scaffolds for your current project. When ran without arguments, it will ask +you what is the name of the model you want to generate, if you do want methods for your api and publications. It can be +used as a command line only operation as well. + +> _Important to note:_ +> By default, the generator will use JavaScript but if it detects that you have a +``tsconfig.json`` file in your project, it will use TypeScript instead. + +running +```bash +meteor generate customer + +``` + +It will generate the following code in ``/imports/api`` +![Screenshot 2022-11-09 at 11 28 29](https://user-images.githubusercontent.com/70247653/200856551-71c100f5-8714-4b34-9678-4f08780dcc8b.png) + +That will have the following code: + + +## collection.js {meteorgenerate-collection.js} + +```js +import { Mongo } from 'meteor/mongo'; + +export const CustomerCollection = new Mongo.Collection('customer'); +``` + + + +## methods.js {meteorgenerate-methods.js} + +```js +import { Meteor } from 'meteor/meteor'; +import { check } from 'meteor/check'; +import { CustomerCollection } from './collection'; + +export async function create(data) { + return CustomerCollection.insertAsync({ ...data }); +} + +export async function update(_id, data) { + check(_id, String); + return CustomerCollection.updateAsync(_id, { ...data }); +} + +export async function remove(_id) { + check(_id, String); + return CustomerCollection.removeAsync(_id); +} + +export async function findById(_id) { + check(_id, String); + return CustomerCollection.findOneAsync(_id); +} + +Meteor.methods({ + 'Customer.create': create, + 'Customer.update': update, + 'Customer.remove': remove, + 'Customer.find': findById +}); +``` + + + +## publication.js {meteorgenerate-publication.js} + +```js +import { Meteor } from 'meteor/meteor'; +import { CustomerCollection } from './collection'; + +Meteor.publish('allCustomers', function publishCustomers() { + return CustomerCollection.find({}); +}); +``` + + + + +## index.js {meteorgenerate-index.js} + +```js +export * from './collection'; +export * from './methods'; +export * from './publications'; +``` + +Also, there is the same version of these methods using TypeScript, that will be shown bellow. + +## path option {meteorgenerate-path} + +If you want to create in another path, you can use the ``--path`` option in order to select where to place this boilerplate. +It will generate the model in that path. Note that is used TypeScript in this example. + +```bash + +meteor generate another-customer --path=server/admin + +``` + +It will generate in ``server/admin`` the another-client code: + +![Screenshot 2022-11-09 at 11 32 39](https://user-images.githubusercontent.com/70247653/200857560-a4874e4c-1078-4b7a-9381-4c6590d2f63b.png) + + +## collection.ts {meteorgenerate-collection.ts} + +```typescript +import { Mongo } from 'meteor/mongo'; + +export type AnotherCustomer = { + _id?: string; + name: string; + createdAt: Date; +} + +export const AnotherCustomerCollection = new Mongo.Collection('another-customer'); +``` + +## methods.ts {meteorgenerate-methods.ts} + +```typescript +import { Meteor } from 'meteor/meteor'; +import { Mongo } from 'meteor/mongo'; +import { check } from 'meteor/check'; +import { AnotherCustomer, AnotherCustomerCollection } from './collection'; + +export async function create(data: AnotherCustomer) { + return AnotherCustomerCollection.insertAsync({ ...data }); +} + +export async function update(_id: string, data: Mongo.Modifier) { + check(_id, String); + return AnotherCustomerCollection.updateAsync(_id, { ...data }); +} + +export async function remove(_id: string) { + check(_id, String); + return AnotherCustomerCollection.removeAsync(_id); +} + +export async function findById(_id: string) { + check(_id, String); + return AnotherCustomerCollection.findOneAsync(_id); +} + +Meteor.methods({ + 'AnotherCustomer.create': create, + 'AnotherCustomer.update': update, + 'AnotherCustomer.remove': remove, + 'AnotherCustomer.find': findById +}); +``` + + + +## publications.ts {meteorgenerate-publications.ts} + +```typescript +import { Meteor } from 'meteor/meteor'; +import { AnotherCustomerCollection } from './collection'; + +Meteor.publish('allAnotherCustomers', function publishAnotherCustomers() { + return AnotherCustomerCollection.find({}); +}); +``` + + + +## index.ts {meteorgenerate-index.ts} + +```typescript +export * from './collection'; +export * from './methods'; +export * from './publications'; +``` + +--- + + +## Using the Wizard {meteorgenerate-wizard} + + +If you run the following command: + +```bash +meteor generate +``` + +It will prompt the following questions. + +![Screenshot 2022-11-09 at 11 38 29](https://user-images.githubusercontent.com/70247653/200859087-a2ef63b6-7ac1-492b-8918-0630cbd30686.png) + + + + +--- + +## Using your own template {meteorgenerate-templating} + +`--templatePath` + +```bash +meteor generate feed --templatePath=/scaffolds-ts +``` +![Screenshot 2022-11-09 at 11 42 47](https://user-images.githubusercontent.com/70247653/200860178-2341befe-bcfd-422f-a4bd-7c9918abfd97.png) + +> Note that this is not a CLI framework inside meteor but just giving some solutions for really common problems out of the box. +> Check out Yargs, Inquirer or Commander for more information about CLI frameworks. + + +You can use your own templates for scaffolding your specific workloads. To do that, you should pass in a template directory URL so that it can copy it with its changes. + +## How to rename things? {meteorgenerate-template-rename} + +Out of the box is provided a few functions such as replacing ``$$name$$``, ``$$PascalName$$`` and ``$$camelName$$`` + +these replacements come from this function: + +_Note that scaffoldName is the name that you have passed as argument_ + +```js +const transformName = (name) => { + return name.replace(/\$\$name\$\$|\$\$PascalName\$\$|\$\$camelName\$\$/g, function (substring, args) { + if (substring === '$$name$$') return scaffoldName; + if (substring === '$$PascalName$$') return toPascalCase(scaffoldName); + if (substring === '$$camelName$$') return toCamelCase(scaffoldName); + }) + } +``` + +## How to bring your own templates? {meteorgenerate-template-faq} + +`--replaceFn` + +There is an option called ``--replaceFn`` that when you pass in given a .js file with two functions it will override all templating that we have defaulted to use your given function. +_example of a replacer file_ +```js +export function transformFilename(scaffoldName, filename) { + console.log(scaffoldName, filename); + return filename +} + +export function transformContents(scaffoldName, contents, fileName) { + console.log(fileName, contents); + return contents +} +``` +If you run your command like this: + +```bash + meteor generate feed --replaceFn=/fn/replace.js +``` +It will generate files full of ``$$PascalCase$$``using the meteor provided templates. + +A better example of this feature would be the following js file: +```js +const toPascalCase = (str) => { + if(!str.includes('-')) return str.charAt(0).toUpperCase() + str.slice(1); + else return str.split('-').map(toPascalCase).join(''); +} +const toCamelCase = (str) => { + if(!str.includes('-')) return str.charAt(0).toLowerCase() + str.slice(1); + else return str.split('-').map(toPascalCase).join(''); +} + +const transformName = (scaffoldName, str) => { + return str.replace(/\$\$name\$\$|\$\$PascalName\$\$|\$\$camelName\$\$/g, function (substring, args) { + if (substring === '$$name$$') return scaffoldName; + if (substring === '$$PascalName$$') return toPascalCase(scaffoldName); + if (substring === '$$camelName$$') return toCamelCase(scaffoldName); + }) + +} + +export function transformFilename(scaffoldName, filename) { + return transformName(scaffoldName, filename); +} + +export function transformContents(scaffoldName, contents, fileName) { + return transformName(scaffoldName, contents); +} +``` + +## meteor login / logout {meteorloginlogout} + +Log in and out of your account using Meteor's authentication system. + +You can pass `METEOR_SESSION_FILE=token.json` before `meteor login` to generate +a login session token so you don't have to share your login credentials with +third-party service providers. + +Once you have your account you can log in and log out from the command line, and +check your username with `meteor whoami`. + +## meteor deploy _site_ {meteordeploy} + +Deploy the project in your current directory to +Galaxy. + +Use `--owner` to decide which organization or user account you'd like to deploy +a new app to if you are a member of more than one Galaxy-enabled account. + +You can deploy in debug mode by passing `--debug`. This +will leave your source code readable by your favorite in-browser +debugger, just like it is in local development mode. + + + +To delete an application you've deployed, specify +the `--delete` option along with the site. + + + +You can add information specific to a particular deployment of your application +by using the `--settings` option. The argument to `--settings` is a file +containing any JSON string. The object in your settings file will appear on the +server side of your application in [`Meteor.settings`](../api/meteor#Meteor-settings). + +Settings are persistent. When you redeploy your app, the old value will be +preserved unless you explicitly pass new settings using the `--settings` option. +To unset `Meteor.settings`, pass an empty settings file. + +::: warning +`free` and `mongo` options were introduced in Meteor 2.0 +::: + +You can run your app for free using the option `--free`. But, there are some limitations. The first one is that you cannot use a custom domain to run a free app. Your domain must contain a Meteor domain name (`.meteorapp.com` to US region, `.au.meteorapp.com` to Asia region, or `.eu.meteorapp.com` to Europe region). Second thing you must know is that your free apps have Cold Start enabled. Cold Start means that your app will stop if it has no connection for 10 minutes, and it will go automatically up when someone tries to connect to it. The third thing you must know is that free apps run on one, and just one, Tiny container. This is important to know, because Tiny containers are NOT meant to production environment, so even small apps can crash with a lot of connections. To keep your app on free, you always need to provide this option. + +With the option `--mongo` you can deploy your app without having to pay for a MongoDB provider. By providing this option, Galaxy will create a database for you in our shared cluster and inject the mongo URL on your settings. So with this, you don't even need to provide the settings file anymore (if your settings files just have the mongo URL of course). This is great to test apps, but it shouldn't be used in a production environment, as you will be running in a shared Cluster with limited space. The rules behind this option are: If it is the first deploy of the app, and you provided the option `--mongo`, after the deploy is finished you will receive your mongo URL on your console (you can also see your URL on Galaxy in your app's version). You can put that URL on your settings file if want to. If you try to do a second without the option `--mongo` and without providing a mongo URL on your settings, your deploy will fail as usual. If you provide the option `--mongo` and a mongo URL, the mongo URL on your settings file is the one that will be used by Galaxy to connect your app to a MongoDB. One last thing, you need to have at least one document in your database so Meteor is really going to instantiate it. Then you will be able to access it using any MongoDB client with the provided URI. + +Use the options `--mongo` and `--free` to easily deploy a free app already with a mongo database connected to it. + +::: warning +Free apps and MongoDB shared hosting: Meteor Software reserves the right to stop or remove applications we deem to be abusing the free plan offering at any time. Please be advised that the free plan offering is not recommended for production applications. The shared MongoDB cluster that comes configured with the free plan does not provide backups or restoration resources. +::: + +::: warning +If you want to connect to your free MongoDB shared cluster using your on settings make sure you include this option in your settings in the Mongo package configuration section: +``` +packages: { + mongo: { + options: { + tlsAllowInvalidCertificates: true, + }, + }, +} +``` +This is necessary as our database provider does not have certificates installed on every machine and we don't want to force apps to have this certificate. More about this option [here](../api/collections.html#mongo_connection_options_settings) +::: + + +You can change the app plan by providing argument `--plan` with one of the following values: professional, essentials, or free. Be aware that this argument overwrites the `--free` argument. + +::: warning +The `plan` option is available since Meteor 2.1. +::: + +Use `--cache-build` to keep the bundle in your temp folder after the deploy is finished, this is helpful when you want to deploy the same code to different environments. For example, a [background job](https://cloud-guide.meteor.com/background-jobs.html) app from the same code as the web app. + +Your project should be a git repository as the commit hash is going to be used to decide if your code is still the same or not in the next deploy. + +::: warning +The `cache-build` option is available since Meteor 1.11. +::: + +With the argument `--container-size` you can change your app's container size using the deploy command. The valid arguments are: `tiny`, `compact`, `standard`, `double`, `quad`, `octa`, and `dozen`. One more thing to note here is that the `--container-size` flag can only be used when the `--plan` option is already specified, otherwise using the `--container-size` option will throw an error with the message : `Error deploying application: Internal error`. To see more about the difference and prices of each one you can check [here](https://www.meteor.com/cloud#pricing-section). + +::: warning +The `--container-size` option is available since Meteor 2.4.1. +::: + +## meteor update {meteorupdate} + +Attempts to bring you to the latest version of Meteor, and then to upgrade your +packages to their latest versions. By default, update will not break +compatibility. + +For example, let's say packages A and B both depend on version 1.1.0 of package +X. If a new version of A depends on X@2.0.0, but there is no new version of +package B, running `meteor update` will not update A, because doing so will +break package B. + +You can pass in the flag `--packages-only` to update only the packages, and not +the release itself. Similarly, you can pass in names of packages +(`meteor update foo:kittens baz:cats`) to only update specific packages. + +Every project is pinned to a specific release of Meteor. You can temporarily try +using your package with another release by passing the `--release` option to any +command; `meteor update` changes the pinned release. + +Sometimes, Meteor will ask you to run `meteor update --patch`. Patch releases +are special releases that contain only very minor changes (usually crucial bug +fixes) from previous releases. We highly recommend that you always run `update +--patch` when prompted. + +You may also pass the `--release` flag to act as an override to update to a +specific release. This is an override: if it cannot find compatible versions of +packages, it will log a warning, but perform the update anyway. This will only +change your package versions if necessary. + + +## meteor add _package_ {meteoradd} + +Add packages to your Meteor project. By convention, names of community packages +include the name of the maintainer. For example: `meteor add iron:router`. You +can add multiple packages with one command. + +Optionally, adds version constraints. Running `meteor add package@1.1.0` will +add the package at version `1.1.0` or higher (but not `2.0.0` or higher). If you +want to use version `1.1.0` exactly, use `meteor add package@=1.1.0`. You can also +'or' constraints together: for example, `meteor add 'package@=1.0.0 || =2.0.1'` +means either 1.0.0 (exactly) or 2.0.1 (exactly). + +To remove a version constraint for a specific package, run `meteor add` again +without specifying a version. For example above, to stop using version `1.1.0` +exactly, run `meteor add package`. + + +## meteor remove _package_ {meteorremove} + +Removes a package previously added to your Meteor project. For a +list of the packages that your application is currently using, run +`meteor list`. + +This removes the package entirely. To continue using the package, +but remove its version constraint, use [`meteor add`](#meteor-add-package). + +Meteor does not downgrade transitive dependencies unless it's necessary. This +means that if running `meteor add A` upgrades A's parent package X to a new +version, your project will continue to use X at the new version even after you +run `meteor remove A`. + + +## meteor list {meteorlist} + +Lists all the packages that you have added to your project. For each package, +lists the version that you are using. Lets you know if a newer version of that +package is available. + +**Flags** + +Flags are optional and can be used to format the output. The default output +requires no flags whatsoever. The following flags are supported: + +`--tree` + +Outputs a tree showing how packages are referenced. + +`--json` + +Outputs an unformatted JSON String, showing how packages are referenced. + +`--weak` + +Show weakly referenced dependencies in the tree. +Only functional in combination with `--tree` or `--json`. + +`--details` + +Adds more package details to the JSON output. +Only functional in combination with `--json`. + + +## meteor add-platform _platform_ {meteoraddplatform} + +Adds platforms to your Meteor project. You can add multiple +platforms with one command. Once a platform has been added, you +can use 'meteor run platform' to run on the platform, and `meteor build` +to build the Meteor project for every added platform. + + +## meteor remove-platform _platform_ {meteorremoveplatform} + +Removes a platform previously added to your Meteor project. For a +list of the platforms that your application is currently using, see +`meteor list-platforms`. + + +## meteor list-platforms {meteorlistplatforms} + +Lists all of the platforms that have been explicitly added to your project. + + +## meteor ensure-cordova-dependencies {meteorensurecordovadependencies} + +Check if the dependencies are installed, otherwise install them. + +## meteor mongo {meteormongo} + +Open a MongoDB shell on your local development database, so that you +can view or manipulate it directly. + +::: warning +For now, you must already have your application running locally +with `meteor run`. This will be easier in the future. +::: + + +## meteor reset {meteorreset} + +Reset the current project to a fresh state. Removes the local +mongo database. + +::: warning +This deletes your data! Make sure you do not have any information you +care about in your local mongo database by running `meteor mongo`. +From the mongo shell, use `show collections` +and db.collection.find() to inspect your data. +::: + +::: warning +For now, you can not run this while a development server is +running. Quit all running meteor applications before running this. +::: + + +## meteor build {meteorbuild} + +Package this project up for deployment. The output is a directory with several +build artifacts: + +
  • a tarball (.tar.gz) that includes everything necessary to run the application + server (see the README in the tarball for details). Using the + `--directory` option will produce a `bundle` directory instead of the tarball.
  • +
  • an unsigned apk bundle and a project source if Android is targeted as a + mobile platform
  • +
  • a directory with an Xcode project source if iOS is targeted as a mobile + platform
+ +You can use the application server bundle to host a Meteor application on your +own server, instead of deploying to Galaxy. You will have to deal +with logging, monitoring, backups, load-balancing, etc, all of which we handle +for you if you use Galaxy. + +The unsigned `apk` bundle and the outputted Xcode project can be used to deploy +your mobile apps to Android Play Store and Apple App Store. + +By default, your application is bundled for your current architecture. +This may cause difficulties if your app contains binary code due to, +for example, npm packages. You can try to override that behavior +with the `--architecture` flag. + +You can set optional data for the initial value of `Meteor.settings` +in your mobile application with the `--mobile-settings` flag. A new value for +`Meteor.settings` can be set later by the server as part of hot code push. + +You can also specify which platforms you want to build with the `--platforms` flag. +Examples: `--platforms=android`, `--platforms=ios`, `--platforms=web.browser`. + +## meteor lint {meteorlint} + +Run through the whole build process for the app and run all linters the app +uses. Outputs all build errors or linting warnings to the standard output. + + +## meteor search {meteorsearch} + +Searches for Meteor packages and releases, whose names contain the specified +regular expression. + + +## meteor show {meteorshow} + +Shows more information about a specific package or release: name, summary, the +usernames of its maintainers, and, if specified, its homepage and git URL. + +Get information on meteor recommended releases: +```bash +meteor show METEOR +``` + +Get information on all meteor releases (including intermediate releases)" +```bash +meteor show --show-all METEOR +``` + + +## meteor publish {meteorpublish} + +Publishes your package. To publish, you must `cd` into the package directory, log +in with your Meteor Developer Account and run `meteor publish`. By convention, +published package names must begin with the maintainer's Meteor Developer +Account username and a colon, like so: `iron:router`. + +To publish a package for the first time, use `meteor publish --create`. + +Sometimes packages may contain binary code specific to an architecture (for +example, they may use an npm package). In that case, running publish will only +upload the build to the architecture that you were using to publish it. You can +use `publish-for-arch` to upload a build to a different architecture from a +different machine. + +If you have already published a package but need to update it's metadata +(the content of `Package.describe`) or the README you can actually achieve this +via `meteor publish --update`. + +## meteor publish-for-arch {meteorpublishforarch} + +Publishes a build of an existing package version from a different architecture. + +Some packages contain code specific to an architecture. Running `publish` by +itself, will upload the build to the architecture that you were using to +publish. You need to run `publish-for-arch` from a different architecture to +upload a different build. + +For example, let's say you published name:cool-binary-blob from a Mac. If you +want people to be able to use cool-binary-blob from Linux, you should log into a +Linux machine and then run +`meteor publish-for-arch name:cool-binary-blob@version`. It will notice that you +are on a linux machine, and that there is no Linux-compatible build for your package +and publish one. + +Currently, the supported architectures for Meteor are 32-bit Linux, 64-bit Linux +and Mac OS. Galaxy's servers run 64-bit Linux. + + +## meteor publish-release {meteorpublishrelease} + +Publishes a release of Meteor. Takes in a JSON configuration file. + +Meteor releases are divided into tracks. While only MDG members can publish to +the default Meteor track, anyone can create a track of their own and publish to +it. Running `meteor update` without specifying the `--release` option will not +cause the user to switch tracks. + +To publish to a release track for the first time, use the `--create-track` flag. + +The JSON configuration file must contain the name of the release track +(`track`), the release version (`version`), various metadata, the packages +specified by the release as mapped to versions (`packages`), and the package & +version of the Meteor command-line tool (`tool`). Note that this means that +forks of the meteor tool can be published as packages and people can use them by +switching to a corresponding release. For more information, run +`meteor help publish-release`. + + +## meteor test-packages {meteortestpackages} + +Test Meteor packages, either by name, or by directory. Not specifying an +argument will run tests for all local packages. The results are displayed in an +app that runs at `localhost:3000` by default. If you need to, you can pass the +`--settings` and `--port` arguments. + + +## meteor admin {meteoradmin} + +Catch-all for miscellaneous commands that require authorization to use. + +Some example uses of `meteor admin` include adding and removing package +maintainers and setting a homepage for a package. It also includes various +helpful functions for managing a Meteor release. Run `meteor help admin` for +more information. + +## meteor shell {meteorshell} + +When `meteor shell` is executed in an application directory where a server +is already running, it connects to the server and starts an interactive +shell for evaluating server-side code. + +Multiple shells can be attached to the same server. If no server is +currently available, `meteor shell` will keep trying to connect until it +succeeds. + +Exiting the shell does not terminate the server. If the server restarts +because a change was made in server code, or a fatal exception was +encountered, the shell will restart along with the server. This behavior +can be simulated by typing `.reload` in the shell. + +The shell supports tab completion for global variables like `Meteor`, +`Mongo`, and `Package`. Try typing `Meteor.is` and then pressing tab. + +The shell maintains a persistent history across sessions. Previously-run +commands can be accessed by pressing the up arrow. + +## meteor npm {meteornpm} + +The `meteor npm` command calls the +[`npm`](https://docs.npmjs.com/getting-started/what-is-npm) version bundled +with Meteor itself. + +Additional parameters can be passed in the same way as the `npm` command +(e.g. `meteor npm rebuild`, `meteor npm ls`, etc.) and the +[npm documentation](https://docs.npmjs.com/) should be consulted for the +full list of commands and for a better understanding of their usage. + +For example, executing `meteor npm install lodash --save` would install `lodash` +from npm to your `node_modules` directory and save its usage in your +[`package.json`](https://docs.npmjs.com/files/package.json) file. + +Using the `meteor npm ...` commands in place of traditional `npm ...` commands +is particularly important when using Node.js modules that have binary +dependencies that make native C calls (like [`bcrypt`](https://www.npmjs.com/package/bcrypt)) +because doing so ensures that they are built using the same libraries. + +Additionally, this access to the npm that comes with Meteor avoids the need to +download and install npm separately. + +## meteor node {meteornode} + +The `meteor node` command calls the +[`node`](https://nodejs.org) version bundled with Meteor itself. + +> This is not to be confused with [`meteor shell`](#meteor-shell), which provides +> an almost identical experience but also gives you access to the "server" context +> of a Meteor application. Typically, `meteor shell` will be preferred. + +Additional parameters can be passed in the same way as the `node` command, and +the [Node.js documentation](https://nodejs.org/dist/latest-v4.x/docs/api/cli.html) +should be consulted for the full list of commands and for a better understanding +of their usage. + +For example, executing `meteor node` will enter the Node.js +[Read-Eval-Print-Loop (REPL)](https://nodejs.org/dist/latest-v4.x/docs/api/repl.html) +interface and allow you to interactively run JavaScript and see the results. + +Executing `meteor node -e "console.log(process.versions)"` would +run `console.log(process.versions)` in the version of `node` bundled with Meteor. diff --git a/v3-docs/docs/cli/using-core-types.md b/v3-docs/docs/cli/using-core-types.md new file mode 100644 index 0000000000..89ebba6dca --- /dev/null +++ b/v3-docs/docs/cli/using-core-types.md @@ -0,0 +1,39 @@ + +# Using Core Types + +Using core types with zodern:types + +For MeteorJS in its version 2.8.1 we have introduced to our core packages an integration with the [zodern:types](https://github.com/zodern/meteor-types) package. +This package allows you to use the TypeScript types for the Meteor core packages in your TypeScript code or JavaScript code. +in order to use the types you need to install the package by running the command: + +```bash +meteor add zodern:types +``` + +And add the following line to your `tsconfig.json` file (if you do not have one, create one and add the code bellow): + +```json +{ + "compilerOptions": { + "preserveSymlinks": true, + "paths": { + "meteor/*": [ + "node_modules/@types/meteor/*", + ".meteor/local/types/packages.d.ts" + ] + } + } +} +``` + +then run the command: + +```bash +meteor lint +``` + +this will create a file within your .meteor folder that will have your types for the core packages. +You can continue to use your code as you did before, but now you can use the types for the core packages even if you are in JavaScript. + +for more information about the package please visit the [zodern:types](https://github.com/zodern/meteor-types). diff --git a/v3-docs/docs/components/ApiBox.vue b/v3-docs/docs/components/ApiBox.vue new file mode 100644 index 0000000000..d64e5581cf --- /dev/null +++ b/v3-docs/docs/components/ApiBox.vue @@ -0,0 +1,136 @@ + + + + + diff --git a/v3-docs/docs/components/ApiMap.vue b/v3-docs/docs/components/ApiMap.vue new file mode 100644 index 0000000000..920550d4e6 --- /dev/null +++ b/v3-docs/docs/components/ApiMap.vue @@ -0,0 +1,69 @@ + + + + + + diff --git a/v3-docs/docs/components/helpers/Booleans.vue b/v3-docs/docs/components/helpers/Booleans.vue new file mode 100644 index 0000000000..ae4735cd4a --- /dev/null +++ b/v3-docs/docs/components/helpers/Booleans.vue @@ -0,0 +1,24 @@ + + + + + + + + + diff --git a/v3-docs/docs/components/helpers/Caret.vue b/v3-docs/docs/components/helpers/Caret.vue new file mode 100644 index 0000000000..18fbc8adc4 --- /dev/null +++ b/v3-docs/docs/components/helpers/Caret.vue @@ -0,0 +1,35 @@ + + + + + diff --git a/v3-docs/docs/components/helpers/Classes.vue b/v3-docs/docs/components/helpers/Classes.vue new file mode 100644 index 0000000000..a6c3df5e6f --- /dev/null +++ b/v3-docs/docs/components/helpers/Classes.vue @@ -0,0 +1,42 @@ + + + + + + + + + diff --git a/v3-docs/docs/components/helpers/Functions.vue b/v3-docs/docs/components/helpers/Functions.vue new file mode 100644 index 0000000000..80985a97ac --- /dev/null +++ b/v3-docs/docs/components/helpers/Functions.vue @@ -0,0 +1,56 @@ + + + + + + + + + diff --git a/v3-docs/docs/components/helpers/Locus.vue b/v3-docs/docs/components/helpers/Locus.vue new file mode 100644 index 0000000000..8744352456 --- /dev/null +++ b/v3-docs/docs/components/helpers/Locus.vue @@ -0,0 +1,19 @@ + + + + + + diff --git a/v3-docs/docs/components/helpers/ParamTable.vue b/v3-docs/docs/components/helpers/ParamTable.vue new file mode 100644 index 0000000000..c906dfb3a2 --- /dev/null +++ b/v3-docs/docs/components/helpers/ParamTable.vue @@ -0,0 +1,132 @@ + + + + + diff --git a/v3-docs/docs/components/scripts/make-primitive-html.ts b/v3-docs/docs/components/scripts/make-primitive-html.ts new file mode 100644 index 0000000000..59112eba40 --- /dev/null +++ b/v3-docs/docs/components/scripts/make-primitive-html.ts @@ -0,0 +1,109 @@ +const primitiveDefault = { + function: () => + ` () => {}`, + string: (name) => + ` "${name}"`, + number: () => + ' 42', + boolean: () => + ' false', + object: (name) => + ` ${name}`, + array: () => ' []', + "array.": () => + ' ["string"]', + "array.": () => + ' [{}]', + "array.": () => + ` ${primitiveDefault.ejsonable( + { + pre: "[", + post: "]", + } + )}`, + // someProp: 'string', num: 42, bool: false, arr: [], obj: {} + ejsonable(obj) { + let pre, post; + if (typeof obj === "string") pre = ""; + if (typeof obj === "object") { + pre = obj.pre; + post = obj.post; + } + if (pre.length > 1) pre = ""; + // if (post.length > 1) post = ""; + return ` ${ + pre ?? `` + }{ num:${primitiveDefault.number()} , someProp:${primitiveDefault.string( + "foo" + )} }${ + post ?? `` + }`; + }, + ejson(pre, post) { + return primitiveDefault.ejsonable(pre, post); + }, + jsoncompatible(pre, post) { + return primitiveDefault.ejsonable(pre, post); + }, + promise: () => + ' Promise {}', + any: () => ' any', + error: (name) => + ` Error(${name})`, + mongoselector: () => + ` MongoSelector`, + mongomodifier: () => + ` MongoModifier`, + iterationcallback: () => + ` IterationCallback`, + expresshandlerscallback: () => + ` ExpressHandlersCallback`, + addruntimeconfighookcallback: () => + ` addRuntimeConfigHookCallback`, + addupdatednotifyhookcallback: () => + ` addUpdatedNotifyHookCallback`, + 'tracker.computationfunction': () => + ` Tracker.ComputationFunction`, + computation: () => + ` Computation`, + func: () => primitiveDefault.function(), + 'tracker.computation': () => primitiveDefault.computation(), +}; + +const comma = `,`; +const br = `
`; + +const typeComment = (type) =>{ + return `/** @returns {${type}} */` + +} +const comment = (text = " // this param is optional ") => + `${text}`; + +const line = ({ html, pre, post } = { pre: "", post: "", html: "" }) => + `${pre}${html}${post}`; + +const makePrimitiveHTML = ({ primitive, arr, index, isOptional, name }) => { + let n: string = primitive[0], + primitiveName = n.toLowerCase(), + value; + + try { + value = primitiveDefault[primitiveName](name); + } catch (e) { + console.error("primitive that we got:", primitive); + throw new Error( + `primitive ${primitiveName} is not registred in the map, here is the error: ${e}` + ); + } + + if (arr.length > 1) + return line({ + html: value + `${comma}
`, + pre: index === 0 ? "" : br, + post: isOptional ? comment() : "", + }); + return value + `
`; +}; + +export { makePrimitiveHTML, comment, typeComment }; diff --git a/v3-docs/docs/components/scripts/map-maker.js b/v3-docs/docs/components/scripts/map-maker.js new file mode 100644 index 0000000000..ea98269190 --- /dev/null +++ b/v3-docs/docs/components/scripts/map-maker.js @@ -0,0 +1,145 @@ +const makeUnique = (arr) => [...new Set(arr)]; + +const makeModules = (names) => { + const modules = []; + // check for modules (names with no dots or hashes) + for (const name of names) { + if (name.includes("#")) continue; + if (name.includes(".")) continue; + modules.push(name); + } + return modules; +}; + +const makeApiList = (modules) => { + let currentModule = modules[0]; + const apiList = {}; + for (const name of modules) { + if (!apiList[currentModule]) { + apiList[currentModule] = { + [currentModule]: [], + }; + } + if (name.includes(currentModule)) { + apiList[currentModule][name] = []; + continue; + } + currentModule = name; + } + return apiList; +}; + +/** + * + * @param {Array>} + */ +export function createMap(names) { + /** + * @type {string[]} + */ + const modules = makeModules(names); + + /** + * @type {Object>} + */ + const apiList = makeApiList(modules); + + const MODULES_TO_ADD = { + module: { module: [] }, + Session: { Session: [] }, + Random: { Random: [] }, + Email: { Email: [] }, + DDPRateLimiter: { DDPRateLimiter: [] }, + }; + + Object.assign(apiList, MODULES_TO_ADD); + + // populating map with links + for (const api of Object.keys(apiList)) { + const links = apiList[api]; + for (const link of Object.keys(links)) { + const allApis = names.filter( + (name) => name.includes(link + ".") || name.includes(link + "#") + ); + apiList[api][link] = makeUnique(allApis); + } + } + + // break App and WebApp + + const webApp = apiList.App.App.filter((name) => name.includes("WebApp")); + const app = apiList.App.App.filter((name) => !name.includes("WebApp")); + + apiList.App.App = app; + apiList.WebApp = { + WebApp: webApp, + }; + + // delete missplaced apis + const TO_IGNORE = [ + "addRuntimeConfigHookCallback(options)", + "addUpdatedNotifyHookCallback(options)", + "currentUser", + "expressHandlersCallback(req, res, next)", + "getPublicationStrategy", + "loggingIn", + "main", + "loggingOut", + "IterationCallback", + "CompileStep", + "Cordova", + "Plugin" + ]; + + + for (const key of Object.keys(apiList)) + if (TO_IGNORE.includes(key)) delete apiList[key]; + + // reroute DDP to -> meteor.html#DDP-connect + apiList.DDP.shouldGoTo = '/api/meteor'; + // Match -> check#Match + apiList.check.shouldGoTo = '/api/check'; + // Mongo -> collections.html#Mongo + apiList.Mongo.shouldGoTo = '/api/collections'; + // Npm -> package.html#Npm + apiList.Npm.shouldGoTo = '/api/package'; + // Subscription -> meteor.html#Meteor-publish + apiList.Subscription.shouldGoTo = '/api/meteor'; + // Module -> packages/hot-module-replacement.html + apiList.module.shouldGoTo = '/packages/hot-module-replacement'; + // Random -> packages/random.html + apiList.Random.shouldGoTo = '/packages/random'; + // WebApp -> packages/webapp.html + apiList.WebApp.shouldGoTo = '/packages/webapp'; + return apiList; +} + +/** + * + * @param {string} filter + * @returns {Object>} + * @returns {Object>} + */ +export function filterMap(filter, apiList) { + if (filter === "") { + return apiList; + } + const newList = {}; + for (const api in apiList) { + const newLinks = {}; + for (const key in apiList[api]) { + const links = apiList[api][key]; + const newLinksArray = links.filter((link) => { + return link.toLowerCase().includes(filter.toLowerCase()); + }); + if (newLinksArray.length > 0) { + newLinks[key] = newLinksArray; + } + } + if (Object.keys(newLinks).length > 0) { + newList[api] = newLinks; + } + } + return newList; +} diff --git a/v3-docs/docs/data/.gitkeep b/v3-docs/docs/data/.gitkeep new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/v3-docs/docs/data/.gitkeep @@ -0,0 +1 @@ + diff --git a/v3-docs/docs/generators/changelog/EXAMPLE.MD b/v3-docs/docs/generators/changelog/EXAMPLE.MD new file mode 100644 index 0000000000..c2a7ff6989 --- /dev/null +++ b/v3-docs/docs/generators/changelog/EXAMPLE.MD @@ -0,0 +1,36 @@ +## vX.XX.X, 2023-XX-XX + +### Highlights + +* MongoDB Server 6.x Support +* Embedded Mongo now uses MongoDB 6.0.3 +* Some pr [GH someone] [PR #number] // this will become -> [someone](https://github.com/someone) [PR](https://github.com/meteor/meteor/pull/number) +#### Breaking Changes + +N/A + +#### Internal API changes + +N/A + +#### Migration Steps + +TODO + +#### Meteor Version Release + + +* `Command line`: + - Corrected typo in XX XX + +* `npm mongo @4.13.0`: // You can use @get-version to get the version of the package + - Updated MongoDB driver to version 4.13.0 + +#### Special thanks to + +- [@XXX](https://github.com/XXXX). + + +For making this great framework even better! + + diff --git a/v3-docs/docs/generators/changelog/README.md b/v3-docs/docs/generators/changelog/README.md new file mode 100644 index 0000000000..bd795db186 --- /dev/null +++ b/v3-docs/docs/generators/changelog/README.md @@ -0,0 +1,48 @@ +## Changelog Generator + +This is a generator for the changelog, you must create a file with the name of +the version that you are generating the changelog for. The script will take care of the rest. + +In this file you should follow the EXAMPLE.md file that is within this directory. + +The script will generate a file called `history.gen.md` that will be used by the +`changelog.md` file to generate the changelog page. + +To get which branches were merged into release you can search in the GitHub +repo by using this query: + +``` + is:pr base: is:merged +``` + +or in GH Cli: + +```bash + gh pr list --state merged --base +``` + +note that it may not be as useful as the first one, since it will not show the +Authors and other related information. + +## Why? + +Computers with lower memory/ IDEs with high memory usage can have problems with +the changelog file(~10k lines). This is a way to reduce the memory usage of the changelog, also creating a more +organized changelog, since all the files will be reflecting at least one version. + +## Update ordering. + +If you want to make sure that the changelog is correcly ordered, take a look at the `order-packages.js` file. +to use it, run the command below: + +```bash +node order-packages.js versions/3.0.md +``` + +or + +```bash +node order-packages.js versions/.md +``` + +it will update the file with the correct ordering(this will override the file). \ No newline at end of file diff --git a/v3-docs/docs/generators/changelog/order-packages.js b/v3-docs/docs/generators/changelog/order-packages.js new file mode 100644 index 0000000000..8af678af5e --- /dev/null +++ b/v3-docs/docs/generators/changelog/order-packages.js @@ -0,0 +1,81 @@ +const fs = require("fs").promises; + +// we want to get the strings that are between #### Breaking Changes and #### New Public API +// then we will create a map with the package name and the version for example: +// +// - `accounts-2fa@3.0.0`: + +// - Some methods are now async. See below: +// - `Accounts._is2faEnabledForUser` +// - `(Meteor Method) - generate2faActivationQrCode` +// - `(Meteor Method) - enableUser2fa` +// - `(Meteor Method) - disableUser2fa` +// - `(Meteor Method) - has2faEnabled` + +// will be converted to: +// {"accounts-2fa@3.0.0": ` - Some methods are now async. See below: +// - `Accounts._is2faEnabledForUser` +// - `(Meteor Method) - generate2faActivationQrCode` +// - `(Meteor Method) - enableUser2fa` +// - `(Meteor Method) - disableUser2fa` +// - `(Meteor Method) - has2faEnabled`` +// } + +// then we will iterate and order the packages in alphabetical order and write again to the file. + +/** + * + * @param {string} path + * @returns {Promise<[string, null] | ["", Error]>} + */ +async function getFile(path) { + try { + const data = await fs.readFile(path, "utf8"); + return [data, null]; + } catch (e) { + console.error(e); + return ["", new Error("could not read file")]; + } +} + +async function main() { + const [filePath] = process.argv.slice(2); + const [code, error] = await getFile(filePath); + if (error) throw error; + + const regex = /#### Breaking Changes([\s\S]*?)#### New Public API/gm; + const matches = code.match(regex).join("\n").split("\n"); + + let objectMap = {}; + let currentWorkingPackage = ""; + for (const line of matches) { + if (line.startsWith("-")) { + const packageName = line + .replace("-", "") + .replace("`:", "") + .replace("`", "") + .trim(); + objectMap[packageName] = ""; + currentWorkingPackage = packageName; + continue; + } + objectMap[currentWorkingPackage] += line + "\n"; + } + // sorting acc + const result = Object.keys(objectMap) + .reduce((acc, key) => { + if (key === "") return acc; + acc.push({ key, value: objectMap[key]}); + return acc; + }, []) + .sort((a, b) => a.key.localeCompare(b.key)) + .reduce((acc, { key, value }) => { + return acc + `- \`${key}\`:\n${value}`; + }, "") + + const newCode = code.replace(regex, `#### Breaking Changes\n\n${result}`); + + await fs.writeFile(filePath, newCode); +} + +main().then(() => console.log("done")); diff --git a/v3-docs/docs/generators/changelog/script.js b/v3-docs/docs/generators/changelog/script.js new file mode 100755 index 0000000000..122e8add23 --- /dev/null +++ b/v3-docs/docs/generators/changelog/script.js @@ -0,0 +1,110 @@ +const _fs = require("fs"); +const fs = _fs.promises; +function getPackageVersion(packageName) { + function getFile(path) { + try { + const data = _fs.readFileSync(path, "utf8"); + return [data, null]; + } catch (e) { + console.error(e); + return ["", e]; + } + } + + const [code, error] = getFile(`../../packages/${packageName}/package.js`); + if (error) return ""; + for (const line of code.split(/\n/)) { + // verify if the line has a version + if (!line.includes("version:")) continue; + + //Package.describe({ + // summary: 'some description.', + // version: '1.2.3' <--- this is the line we want, we assure that it has a version in the previous if + //}); + const [_, versionValue] = line.split(":"); + if (!versionValue) continue; + const removeQuotes = (v) => + v.trim().replace(",", "").replace(/'/g, "").replace(/"/g, ""); + if (versionValue.includes("-")) + return removeQuotes(versionValue.split("-")[0]); + return removeQuotes(versionValue); + } +} + +exports.generateChangelog = async () => { + try { + console.log("started concatenating files"); + const files = await fs.readdir("./generators/changelog/versions", "utf8"); + const filesStream = files + .map((file) => { + console.log(`reading file: ${file}`); + return { + fileName: file, + buf: fs.readFile(`./generators/changelog/versions/${file}`, "utf8"), + }; + }) + .map(async ({ buf, fileName }, index) => { + // first file we don't do anything + // Big file and does not follow the new standard + if (index === 0) return buf; + const content = (await buf).toString(); + /** + * @type {Set} + */ + const contribuitors = new Set(); + + // DSL Replacers + // [PR #123] -> [PR #123](https://github.com/meteor/meteor/pull/123) + // [GH meteor/meteor] -> [meteor/meteor](https://github.com/meteor/meteor) + // package-name@get-version -> package-name@1.3.3 + + const file = content + .replace( + /\[PR #(\d+)\]/g, + (_, number) => + `[PR](https://github.com/meteor/meteor/pull/${number})` + ) + .replace(/\[GH ([^\]]+)\]/g, (_, name) => { + contribuitors.add(name); + return `[${name}](https://github.com/${name})`; + }) + .replace( + /([a-z0-9-]+)@get-version/g, + (_, name) => `${name}@${getPackageVersion(name)}` + ); + + // already have the contribuitors thanks in the file + if ( + file.includes("#### Special thanks to") || + file.includes("[//]: # (Do not edit this file by hand.)") + ) + return file; + + // add the contribuitors + const contribuitorsList = Array.from(contribuitors) + .map((name) => `- [@${name}](https://github.com/${name}).`) + .join("\n"); + + const doneFile = `${file}\n\n#### Special thanks to\n\n${contribuitorsList}\n\n`; + + //SIDE EFFECTS + // so that this is not ran every time, we will update the last file. + // this is for the expensive part of the script + if (index === files.length - 2) + await fs.writeFile( + `./generators/changelog/versions/${fileName}`, + doneFile + ); + return doneFile; + }) + .reverse(); + console.log("Giving some touches to the files"); + const filesContent = await Promise.all(filesStream); + await fs.writeFile("./history.md", filesContent.join("")); + console.log("Finished :)"); + } catch (e) { + console.log(e); + } +}; + + diff --git a/v3-docs/docs/generators/changelog/versions/0-before-2.10.md b/v3-docs/docs/generators/changelog/versions/0-before-2.10.md new file mode 100644 index 0000000000..8805d0bd63 --- /dev/null +++ b/v3-docs/docs/generators/changelog/versions/0-before-2.10.md @@ -0,0 +1,1699 @@ + + + +## v2.9.1, 2022-12-27 + +### Highlights + +* Reverted missing types [PR](https://github.com/meteor/meteor/pull/12366) by [Grubba27](https://github.com/Grubba27). +* Fix fetch() type declaration [PR](https://github.com/meteor/meteor/pull/12352) by [zarvox](https://github.com/zarvox). +* update svelte skeleton [PR](https://github.com/meteor/meteor/pull/12350) by [tosinek](https://github.com/tosinek). +* Bump to node 14.21.2.0 [PR](https://github.com/meteor/meteor/pull/12370) by [Grubba27](https://github.com/Grubba27). +* resetPassword and verifyEmail to no longer sign in the user automatically [PR](https://github.com/meteor/meteor/pull/12385) by [denihs](https://github.com/denihs). +* Added missing vue2 declaration for skeletons [PR](https://github.com/meteor/meteor/pull/12396) by [Grubba27](https://github.com/Grubba27) & [mlanning](https://github.com/mlanning). + +#### Breaking Changes + +* `accounts-password@2.3.3` + - The methods `resetPassword` and `verifyEmail` no longer logs the user if they have 2FA enabled. Now, the functions work as before, but instead of automatically logging in the user at the end, an error with the code `2fa-enabled` will be thrown. + + +#### Internal API changes + +N/A + +#### Migration Steps + +N/A + +#### Meteor Version Release + +* `fetch@0.1.3`: + - Updated fetch type definition. + +* `meteor@1.10.4`: + - Added back meteor type definitions that were removed by mistake in earlier version. + +* `accounts-password@2.3.3` + - The methods `resetPassword` and `verifyEmail` no longer logs the user if they have 2FA enabled. Now, the functions work as before, but instead of automatically logging in the user at the end, an error with the code `2fa-enabled` will be thrown. + +* `Command line`: + - Updated Svelte skeleton to now be able to support typescript out of the box and added ``#each`` in links in the skeleton. + - Updated node to 14.21.2 changes can be seen [here](https://github.com/nodejs/node/releases/tag/v14.21.2). + - Solved [issue](https://github.com/meteor/meteor/issues/12395) that could not allow vue2 apps being created in command line. + +#### Special thanks to +- [@zarvox](https://github.com/zarvox). +- [@tosinek](https://github.com/tosinek). +- [@Grubba27](https://github.com/Grubba27). +- [@denihs](https://github.com/denihs). +- [@mlanning](https://github.com/mlanning). + +For making this great framework even better! + + +## v2.9, 2022-12-12 + +### Highlights + +* TypeScript update to v4.6.4 [PR](https://github.com/meteor/meteor/pull/12204) by [@StorytellerCZ](https://github.com/StorytellerCZ). +* Create Email.sendAsync method without using Fibers [PR](https://github.com/meteor/meteor/pull/12101) + by [edimarlnx](https://github.com/edimarlnx). +* Create async method CssTools.minifyCssAsync [PR](https://github.com/meteor/meteor/pull/12105) + by [edimarlnx](https://github.com/edimarlnx). +* Change Accounts and Oauth to use Async methods [PR](https://github.com/meteor/meteor/pull/12156) + by [edimarlnx](https://github.com/edimarlnx). +* TinyTest package without Future [PR](https://github.com/meteor/meteor/pull/12222) + by [matheusccastroo](https://github.com/matheusccastroo). +* Feat: user accounts base async [PR](https://github.com/meteor/meteor/pull/12274) + by [Grubba27](https://github.com/Grubba27). +* Move somed methods from OAuth of out of accounts-base [PR](https://github.com/meteor/meteor/pull/12202) + by [StorytellerCZ](https://github.com/StorytellerCZ). +* Feat: not using insecure & autopublish [PR](https://github.com/meteor/meteor/pull/12220) + by [Grubba27](https://github.com/Grubba27). +* Don't apply babel async-await plugin when not running on Fibers [PR](https://github.com/meteor/meteor/pull/12221). + by [matheusccastroo](https://github.com/matheusccastroo). +* Implemented Fibers-less MongoDB count methods [PR](https://github.com/meteor/meteor/pull/12295) + by [radekmie](https://github.com/radekmie). +* Feat: Generate scaffold in cli [PR](https://github.com/meteor/meteor/pull/12298) + by [Grubba27](https://github.com/Grubba27). +* Update types [PR](https://github.com/meteor/meteor/pull/12306) by [piotrpospiech](https://github.com/piotrpospiech). +* Remove underscore from package-version-parser [PR](https://github.com/meteor/meteor/pull/12248) + by [harryadel](https://github.com/harryadel). +* Update MongoDB driver version [PR](https://github.com/meteor/meteor/pull/12333) by [Grubba27](https://github.com/Grubba27). +* New Vue3 Skeleton [PR](https://github.com/meteor/meteor/pull/12302) + by [henriquealbert](https://github.com/henriquealbert). + +#### Breaking Changes +* `Accounts.createUserVerifyingEmail` is now async + +#### Internal API changes +* Internal methods from `OAuth` that are now async: + - _attemptLogin + - _loginMethod + - _runLoginHandlers + - OAuth.registerService now accepts async functions + +OAuth related code has been moved from `accounts-base` to `accounts-oauth`, removing the dependency on `service-configuration` +more can be seen in this [discussion](https://github.com/meteor/meteor/discussions/12171) and in the [PR](https://github.com/meteor/meteor/pull/12202). +This means that if you don’t use third-party login on your project, you don’t need to add the package service-configuration anymore. + +#### Migration Steps + +You can follow in [here](https://guide.meteor.com/2.9-migration.html). + +#### Meteor Version Release + +* `eslint-plugin-meteor@7.4.0`: + - updated Typescript deps and meteor babel. +* `eslint-plugin-meteor@7.4.0`: + - updated Typescript deps and meteor babel. +* `accounts-base@2.2.6` + - Moved some functions to accounts-oauth. +* `accounts-oauth@1.4.2` + - Received functions from accounts-base. +* `accounts-password@2.3.2` + - Asyncfied functions such as `changePassword`, `forgotPassword`, `resetPassword`, `verifyEmail`, `setPasswordAsync`. +* `babel-compiler@7.10.1` + - Updated babel to 7.17.1. +* `email@2.2.3` + - Create Email.sendAsync method without using Fibers. +* `facebook-oauth@1.11.2` + - Updated facebook-oauth to use async functions. +* `github-oauth@1.4.1` + - Updated github-oauth to use async functions. +* `google-oauth@1.4.3` + - Updated google-oauth to use async functions. +* `meetup-oauth@1.1.2` + - Updated meetup-oauth to use async functions. +* `meteor-developer-oauth@1.3.2` + - Updated meteor-developer-oauth to use async functions. +* `meteor@1.10.3` + - Added Async Local Storage helpers. +* `minifier-css@1.6.2` + - Asyncfied `minifyCss` function. +* `minimongo@1.9.1` + - Implemented Fibers-less MongoDB count methods. +* `mongo@1.16.2` + - Implemented Fibers-less MongoDB count methods. +* `npm-mongo@4.12.1` + - Updated npm-mongo to 4.12. +* `oauth@2.1.3` + - Asyncfied methods. +* `oauth1@1.5.1` + - Asyncfied methods. +* `oauth2@1.3.2` + - Asyncfied methods. +* `package-version-parser@3.2.1` + - Removed underscore. +* `promise@0.12.2` + - Added DISABLE_FIBERS flag. +* `standard-minifier-css@1.8.3` + - Asyncfied minify method. +* `test-helpers@1.3.1` + - added runAndThrowIfNeeded function. +* `test-in-browser@1.3.2` + - Adjusted e[type] to e.type +* `tinytest@1.2.2` + - TinyTest package without Future. +* `twitter-oauth@1.3.2` + - Asyncfied methods. +* `typescript@4.6.4` + - updated typescript to 4.6.4. +* `weibo-oauth@1.3.2` + - Asyncfied methods. + +#### Special thanks to +- [@henriquealbert](https://github.com/henriquealbert); +- [@edimarlnx](https://github.com/edimarlnx); +- [@matheusccastroo](https://github.com/matheusccastroo); +- [@Grubba27](https://github.com/Grubba27); +- [@StorytellerCZ](https://github.com/StorytellerCZ); +- [@radekmie](https://github.com/radekmie); +- [@piotrpospiech](https://github.com/piotrpospiech); +- [@harryadel](https://github.com/harryadel); + +For making this great framework even better! + + +## v2.8.2, 2022-11-29 + +#### Highlights +* `mongo@1.16.2`: + - Make count NOT create a cursor. [PR](https://github.com/meteor/meteor/pull/12326). +* `meteorjs/babel@7.16.1-beta.0` + - Adjusted config to Auto import React on jsx,tsx files [PR](https://github.com/meteor/meteor/pull/12327). + - needs to use directly from npm the meteorjs/babel@7.16.1-beta.0. + +#### Breaking Changes +N/A + +#### Migration Steps + +#### Meteor Version Release +* `mongo@1.16.2`: + - Make count NOT create a cursor. [PR](https://github.com/meteor/meteor/pull/12326). + +#### Special thanks to +- [@henriquealbert](https://github.com/henriquealbert); +- [@znewsham](https://github.com/znewsham); + +For making this great framework even better! + + + +## v2.8.1, 2022-11-14 + +#### Highlights + +- modernize tools/run-updater.js by [afrokick](https://github.com/afrokick) +- feat(error message): Especifing error message when cross-boundary by [Grubba27](https://github.com/Grubba27) +- Type definitions for core packages by [piotrpospiech](https://github.com/piotrpospiech) +- Add https proxy support to meteor-installer by [heschong](https://github.com/heschong) +- Fix case insensitive lookup resource overuse by [ToyboxZach](https://github.com/ToyboxZach) +- Update default Facebook API to v15 and fix local changelog by [StorytellerCZ](https://github.com/StorytellerCZ) +- Bump to Node v14.21.1 by [StorytellerCZ](https://github.com/StorytellerCZ) +- Use true mongo binary types by [znewsham](https://github.com/znewsham) +- Add docs for Accounts.registerLoginHandler by [shivam1646](https://github.com/shivam1646) +- Updated MongoDB driver to 4.11 by [radekmie](https://github.com/radekmie) +- Show port in restart message by [harryadel](https://github.com/harryadel) +- In the client, don't wait if the stub doesn't return a promise by [denihs](https://github.com/denihs) +- The rest of type definitions for core packages by [piotrpospiech](https://github.com/piotrpospiech) +- Removing underscore in packages by [harryadel](https://github.com/harryadel): + - [twitter-oauth] Remove underscore + - [test-in-browser] Remove underscore + - [webapp-hashing] Remove underscore + - [browser-policy] Remove underscore + - [ecmascript] Remove underscore + - [browser-policy-framing] Remove underscore + - [diff-sequence] Remove underscore + - [facts-ui] Remove underscore + - [geojson-utils] Remove underscore + +#### Breaking Changes + +N/A + +#### Migration Steps + +_In case you want types in your app using the core packages types/zodern:types (now you do have the option)_ + +1. Remove `@types/meteor` package +2. Install [`zodern:types`](https://github.com/zodern/meteor-types) package +3. Follow [installation guide for the Meteor Apps](https://github.com/zodern/meteor-types#meteor-apps) to update + +#### Meteor Version Release + +* `accounts-base@2.2.5` + - added types for package. +* `browser-policy@1.1.1` + - adjusted package tests. +* `browser-policy-common@1.0.12` + - added types for package. +* `browser-policy-framing@1.1.1` + - removed underscore. +* `check@1.3.2` + - added types for package. +* `ddp@1.4.0` + - added types for package. +* `ddp-client@2.6.1` + - In the client, don't wait if the stub doesn't return a promise. +* `ddp-rate-limiter@1.1.1` + - added types for package. +* `diff-sequence@1.1.2` + - removed underscore. +* `ecmascript@0.16.3` + - removed underscore. +* `ejson@1.1.3` + - added types for package. +* `ejson@2.2.2` + - added types for package. +* `facebook-oauth@1.12.0` + - Updated default version of Facebook GraphAPI to v15 +* `facts-ui@1.0.1` + - removed underscore. +* `fetch@0.1.2` + - added types for package. +* `geojson-utils@1.0.11` + - removed underscore. +* `hot-module-replacement@0.5.2` + - added types for package. +* `meteor@1.10.2` + - added types for package. +* `modern-browsers@0.1.9` + - added types for package. +* `modules-runtime@0.13.2` + - added accurate error messages. +* `modules-runtime-hot@0.14.1` + - added accurate error messages. +* `mongo@1.16.1` + - added types for package. + - added true mongo binary +* `npm-mongo@4.11.0` + - updated npm mongo version to match npm one. +* `promise@0.13.0` + - added types for package. +* `random@1.2.1` + - added types for package. +* `reactive-dict@1.3.1` + - added types for package. +* `reactive-dict@1.0.12` + - added types for package. +* `server-render@0.4.1` + - added types for package. +* `service-configuration@1.3.1` + - added types for package. +* `session@1.2.1` + - added types for package. +* `test-in-browser@1.3.1` + - removed underscore. +* `tracker@1.2.1` +- added types for package. +* `twitter-oauth@1.3.1` + - removed underscore. +* `underscore@1.0.11` + - added types for package. +* `webapp@1.13.2` + - added types for package. +* `webapp-hashing@1.1.1` + - added types for package. +## v2.8, 2022-10-19 + +#### Highlights +* New MongoDB Package Async API. [PR](https://github.com/meteor/meteor/pull/12028) +* Node update to [v14.20.1](https://nodejs.org/en/blog/release/v14.20.1/) as part of the [September 22nd security release](https://nodejs.org/en/blog/vulnerability/september-2022-security-releases/) +* Update MongoDB driver to 4.9. [PR](https://github.com/meteor/meteor/pull/12097) +* Meteor.callAsync method. [PR](https://github.com/meteor/meteor/pull/12196) +* Added new Chakra-ui Skeleton. [PR](https://github.com/meteor/meteor/pull/12181) +* Added new Solid Skeleton. [PR](https://github.com/meteor/meteor/pull/12186) + +#### Breaking Changes +N/A + +#### Migration Steps +Read our [Migration Guide](https://guide.meteor.com/2.8-migration.html) for this version. + +#### Meteor Version Release +* `modules@0.19.0`: + - Updating reify version. [PR](https://github.com/meteor/meteor/pull/12055). +* `minimongo@1.9.0`: + - New methods to work with the Async API. [PR](https://github.com/meteor/meteor/pull/12028). + - Solved invalid dates in Minimongo Matcher [PR](https://github.com/meteor/meteor/pull/12165). +* `mongo@1.16.0`: + - Adding async counterparts that allows gradual migration from Fibers. [PR](https://github.com/meteor/meteor/pull/12028). + - Improved oplogV2V1Converter implementation. [PR](https://github.com/meteor/meteor/pull/12116). + - Exit on MongoDB connection error. [PR](https://github.com/meteor/meteor/pull/12115). + - Fixed MongoConnection._onFailover hook. [PR](https://github.com/meteor/meteor/pull/12125). + - Fixed handling objects in oplogV2V1Converter. [PR](https://github.com/meteor/meteor/pull/12107). +* `meteor@1.10.1`: + - Create method to check if Fibers is enabled by flag DISABLE_FIBERS. [PR](https://github.com/meteor/meteor/pull/12100). + - Fix bugs for linter build plugins. [PR](https://github.com/meteor/meteor/pull/12120). + - Document meteor show METEOR. [PR](https://github.com/meteor/meteor/pull/12124). + - Update Cordova Android to 10.1.2. [PR](https://github.com/meteor/meteor/pull/12131). + - Fixed flaky test. [PR](https://github.com/meteor/meteor/pull/12129). + - Refactoring/Remove unused imports from tools folder. [PR](https://github.com/meteor/meteor/pull/12084). + - Fix problem when publishing async methods. [PR](https://github.com/meteor/meteor/pull/12152). + - Update skeletons Apollo[PR](https://github.com/meteor/meteor/pull/12091) and other skeletons [PR](https://github.com/meteor/meteor/pull/12099) + - Added callAsync method for calling async methods [PR](https://github.com/meteor/meteor/pull/12196). +* `meteor-installer@2.7.5`: + - Validates required Node.js version. [PR](https://github.com/meteor/meteor/pull/12066). +* `npm-mongo@4.9.0`: + - Updated MongoDB driver to 4.9. [PR](https://github.com/meteor/meteor/pull/12163). +* `@meteorjs/babel@7.17.0` + - Upgrade TypeScript to `4.6.4` +* `babel-compiler@7.10.0` + - Upgrade TypeScript to `4.6.4` +* `ecmascript@0.16.3` + - Upgrade TypeScript to `4.6.4` +* `typescript@4.6.4` + - Upgrade TypeScript to `4.6.4` +* `eslint-plugin-meteor@7.4.0` + - Upgrade TypeScript to `4.6.4` + +#### Independent Releases +* `accounts-passwordless@2.1.3`: + - Fixing bug where tokens where never expiring. [PR](https://github.com/meteor/meteor/pull/12088). +* `accounts-base@2.2.4`: + - Adding new options to the `Accounts.config()` method: `loginTokenExpirationHours` and `tokenSequenceLength`. [PR](https://github.com/meteor/meteor/pull/12088). +* `Meteor Repo`: + - Included githubactions in the dependabot config. [PR](https://github.com/meteor/meteor/pull/12061). + - Visual rework in meteor readme. [PR](https://github.com/meteor/meteor/pull/12133). + - Remove useraccounts from Guide. [PR](https://github.com/meteor/meteor/pull/12090). +* `minifier-css@1.6.1`: + - Update postcss package to avoid issues with `Browserslist` and `caniuse-lite`. [PR](https://github.com/meteor/meteor/pull/12136). +* `minifier-js@2.7.5`: + - Update terser package due to security fixes and to take advantage of terser improvements. [PR](https://github.com/meteor/meteor/pull/12137). +* `standard-minifier-css@1.8.2`: + - Update dependencies to avoid issues with `Browserslist` and `caniuse-lite`. [PR](https://github.com/meteor/meteor/pull/12141). +* `standard-minifier-js@2.8.1`: + - Update dependencies to avoid issues with `Browserslist` and `caniuse-lite`. [PR](https://github.com/meteor/meteor/pull/12142). +* `ddp-server@2.5.1`: + - Rename setPublicationStrategy and getPublicationStrategy arguments. [PR](https://github.com/meteor/meteor/pull/12166). + +#### Special thanks to +- [@fredmaiaarantes](https://github.com/fredmaiaarantes) +- [@radekmie](https://github.com/radekmie) +- [@naveensrinivasan](https://github.com/naveensrinivasan) +- [@zodern](https://github.com/zodern) +- [@brucejo75](https://github.com/brucejo75) +- [@matheusccastroo](https://github.com/matheusccastroo) +- [@victoriaquasar](https://github.com/victoriaquasar) +- [@StorytellerCZ](https://github.com/StorytellerCZ) +- [@Grubba27](https://github.com/Grubba27) +- [@denihs](https://github.com/denihs) +- [@edimarlnx](https://github.com/edimarlnx) + +For making this great framework even better! + +## v2.7.3, 2022-05-3 + +#### Highlights +* `accounts-passwordless@2.1.2`: + - Throwing an error when the login tokens are not generated well calling requestLoginTokenForUser. [PR](https://github.com/meteor/meteor/pull/12047/files). +* Node updated to v14.19.3 +* npm update to v6.14.17 +* Fix recompiling npm packages for web arch. [PR](https://github.com/meteor/meteor/pull/12023). + +#### Breaking Changes +N/A + +#### Migration Steps + +#### Meteor Version Release +* `accounts-passwordless@2.1.2`: + - Throwing an error when the login tokens are not generated well calling requestLoginTokenForUser. [PR](https://github.com/meteor/meteor/pull/12047/files). +* `babel-runtime@1.5.1`: + - Make client 25kb smaller. [PR](https://github.com/meteor/meteor/pull/12051). +* Node updated to v14.19.3 +* npm update to v6.14.17 +* Fix win style paths being added to watch sets. +* Fix recompiling npm packages for web arch. [PR](https://github.com/meteor/meteor/pull/12023). + +## v2.7.2, 2022-05-10 + +#### Highlights + +#### Breaking Changes +N/A +#### Migration Steps + +#### Meteor Version Release + +* `mongo@1.15.0` + - New option `Meteor.settings.packages.mongo.reCreateIndexOnOptionMismatch` for case when an index with the same name, but different options exists it will be re-created. + - If there is an error on index creation Meteor will output a better message naming the collection and index where the error occured. [PR](https://github.com/meteor/meteor/pull/11995). +* `modern-browsers@0.1.8` + - New api `getMinimumBrowserVersions` to access the `minimumBrowserVersions`. [PR](https://github.com/meteor/meteor/pull/11998). +* `socket-stream-client@0.5.0` + - Ability to disable sockjs on client side. [PR](https://github.com/meteor/meteor/pull/12007/). +* `meteor-node-stubs@1.2.3`: + - Fix using meteor-node-stubs in IE. [PR](https://github.com/meteor/meteor/pull/12014). +* New ARCH environment variable that permit users to set uname info. [PR](https://github.com/meteor/meteor/pull/12020). +* Skeleton dependencies updated. +* New Tailwind skeleton. [PR](https://github.com/meteor/meteor/pull/12000). + +#### Independent Releases + +## v2.7.1, 2022-03-31 + +#### Highlights + +#### Breaking Changes + +* `accounts-2fa@2.0.0` + - The method `has2faEnabled` no longer takes a selector as an argument, just the callback. + - `generate2faActivationQrCode` now throws an error if it's being called when the user already has 2FA enabled. + +#### Migration Steps + +#### Meteor Version Release + +* `accounts-2fa@2.0.0` + - Reduce one DB call on 2FA login. [PR](https://github.com/meteor/meteor/pull/11985) + - Throw error when user is not found on `Accounts._is2faEnabledForUser` + - Remove vulnerability from the method `has2faEnabled` + - Now the package auto-publish the field `services.twoFactorAuthentication.type` for logged in users. +* `accounts-password@2.3.1` + - Use method `Accounts._check2faEnabled` when validating 2FA +* `accounts-passwordless@2.1.1` + - Use method `Accounts._check2faEnabled` when validating 2FA +* `oauth@2.1.2` + - Check effectively if popup was blocked by browser. [PR](https://github.com/meteor/meteor/pull/11984) +* `standard-minifier-css@1.8.1` + - PostCSS bug fixes. [PR](https://github.com/meteor/meteor/pull/11987/files) + +#### Independent Releases + +## v2.7, 2022-03-24 + +#### Highlights +* Bump node version to 14.19.1 +* TailwindCSS 3.x support +* Typescript `4.5.4` upgrade +* New core package: `accounts-2fa` +* Support for 2FA in `accounts-password` and `accounts-passwordless` +* PostCSS's plugins are run by `standard-minifier-css` if the app has PostCSS configured +* App skeletons and test packages were updated to `meteor-node-stubs@1.2.1` + +#### Breaking Changes + +N/A + +#### Migration Steps + +Read our [Migration Guide](https://guide.meteor.com/2.7-migration.html) for this version. + +#### Meteor Version Release + +* `standard-minifier-css@1.8.0` + - Runs PostCSS plugins if the app has a PostCSS config and the `postcss-load-config` npm package installed. Supports TailwindCSS 3.x [PR 1](https://github.com/Meteor-Community-Packages/meteor-postcss/pull/56) [PR 2](https://github.com/meteor/meteor/pull/11903) + +* `react-fast-refresh@0.2.3` + - Fix tracking states with circular dependencies. [PR](https://github.com/meteor/meteor/pull/11923) + +* `accounts-2fa@1.0.0` + - New package to provide 2FA support + +* `accounts-password@2.3.0` + - 2FA support + +* `accounts-passwordless@2.1.0` + - 2FA support + +* `@meteorjs/babel@7.16.0` + - Upgrade TypeScript to `4.5.4` + +* `babel-compiler@7.9.0` + - Upgrade TypeScript to `4.5.4` + +* `ecmascript@0.16.2` + - Upgrade TypeScript to `4.5.4` + +* `typescript@4.5.4` + - Upgrade TypeScript to `4.5.4` [PR](https://github.com/meteor/meteor/pull/11846) + +* `accounts-ui-unstyled@1.6.0` + - `Accounts.ui.config` can now be set via `Meteor.settings.public.packages.accounts-ui-unstyled`. + +* `meteor-tool@2.7` + - CSS minifiers must now handle any caching themselves [PR](https://github.com/meteor/meteor/pull/11882) + - CSS minifiers are always given lazy css resources instead of only during production builds [PR](https://github.com/meteor/meteor/pull/11897) + - Files passed to CSS minifiers now have `file.readAndWatchFileWithHash`, same as for compilers [PR](https://github.com/meteor/meteor/pull/11882) + - If a minifier has a `beforeMinify` function, it will be called once during each build before the minifier is run the first time [PR](https://github.com/meteor/meteor/pull/11882) + - Add `Plugin.fs.readdirWithTypesSync` [PR](https://github.com/meteor/meteor/pull/11882) + +* `ejson@1.1.2` + - Fixing error were EJSON.equals fail to compare object and array if first param is object and second is array. [PR](https://github.com/meteor/meteor/pull/11866), [Issue](https://github.com/meteor/meteor/issues/11864). + +* `oauth@1.4.1` + - If OAuth._retrieveCredentialSecret() fails trying to get credentials inside Accounts.oauth.tryLoginAfterPopupClosed(), we call it again once more. + +* `accounts-base@2.2.2` + - Fix an issue where an extra field defined in `defaultFieldSelector` would not get published to the client + - Proving the login results to the `_onLoginHook` when finishing login inside `callLoginMethod`. [PR](https://github.com/meteor/meteor/pull/11913). + +* `github-oauth@1.4.0` + - More data will be retrieved and saved under `services.github` on the user account. + - Add option to disallow sign-up on GitHub using `allow_signup` [parameter](https://docs.github.com/en/developers/apps/building-oauth-apps/authorizing-oauth-apps#parameters), this will be activated based on your Accounts settings, specifically if the option `forbidClientAccountCreation` is set to `true`. + +* `email@2.2.1` + - Throwing error when trying to send email in a production environment but without a mail URL set. [PR](https://github.com/meteor/meteor/pull/11891), [Issue](https://github.com/meteor/meteor/issues/11709). + +* `facebook-oauth@1.11.0` + - Updated Facebook API to version 12.0 + +* `google-oauth@1.4.2` + - Migrate from `http` to `fetch` + +* `modules-runtime@0.13.0` + - Fix some npm modules being imported as an empty object. [PR](https://github.com/meteor/meteor/pull/11954), [Issue 1](https://github.com/meteor/meteor/issues/11900), [Issue 2](https://github.com/meteor/meteor/issues/11853). + +* `meteor-node-stubs@1.2.1` + - Adds support for [node:](https://nodejs.org/api/esm.html#node-imports) imports. + +* `minifier-jss@2.8.0` + - Updating terser. It will fix this [issue](https://github.com/meteor/meteor/issues/11721) and [this](https://github.com/meteor/meteor/issues/11930) one. [PR](https://github.com/meteor/meteor/pull/11983). + +#### Independent Releases + +## v2.6.1, 2022-02-18 + +#### Highlights + +* Fix regression on build speed by updating babel dependencies to 7.17.x +* We have removed IE 9 from our browser test list +* We are changing the device used for testing, Samsung Galaxy S7, as browserstack is having issues provisioning it. We will be using now Samsung Galaxy Note 10. +* Fix issue when generating tarballs from Windows systems related to execute permissions +* Fix issues with HMR and meteor build --debug [PR](https://github.com/meteor/meteor/pull/11922) + + +#### Breaking Changes + +- IE 9 might not be compatible from now on, although, we will still consider PR's fixing it. + +#### Migration Steps + +#### Meteor Version Release + +* `meteor-tool@2.6.1` + - Use latest @meteor/babel dependency with @babel@7.17.x + +* `@meteorjs/babel@7.15.1` + - Use babel@7.17.x + +* `babel-compiler@7.8.1` + - Use latest @meteor/babel dependency with @babel@7.17.x + +* `hot-module-replacement@0.5.1` + - Fix issues with HMR and meteor build --debug [PR](https://github.com/meteor/meteor/pull/11922) + +* `webapp@1.13.1` + - Fix issues with HMR and meteor build --debug [PR](https://github.com/meteor/meteor/pull/11922) + +#### Independent Releases + +* `mongo@1.14.6` at 2022-02-18 + - Remove false-positive warning for supported operation a.0.b:{} +* `mongo@1.14.5` at 2022-02-16 + - Fix multiple array operators bug and add support for debug messages + - Fix isArrayOperator function regexp false-positive +* `mongo@1.14.4` at 2022-02-11 + - Fix sync return for insert methods inside _collection private method [PR](https://github.com/meteor/meteor/pull/11907) + - Support the new "projection" field inside the decision of using oplog for a published cursor or not [PR](https://github.com/meteor/meteor/pull/11908) +* `mongo@1.14.3` at 2022-02-08 + - Remove throw on _id exclusion inside mongo collection finds. [PR](https://github.com/meteor/meteor/pull/11894). +* `mongo@1.14.2` at 2022-02-06 + - Fix flatten object issue when internal object value is an array on oplog converter. [PR](https://github.com/meteor/meteor/pull/11888). +* `mongo@1.14.1` at 2022-02-04 + - Fix flatten object issue when the object is empty on oplog converter. [PR](https://github.com/meteor/meteor/pull/11885), [Issue](https://github.com/meteor/meteor/issues/11884). + +## v2.6, 2022-02-01 + +#### Highlights + +* MongoDB Node.js driver Upgrade from 3.6.10 to 4.3.1 +* MongoDB Server 5.x Support +* Embedded Mongo now uses MongoDB 5.0.5 +* You are now able to use dark theme specific splash screens for both iOS and Android by passing an object `{src: 'light-image-src-here.png', srcDarkMode: 'dark-mode-src-here.png'}` to the corresponding key in `App.launchScreens` + +#### Breaking Changes + +* `mongo@1.14.0` + - This is not a breaking change in Meteor itself but as this is a major upgrade in the MongoDB Node.js driver you should read the [Migration Guide](https://guide.meteor.com/2.6-migration.html), especially if you are using rawCollection. + +* `meteor-tool@2.6` + - Legacy launch screens keys for iOS on `App.launchScreens` are now deprecated in favor of new storyboard compliant keys [PR #11797](https://github.com/meteor/meteor/pull/11797). This will drop the following keys we have: `['iphone5','iphone6','iphone6p_portrait','iphone6p_landscape','iphoneX_portrait','iphoneX_landscape','ipad_portrait_2x','ipad_landscape_2x','iphone','iphone_2x','ipad_portrait','ipad_landscape']`. Read the [Migration Guide](https://guide.meteor.com/2.6-migration.html) for more details. + +#### Migration Steps + +Read our [Migration Guide](https://guide.meteor.com/2.6-migration.html) for this version. + +#### Meteor Version Release + +* `mongo@1.14.0` + - `applySkipLimit` option for count() on find cursors is no longer supported. Read more about it [here](https://guide.meteor.com/2.6-migration.html), in the `Cursor.count()` section. + - internal result of operations inside Node.js MongoDB driver have changed. If you are depending on rawCollection results (not only the effect inside the DB), please review the expected format as we have done [here](https://github.com/meteor/meteor/blob/155ae639ee590bae66237fc1c29295072ec92aef/packages/mongo/mongo_driver.js#L658) + - useUnifiedTopology is not an option anymore, it defaults to true. + - native parser is not an option anymore, it defaults to false in the mongo connection. + - poolSize not an option anymore, we are using max/minPoolSize for the same behavior on mongo connection. + - fields option is deprecated, we are maintaining a translation layer to "projection" field (now prefered) until the next minor version, where we will start showing alerts. + - _ensureIndex is now showing a deprecation message + - we are maintaining a translation layer for the new oplog format, so if you read or rely on any behavior of it please read our oplog_v2_converter.js code + - update/insert/remove behavior is maintained in the Meteor way, documented in our docs, but we are now using replaceOne/updateOne/updateMany internally. This is subject to changes in the API rewrite of MongoDB without Fibers AND if you are using rawCollection directly you have to review your methods otherwise you will see deprecation messages if you are still using the old mongodb style directly. + - waitForStepDownOnNonCommandShutdown=false is not needed anymore when spawning the mongodb process + - _synchronousCursor._dbCursor.operation is not an option anymore in the raw cursor from nodejs mongodb driver. If you want to access the options, use _synchronousCursor._dbCursor.(GETTERS) - for example, _synchronousCursor._dbCursor.readPreference. + - the default write preference for replica sets on mongo v5 is w:majority + - If you are using MongoDB inside a Docker container in your dev environment, you might need to append directConnection=true in your mongouri to avoid the new mongo driver Service Discovery feature + +* `allow-deny@1.1.1` + - Handle `MongoBulkWriteError` as `BulkWriteError` was already handled. + +* `meteor-tool@2.6.0` + - Cordova changes to support new Launch Screens. + - Mongo changes to support new embedded version, 5.0.5. + - Fix resolving npm deps of local packages when on different drive. [PR](https://github.com/meteor/meteor/pull/11868) + +* `minimongo@1.8.0` + - Changes to keep everything compatible with MongoDB Server 5.x and MongoDB Node.js driver 4.x. + +* `npm-mongo@4.3.1` + - Upgraded MongoDB Node.js driver to 4.3.1 + +* `tinytest@1.2.1` + - Custom message support for `throws` + +#### Independent Releases + +## v2.5.8, 2022-05-31 + +#### Highlights + +* Fixed 2.5.7 MongoDB error +* Patch release to update Node to version 14.19.3 and npm version to 6.14.17. + +#### Breaking Changes + +- N/A + +#### Migration Steps + +- N/A + +## v2.5.7, 2022-05-31 + +#### Highlights + +* Patch release to update Node and npm versions. + +#### Breaking Changes + +- N/A + +#### Migration Steps + +- N/A + +#### Meteor Version Release + +* `meteor-tool@2.5.7` + - Patch release to update Node and npm versions. + +## v2.5.6, 2022-01-25 + +#### Highlights + +* Go back to using node-fibers mainline dependency instead of a fork. Also ships fibers binaries. + +#### Breaking Changes + +- N/A + +#### Migration Steps + +- N/A + +#### Meteor Version Release + +* `meteor-tool@2.5.6` + - Go back to using node-fibers mainline dependency instead of a fork. Also ships fibers binaries. + +## v2.5.5, 2022-01-18 + +#### Highlights + +* Bump node version to 14.18.3 - security patch +* Change the tar implementation for streams, used on deploying and unpacking packages. Reduced "upload bundle" time when deploying is expected. + +#### Breaking Changes + +- N/A + +#### Migration Steps + +- N/A + +#### Meteor Version Release + +* `meteor-tool@2.5.5` + - Bump node version to 14.18.3 - security patch + - Change the tar implementation for streams, used on deploying and unpacking packages. Reduced "upload bundle" time when deploying is expected. + +* `accounts-base@2.2.1` + - Fixes onLogin firing twice. [PR](https://github.com/meteor/meteor/pull/11785) and [Issue](https://github.com/meteor/meteor/issues/10853) + +#### Independent Releases + +* `oauth@2.1.1` + - Fixes end of redirect response for oauth inside iframes. [PR](https://github.com/meteor/meteor/pull/11825) and [Issue](https://github.com/meteor/meteor/issues/11817) + +## v2.5.4, 2022-01-14 + +This version should be ignored. Proceed to 2.5.5 above. + +## v2.5.3, 2022-01-04 + +#### Highlights + +* Fixes invalid package.json error with `resolve` + +#### Breaking Changes + +- N/A + +#### Migration Steps + +- N/A + +#### Meteor Version Release + +* `meteor-tool@2.5.3` + - Fixes invalid package.json files breaking Meteor run. [PR](https://github.com/meteor/meteor/pull/11832) and [Issue](https://github.com/meteor/meteor/issues/11830) + +#### Independent Releases + +## v2.5.2, 2021-12-21 + +#### Highlights + +* Reify performance improvements +* Node.js update to 14.18.2 +* HMR Fixes + +#### Breaking Changes + +* If a module calls `module.hot.decline()`, calling `module.hot.accept()` later now does nothing instead of overriding `module.hot.decline()`. + +#### Migration Steps + +- N/A + +#### Meteor Version Release + +* `meteor-tool@2.5.2` + - Changes @meteorjs/babel and @meteorjs/reify to improve Reify performance. + - Upgrades Node.js to 14.18.2 + - Fixes isopacket [load failure](https://github.com/meteor/meteor/issues/10930) on Windows. [PR](https://github.com/meteor/meteor/pull/11740) + +* `hot-module-replacement@0.5.0` + - Prevents hot.accept from overriding hot.decline. [PR](https://github.com/meteor/meteor/pull/11801) + - Fixes falling back to hot code push on web archs. [PR](https://github.com/meteor/meteor/pull/11795) + +* `@meteorjs/babel@7.15.0` + - Updates @meteorjs/reify to improve Reify performance. + +* `@meteorjs/reify@0.23.0` + - Uses `@meteorjs/reify` instead of `reify` + - Check scope when wrapping to fix slowness in MUI v5. [PR](https://github.com/meteor/reify/pull/1) and [Issue](https://github.com/benjamn/reify/issues/277). + +* `standard-minifier-js@2.8.0` + - Bump to apply improvements from Reify + +* `typescript@4.4.1` + - Bump to apply improvements from Reify + +* `babel-compiler@7.8.0` + - Bump to apply improvements from Reify + +* `ecmascript@0.16.1` + - Bump to apply improvements from Reify + +* `modules@0.18.0` + - Bump to apply improvements from Reify + +#### Independent Releases + +* `react-fast-refresh@0.2.2` + - [Fixes](https://github.com/meteor/meteor/issues/11744) bugs. [PR](https://github.com/meteor/meteor/pull/11794/) + +* `accounts-ui@1.4.2` + - Update usage of `accounts-passwordless` to be compatible with 2.0.0. + +* `minifier-js@2.7.3` + - Revert `evaluate` option that was set to false in 2.7.2. + +* `standard-minifier-js@2.7.3` + - Using `minifier-js@2.7.3` + + +* `npm-mongo@4.2.1` + - Update MongoDB driver version to 4.2.1 + +## v2.5.1, 2021-11-17 + +#### Highlights +- Mac M1 Support - darwin arm64. [Read more](https://blog.meteor.com/). + +#### Breaking Changes +- `Meteor.loginWithToken` from the new package `accounts-passwordless` was conflicting with another method with the same name on `accounts-base` so we had to rename the method of `accounts-passwordless` package to `Meteor.passwordlessLoginWithToken`. + +#### Meteor Version Release + +* `meteor-tool@2.5.1` + - Meteor supports now Mac M1 chips (darwin arm64) + +* `accounts-passwordless@2.0.0` + - `Meteor.loginWithToken` from the new package `accounts-passwordless` was conflicting with another method with the same name on `accounts-base` so we had to rename the method of `accounts-passwordless` package to `Meteor.passwordlessLoginWithToken`. + +#### Independent Releases +* `minifier-js@2.7.2` + - Stopped using `evaluate` option in the compression to fix a [bug](https://github.com/meteor/meteor/issues/11756). + - Updated `terser` to [v5.9.0](https://github.com/terser/terser/blob/master/CHANGELOG.md#v590) to fix various bugs + +* `standard-minifier-js@2.7.2` + - Using `minifier-js@2.7.2` + +* `github-oauth@1.3.2` + - Migrate from `http` to `fetch` + - Fix GitHub login params to adhere to changes in GitHub API + +## v2.5, 2021-10-21 + +#### Highlights + +* New package: `accounts-passwordless` +* Cordova Android v10 +* HMR now works on all architectures and legacy browsers +* `Accounts.config()` and third-party login services can now be configured from Meteor settings + +#### Breaking Changes + +* Cordova Android v10 now enables AndroidX. If you use any cordova-plugin that depends or uses any old support library, you need to include the cordova-plugin-androidx-adapter cordova-plugin, otherwise you will get build errors. + +#### Meteor Version Release + +* CircleCI testing image was updated to include Android 30 and Node 14 + +* `meteor-tool@2.5` + - Cordova Android upgraded to v10 + - HMR improvements related to `hot-module-replacement@0.4.0` + - Fix finding local packages on Windows located on drives other than C + - Fix infinite loop in import scanner when file is on a different drive than source root + - Fix Meteor sometimes not detecting changes to a file after the first time it is modified + - Fixes Meteor sometimes hanging on Windows. Reverts the temporary fix in Meteor 2.4 of disabling native file watchers for some commands + - Uses recursive file watchers on Windows and macOS. In most situations removes the up to 5 seconds delay before detecting the first change to a file, and is more efficient. + - Node updated to [v14.18.1](https://nodejs.org/en/blog/release/v14.18.1/), following [October 12th 2021 security release](https://nodejs.org/en/blog/vulnerability/oct-2021-security-releases/) + - Skeletons had their dependencies updated + +* `accounts-passwordless@1.0.0` + - New accounts package to provide passwordless authentication. + +* `accounts-password@2.2.0` + - Changes to reuse code between passwordless and password packages. + +* `accounts-base@2.2.0` + - You can now apply all the settings for `Accounts.config` in `Meteor.settings.packages.accounts-base`. They will be applied automatically at the start of your app. Given the limitations of `json` format you can only apply configuration that can be applied via types supported by `json` (ie. booleans, strings, numbers, arrays). If you need a function in any of the config options the current approach will still work. The options should have the same name as in `Accounts.config`, [check them out in docs.](https://docs.meteor.com/api/accounts-multi.html#AccountsCommon-config). + - Changes to reuse code between passwordless and password packages. + +* `accounts-ui-unstyled@1.6.0` + - Add support for `accounts-passwordless`. + +* `service-configuration@1.3.0` + - You can now define services configuration via `Meteor.settings.packages.service-configuration` by adding keys as service names and their objects being the service settings. You will need to refer to the specific service for the settings that are expected, most commonly those will be `secret` and `appId`. + +* `autoupdate@1.8.0` + - Enable HMR for all web arch's + +* `ecmascript@0.16.0` + - Enable HMR for all web arch's + +* `hot-module-replacement@0.4.0` + - Provides polyfills needed by Meteor.absoluteUrl in legacy browsers + - Improvements for HMR to work in all architectures and legacy browsers + +* `module-runtime@0.14.0` + - Improvements for legacy browsers + +* `react-fast-refrest@0.2.0` + - Enable HMR for all web arch's + +* `typescript@4.4.0` + - Enable HMR for all web arch's + +* `webapp@1.13.0` + - Update `cordova-plugin-meteor-webapp` to v2 + - Removed dependency on `cordova-plugin-whitelist` as it is now included in core + - Cordova Meteor plugin is now using AndroidX + - Added new settings option `Meteor.settings.packages.webapp.alwaysReturnContent` that will always return content on requests like `POST`, essentially enabling behavior prior to Meteor 2.3.1. + +#### Independent Releases + +* `modern-browsers@0.1.6` + - Added `mobileSafariUI` as an alias for Mobile Safari + +* `minifier-js@2.7.1` + - Updated `terser` to [v5.8.0](https://github.com/terser/terser/blob/master/CHANGELOG.md#v580) to fix various bugs + +* `standard-minifier-js@2.7.1` + - Updated `@babel/runtime` to [v7.15.4](https://github.com/babel/babel/releases/tag/v7.15.4) + +* `accounts-ui@1.4.1` + - Update compatibility range with `less` from 3.0.2 to 4.0.0 + +* `accounts-ui-unstyled@1.5.1` + - Update compatibility range with `less` from 3.0.2 to 4.0.0 + +* `google-config-ui@1.0.3` + - Deliver siteUrl in the same way as other config-ui packages + +* `ecmascript-runtime-client@0.12.1` + - Revert `core-js` to v3.15.2 due to issues in legacy build with arrays, [see issue for more details](https://github.com/meteor/meteor/issues/11662) + +* `modern-browsers@0.1.7` + - Added `firefoxMobile` as an alias for `firefox` + +* `dynamic-import@0.7.2` + - Fixes 404 in dynamic-import/fetch when ROOT_URL is set with a custom path. [see issue](https://github.com/meteor/meteor/issues/11701) + +## v2.4.1, 2021-10-12 + +#### Meteor Version Release + +* `meteor-tool@2.4.1` + - Patch to make 2.4.1 compatible with Push to Deploy feature in Galaxy (Meteor Cloud) + +## v2.4, 2021-09-15 + +#### Highlights + +* Typescript updated to [v4.3.5](https://github.com/Microsoft/TypeScript/releases/tag/v4.3.5) +* Email package now allows setting `Email.customTransport` to override sending method. +* Use `createIndex` instead of `_ensureIndex` to align with new MongoDB naming. +* Apollo skeleton has been upgraded for [Apollo server v3](https://github.com/apollographql/apollo-server/blob/main/CHANGELOG_historical.md#v300) +* `reify` has been updated to v0.22.2 which reduces the overhead of `import` statements and some uses of `export ... from`, especially when a module is imported a large number of times or re-exports a large number of exports from other modules. PRs [1](https://github.com/benjamn/reify/pull/246), [2](https://github.com/benjamn/reify/pull/291) +* Meteor NPM installer is [now available for all platforms](https://github.com/meteor/meteor/pull/11590). +* DDP server now allows you to set publication strategies for your publications to control mergebox behavior +* On Windows Meteor should no longer be hanging on commands + +#### Migration steps + +1. Replace all usage of `collection._ensureIndex` with `collection.createIndex`. You only need to rename the method as the functionality is the same. +2. If you are using a [well known service](https://nodemailer.com/smtp/well-known/) for the email package switch to using `Meteor.settings.packages.email` settings instead of `MAIL_URL` env variable. Alternatively you can utilize the new `Email.customTransport` function to override the default package behavior and use your own. [Read the email docs](https://docs.meteor.com/api/email.html) for implementation details. + +#### Meteor Version Release + +* Skeletons dependencies updated + +* `meteor-tool@2.4` + - `meteor show` now reports if a package is deprecated + - `reify` update to v0.22.2 which bring optimizations for imports. PRs [1](https://github.com/benjamn/reify/pull/246), [2](https://github.com/benjamn/reify/pull/291) + - Apollo skeleton now uses [Apollo server v3](https://github.com/apollographql/apollo-server/blob/main/CHANGELOG.md#v300) - [migration guide](https://www.apollographql.com/docs/apollo-server/migration/) + - Upgraded `chalk` to v4.1.1 + - Typescript updated to [v4.3.5](https://github.com/Microsoft/TypeScript/releases/tag/v4.3.5) + - `METEOR_SETTINGS` is now accepted an all modes + - Native file watchers are now disabled on Windows for many file-intensive actions (like, `create`, `update`, `build` etc.), this solves an issue with hanging Meteor commands on Windows + +* `webapp@1.12` + - npm dependencies have been updated + - Added hook to change runtime config delivered to the client app, [read more](https://github.com/meteor/meteor/pull/11506) + - Added hook to get notified when the app is updated, [read more](https://github.com/meteor/meteor/pull/11607) + - `@vlasky/whomst@0.1.7` + - Added `addUpdateNotifyHook` that gets called when runtime configuration is updated + +* `logging@1.3.0` + - Switch from `cli-color` to `chalk` to have the same dependency as meteor-tool + - Fix detecting eval + - Copy over code from `Meteor._debug` to `Log.debug` which will be deprecated in the future + +* `email@2.2` + - Modernized package code + - Add alternative API function that you can hook into to utilize your own sending method: `Email.customTransport`. [Read the docs](https://docs.meteor.com/api/email.html#Email-customTransport) + - Use `Meteor.settings` for easy setup to sending email via [known providers](https://nodemailer.com/smtp/well-known/). [Read the docs](https://docs.meteor.com/api/email.html) + +* `ddp-server@2.5.0` + - One of three different publication strategies can be selected for any Meteor publication - SERVER_MERGE, NO_MERGE and NO_MERGE_NO_HISTORY. These control the behaviour of the Meteor mergebox, providing a compromise between client-server bandwidth usage and server side memory usage. [See PR](https://github.com/meteor/meteor/pull/11368) or [the documentation](https://docs.meteor.com/api/pubsub.html#Publication-strategies) for more details. + +* `mongo@1.13.0` + - Add `createIndex` as a collection function (in MongoDB since MongoDB v3). This is a new name for `_ensureIndex` which MongoDB has deprecated and removed in MongoDB 5.0. Use of `_ensureIndex` will show a deprecation warning on development. + +* `accounts-base@2.1.0` + - Migrated usage of `_ensureIndex` to `createIndex` + +* `accounts-oauth@1.4.0` + - Migrated usage of `_ensureIndex` to `createIndex` + +* `accounts-password@2.1.0` + - Migrated usage of `_ensureIndex` to `createIndex` + +* `oauth@2.1.0` + - Migrated usage of `_ensureIndex` to `createIndex` + +* `oauth1@1.5.0` + - Migrated usage of `_ensureIndex` to `createIndex` + +* `facebook-oauth@1.10.0` + - Added login handler hook, like in the Google package for easier management in React Native and similar apps. [PR](https://github.com/meteor/meteor/pull/11603) + +* `service-configuration@1.5.0` + - Migrated usage of `_ensureIndex` to `createIndex` + +* `ecmascript-runtime-client@0.12.0` + - `core-js@3.16.0` + +* `ecmascript-runtime-server@0.11.0` + - `core-js@3.16.0` + +* `ecmascript-runtime@0.8.0` + - Version bump to ensure changes from server & client runtime get propagated. + +* `tinytest@1.2.0` + - Add option to temporarily replace `Tinytest.add` or `Tinytest.addAsync` by `Tinytest.only` or `Tinytest.onlyAsync` so only the tests added using `only*` are going to be executed. + +* `test-helpers@1.3.0` + - Support for `Tinytest.only` and `Tinytest.onlyAsync` + +* `modules@0.17.0` + - Update `reify` to `0.22.2` + +* `standard-minifier-js@2.7.0` + - `@babel/runtime@7.15.3` + - Code modernization + - Improved error handling + +* `minifier-js@2.7.0` + - Added tests + - Code modernization + +* `standard-minifier-css@1.7.4` + - `@babel/runtime@7.15.3` + +* `minifier-css@1.6.0` + - Updated dependencies + - `postcss@8.3.5` + - `cssnano@4.1.11` + +* `callback-hook@1.4.0` + - Added `forEach` iterator to be more in-line with the ES use for iterations. `each` is now deprecated, but will remain supported. + +## v2.3.7, 2021-10-12 + +#### Meteor Version Release + +* `meteor-tool@2.3.7` + - Patch to make 2.3.7 compatible with Push to Deploy feature in Galaxy (Meteor Cloud) + +## v2.3.6, 2021-09-02 + +#### Highlights + +* Updated Node.js per [August 31st security release](https://nodejs.org/en/blog/vulnerability/aug-2021-security-releases2/) + +#### Meteor Version Release + +* `meteor-tool@2.3.6` + - Node.js updated to [v14.17.6](https://nodejs.org/en/blog/release/v14.17.6/) + +#### Independent Releases + +* `minifier-js@2.6.1` + - Terser updated to [4.8.0](https://github.com/terser/terser/blob/master/CHANGELOG.md#v480) + +* `routepolicy@1.1.1` + - Removed `underscore` dependency since it was not used in the package + +* `email@2.1.1` + - Updated `nodemailer` to v6.6.3 + +* `callback-hook@1.3.1` + - Modernized the code + - Fixed a variable assignment bug in `dontBindEnvironment` function + +* `less@4.0.0` + - Updated `less` to v4.1.1 + - Fixed tests + +* `npm-mongo@3.9.1` + - `mongodb@3.6.10` + +* `accounts-base@2.0.1` + - Create index on `services.password.enroll.when` + - Blaze weak dependency updated to v2.5.0 + +* `facebook-oauth@1.9.1` + - Allow usage of `http` package both v1 and v2 for backward compatibility + +* `github-oauth@1.3.1` + - Allow usage of `http` package both v1 and v2 for backward compatibility + +* `google-oauth@1.3.1` + - Allow usage of `http` package both v1 and v2 for backward compatibility + +* `meetup-oauth@1.1.1` + - Allow usage of `http` package both v1 and v2 for backward compatibility + +* `meteor-developer-oauth@1.3.1` + - Allow usage of `http` package both v1 and v2 for backward compatibility + +* `weibo-oauth@1.3.1` + - Allow usage of `http` package both v1 and v2 for backward compatibility + +* `oauth1@1.4.1` + - Allow usage of `http` package both v1 and v2 for backward compatibility + - Blaze weak dependency updated to v2.5.0 + +* `ddp-server@2.4.1` + - Fix a bug where `testMessageOnConnect` has always been sent + +* `accounts-password@2.0.1` + - Fix use of `isEnroll` in reset password + +* `mdg:geolocation@1.3.1` + - Fixed API to work with Meteor 2.3+ + +* `mdg:reload-on-resume@1.0.5` + - Fixed API to work with Meteor 2.3+ + +## v2.3.5, 2021-08-12 + +#### Highlights + +* Updated Node.js per the [August security release](https://nodejs.org/en/blog/vulnerability/aug-2021-security-releases/) +* Includes same improvements as in Meteor v2.2.3 + - Typescript updated to [v4.3.5](https://github.com/Microsoft/TypeScript/releases/tag/v4.3.5) + - `@meteorjs/babel@7.12.0` + +#### Meteor Version Release + +* `meteor-tool@2.3.5` + - Node.js updated to [v14.17.5](https://nodejs.org/en/blog/release/v14.17.5/) + - Typescript updated to [v4.3.5](https://github.com/Microsoft/TypeScript/releases/tag/v4.3.5) + - `@meteorjs/babel@7.12.0` + - Fix broken source maps in VSCode - [PR](https://github.com/meteor/meteor/pull/11584) + +## v2.3.4, 2021-08-03 + +* Fix an issue in `bare` and `vue` skeletons + +## v2.3.3, 2021-08-02 + +* Security patch of Node.js to [14.17.4](https://nodejs.org/en/blog/release/v14.17.4/) +* App skeletons had the following dependencies updated: + - `meteor-node-stubs@1.1.0` + - `@babel/runtime@7.14.8` +* `babel/parser@7.14.9` for server dev bundle + +## v2.3.2, 2021-07-13 + +#### Meteor Version Release + +* `meteor-tool@2.3.2` + - fixes a bug that makes `meteor run android` run with the new aab package flag + +## v2.3.1, 2021-07-08 + +#### Highlights + +* Fix windows issue when running webapp package. +* Node.js updated to 14.17.3, following [security release](https://nodejs.org/en/blog/vulnerability/july-2021-security-releases/) + +#### Breaking Changes + +* Meteor will now generate ".aab" (bundle files) by default when building for Android. This is the [new default format](https://android-developers.googleblog.com/2021/06/the-future-of-android-app-bundles-is.html) for Android apps. Use the new build flag `--packageType=apk` if you still need to generate APK. + +#### Meteor Version Release + +* Updated travis CI environment to use Node.js 14.17.3 + +* `meteor-tool@2.3.1` + - Node.js updated to [14.17.2](https://nodejs.org/en/blog/release/v14.17.2/) and [14.17.3](https://nodejs.org/en/blog/release/v14.17.3/) + - `@babel/runtime` dependency updated to v7.14.6 across the tool and testing apps + - Skeletons dependencies updated + - Apollo skeleton removed `apollo-boost` dependency which is no longer needed + - New build flag `--packageType` to choose between apk/bundle for android builds (defaults to bundle). + +#### Independent Releases + +* `webapp@1.11.1` + - Remove `posix` from npm shrinkwrap, to fix a bug it causes on Windows. + +* `less@3.0.2` + - Updated `@babel/runtime` to v7.14.6 + - Updated `less` to v3.11.3 + +* `standard-minifiers-css@1.7.3` + - Updated `@babel/runtime` to v7.14.6 + +* `standard-minifiers-js@2.6.1` + - Updated `@babel/runtime` to v7.14.6 + +* `dynamic-import@0.7.1` + - Fix [Safari 14 bug](https://bugs.webkit.org/show_bug.cgi?id=226547) with indexedDB + +## v2.3, 2021-06-24 + +#### Highlights + +* Node.js update to 14.17.1 from 12.22.1 🎉 + +* Typescript update to [4.3.2](https://devblogs.microsoft.com/typescript/announcing-typescript-4-3/) + +* Packages had their backward compatibility to before Meteor 1.0 removed. See below for more details. + +* Improved tracking of which files are used by build plugins to know when it should do a full rebuild, a faster client-only rebuild, or can completely skip rebuilding after a file is modified. This should work with any type of file in any directory, and for both files in the app and files in packages. The most noticeable improvement is when modifying a file only used on the client Meteor will only rebuild the client, even if the file is not inside `imports` or a `client` folder. + +### Summary of breaking changes + +- As Node.js version was upgraded to a new major version we recommend that you review if your npm dependencies are compatible with Node.js 14. + - If we receive reports from breaking changes we are going to list them here but so far we are not aware of any. + - We recommend that you read Node.js [release notes](https://nodejs.org/en/blog/release/v14.0.0/) though. + +- Accounts have undergone some major changes including major version bump. See below for more details. + +- All official packages that have been deprecated have now the deprecated flag and will inform you about that if you install or update them. + +- If you are working with enrollments in user accounts, do note that the enrollment token handling is now separate from reset password token. The token is now under `services.password.enroll`, so adjust your code accordingly if you use it. + +### Migration steps + +- As Node.js version was upgraded we recommend that you remove your `node_modules` folder (`rm -rf node_modules`) and run `meteor npm i` to be sure you compile all the binary dependencies again using the new Node.js version. + - Maybe you also want to recreate your lock file. + - If you get an error try `meteor reset` which will clear caches, beware that this will also remove your local DB for your app. + +- If you are maintaining a package that depends on one of the accounts packages which had a major version bump you will either need to set the new version manually or set `api.versionsFrom('2.3')`. + You can also have it reference its current version and 2.3 like this: `api.versionsFrom(['1.12', '2.3'])`, for specific package it can be like this: `api.use('accounts-base@1.0.1 || 2.0.0')`. + +- Old API for packages definitions has been removed. The old underscore method names (e.g. `api.add_files()`) will no longer work, please use the camel case method names (e.g. `api.addFiles()`). + +### Breaking changes +* Removed deprecated `mobile-port` flag + +* Removed deprecated `raw` name from `isobuild` + +* Removed deprecated package API method names `Package.on_use`, `Package.on_test`, `Package._transitional_registerBuildPlugin` and `api.add_files`, if you haven't till now, please use the current camel case versions. + +* `accounts-base@2.0.0` + - Deprecated backward compatibility function `logoutOtherClients` has been removed. + +* `accounts-password@2.0.0` + - Deprecated backward compatibility functionality for `SRP` passwords from pre-Meteor 1.0 days has been removed. + - Enroll account workflow has been separated from reset password workflow (the enrollment token records are now stored in a separate db field `services.password.enroll`). + +* `ddp-client@2.5.0` + - Removed deprecated backward compatibility method names for Meteor before 1.0 + +* `ddp-server@2.4.0` + - Removed deprecated backward compatibility method names for Meteor before 1.0 + +* `meteor-base@1.5.0` + - Removed `livedata` dependency which was there for packages build for 0.9.0 + +* `minimongo@1.7.0` + - Removed the `rewind` method that was noop for compatibility with Meteor 0.8.1 + +* `mongo@1.12.0` + - Removed the `rewind` method that was noop for compatibility with Meteor 0.8.1 + +* `oauth@2.0.0` + - Removed deprecated `OAuth.initiateLogin` and other functionality like the addition of `?close` in return URI for deprecated OAuth flow pre Meteor 1.0 + +* `markdown@2.0.0` + - Use lazy imports to prevent it from being added to the initial bundle + - This package is now deprecated + +* `http@2.0.0` + - Internally http has been replaced by [fetch](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API), should still work as previous version, but edge cases might be different. This is to aid you in transition to fetch. Note that this means that the `npmRequestOptions` parameter to `HTTP.call` has been removed, as `request` is no longer used internally. + +* `socket-stream-client@0.4.0` + - Remove IE8 checks + +#### Meteor Version Release + +* `meteor-tool@2.3` + - Node.js update to 14.17.1 from 12.22.1 🎉 + - This is a major upgrade in Node.js. See the [release notes](https://nodejs.org/en/blog/release/v14.0.0/) for more details. + - `npm` update to 6.14.13. + - `fibers` has been updated to v5.0.0. + - `promise` has been updated to v8.1.0. + - `node-gyp` has been updated to v8.0.0. + - `node-pre-gyp` has been updated to v0.15.0. + - `@babel/runtime` has been updated to v7.14.0. + - `request` has been updated to v2.88.2. + - `uuid` has been updated to v3.4.0. + - `graceful-fs` has been updated to v4.2.6. + - `tar` has been updated to v2.2.2. + - `sqlite3` has been updated to v5.0.2. + - `http-proxy` has been updated to v1.18.1. + - `wordwrap` has been updated to v1.0.0. + - `moment` has been updated to v2.29.1. + - `glob` has been updated to v7.1.6. + - `split2` has been updated to v3.2.2. + - `lru-cache` has been updated to v4.1.5. + - `anser` has been updated to v2.0.1. + - `xmlbuilder2` has been updated to v1.8.1. + - `ws` has been updated to v7.4.5. + - `underscore` has been updated to v1.13.1 + - `optimism` has been updated to v0.16.1 + - `@wry/context` has been update to v0.6.0 + - Reduced time spent by server (re)start in development by adding a cache for Reify. This optimization is on by default in development. Set the new `METEOR_TOOL_ENABLE_REIFY_RUNTIME_CACHE` and `METEOR_REIFY_CACHE_DIR` environment variables to adjust it or turn it on for production [read more in the PR](https://github.com/meteor/meteor/pull/11400). + - New flag `--platforms` has been added to the `build` command to specify the platform you want to build for. `meteor build . --platforms=android`. This is useful for example when you are not using a MacOS and you want to build your app only for Android. Also to save time on CI not building all the platforms all the time. See [PR](https://github.com/meteor/meteor/pull/11437) for details. + - The undocumented environment variable `DDP_DEFAULT_CONNECTION_URL` behavior has changed. Setting `DDP_DEFAULT_CONNECTION_URL` when running the server (development: `meteor run` or production: `node main.js`) sets the default DDP server value for meteor. But this did not work for `cordova` apps. Now you can define the `cordova` app default DDP server value by setting `DDP_DEFAULT_CONNECTION_URL` when building (`meteor build`). + - Skeletons dependencies updated to latest version + - Svelte skeleton now has HMR + - New deploy option: `--build-only`. Helpful if you want to build first and after some validations proceeding with the upload and deploy. [Read more](https://galaxy-guide.meteor.com/deploy-command-line.html#cache-only) + - Improved watched system to properly rebuild `client` even when a file is outside of `client` or `imports` folders. See [PR](https://github.com/meteor/meteor/pull/11474) for details. + - Fix an issue when `App.appendToConfig` crashed Cordova build. + - Reify compiler now uses cache in runtime. [Read more](https://github.com/meteor/meteor/pull/11400) + +* `launch-screen@1.3.0` + - Removes LaunchScreen from web clients. + +* `meteor-babel@7.11.0 (@meteorjs/babel)` + - Fixes for Samsung Internet v6.2+ to be considered modern browser and addition of [logical assignment operators](https://github.com/tc39/proposal-logical-assignment) via `babel-presets-meteor`. + - This package was renamed to `@meteorjs/babel`. + +* `hot-module-replacement@0.3.0` + - Fixes various HMR bugs and edge cases see [PR for more](https://github.com/meteor/meteor/pull/11405). + +* `email@2.1.0` + - Updates `nodemailer` to `6.6.0` and it now adds `charset=utf-8` to `text/plain` messages by default. + +* `server-render@0.4.0` + - Updated npm dependencies + +* `accounts-base@2.0.0` + - New hook `setAdditionalFindUserOnExternalLogin` has been added which allows you to customize user selection on external logins if you want to, for example, login a user who has the same e-mail as the external account. + +* `ddp-server@2.4.0` + - Added support for `this.unblock()` in `Meteor.publish()` context. See [PR](https://github.com/meteor/meteor/pull/11392) for more details. + - Add support in `Meteor.publish()` for async functions + +* `webapp@1.11.0` + - Webapp will respond appropriately to unsupported requests instead of sending content, including handling for new HTTP verbs. See [PR](https://github.com/meteor/meteor/pull/11224) for more details. + +#### Independent Releases + +* `ddp-server@2.3.3` + - Updates dependencies which removes Node's HTTP deprecation warning. + +* `socket-stream-client@0.3.2` + - Updates dependencies which removes Node's HTTP deprecation warning. + +* `ddp-client@2.4.1` + - Re-ordering fields in DDP message for better client readability. + +* `mongo@1.11.1` + - Fixes a `Timestamp.ONE is undefined` bug. + +* `mongo-id@1.0.8` + - Removes unused dependency `id-map`. + +* `accounts-server@1.7.1` + - To better test password format & limit password to 256 characters, you can change this limit by setting `Meteor.settings.packages.accounts.passwordMaxLength`. + +* `static-html@1.3.1` + - Removes `underscore` dependency. + +* `dev-error-overlay@0.1.1` + - Fixes sometimes page content being on top of error overlay. + +* `id-map@1.1.1` + - Removes unused dependencies and modernizing the code. + +* `http@1.4.4` + - Used the new deprecation package flag instead of loud console warning. + +* `logic-solver@2.0.8` + - Fixed `package.js` to use current `api` method calls. + +* `socket-stream-client@0.3.3` + - Update `faye-websocket` dependency to v0.11.4. + +* `jshint@1.1.8` + - The package has been deprecated. + +* `npm-bcrypt@0.9.4` + - The package has been deprecated. + +* `ecmascript-runtime-client@0.11.1` + - Updated `core-js` to v3.14.0 + +* `ecmascript-runtime-server@0.11.1` + - Updated `core-js` to v3.14.0 + +* `url@1.3.2` + - Updated `core-js` to v3.14.0 + +* `hot-module-replacement@0.2.1` + - Add missing dependency. + +* `observe-sequence@1.0.17` + - Updated dependencies + +* `observe-sequence@1.0.18` + - When `#each` argument is unsupported it will be shown + - Moving package under Blaze repository + +* `react-fast-refresh@0.1.1` + - Fixed the package to work in IE11 + +## v2.2.4, 2021-10-12 + +#### Meteor Version Release + +* `meteor-tool@2.2.4` + - Patch to make 2.2.4 compatible with Push to Deploy feature in Galaxy (Meteor Cloud) + +## v2.2.3, 2021-08-12 + +#### Highlights + +* Security update to Node.js [12.22.5](https://nodejs.org/en/blog/release/v12.22.5/) +* Typescript updated to [v4.3.5](https://github.com/Microsoft/TypeScript/releases/tag/v4.3.5) + +#### Meteor Version Release + +* `meteor-tool@2.3.3` + - Updated Node.js to 12.22.5 per [Node security update](https://nodejs.org/en/blog/vulnerability/aug-2021-security-releases/) + - Typescript updated to [v4.3.5](https://github.com/Microsoft/TypeScript/releases/tag/v4.3.5) + - `@meteorjs/babel@7.12.0` + +* `@meteorjs/babel@7.12.0` && `@meteorjs/babel@7.13.0` + - Dependencies updated to their latest versions + +* `babel-compile@7.7.0` + - `@meteorjs/babel@7.12.0` + +* `ecmascript@0.15.3` + - Typescript and Babel version bump + +* `typescript@4.3.5` + - [`typescript@4.3.5`](https://github.com/Microsoft/TypeScript/releases/tag/v4.3.5) + +## v2.2.2, 2021-08-02 + +#### Highlights + +- Security update to Node.js [12.22.4](https://nodejs.org/en/blog/release/v12.22.4/) + +## v2.2.1, 2021-06-02 + +#### Highlights + +- Node.js updated to [12.22.2](https://nodejs.org/en/blog/release/v12.22.2/) +- npm updated to 6.14.13 + +#### Meteor Version Release + +* `meteor-tool@2.2.1` + - Updated Node.js to 12.22.2 per [Node security update](https://nodejs.org/en/blog/vulnerability/july-2021-security-releases/) + +## v2.2, 2021-04-15 + +#### Highlights + +- MongoDB Update to 4.4.4 +- Cordova Update to 10 +- Typescript Update to 4.2.2 +- New skeleton: `meteor create myapp --svelte` + +### Breaking changes + +* N/A + +### Migration steps + +* `meteor-tool` maybe you need to install the new Visual C++ Redistributable for Visual Studio 2019 to run MongoDB 4.4.4 on Windows. [read more](https://docs.meteor.com/windows.html) + +* `mongo` package is now using useUnifiedTopology as `true` by default otherwise the new driver was producing a warning (see details below). It's important to test your app with this change. + +* `cordova` plugins and main libraries were updated from 9 to 10. It's important to test your app with these changes. + +* `typescript` was updated to 4.2.2, make sure your read the [breaking changes](https://devblogs.microsoft.com/typescript/announcing-typescript-4-2/#breaking-changes). + +#### Meteor Version Release + +* `meteor-tool@2.2` + - Update embedded MongoDB version to 4.4.4 [#11341](https://github.com/meteor/meteor/pull/11341) + - Maybe you need to install the new Visual C++ Redistributable for Visual Studio 2019 to run on Windows. [read more](https://docs.meteor.com/windows.html) + - Fix WindowsLikeFilesystem true when release string includes case insensitive word microsoft. [#11321](https://github.com/meteor/meteor/pull/11321) + - Fix absoluteFilePath on Windows. [#11346](https://github.com/meteor/meteor/pull/11346) + - New skeleton: `meteor create myapp --svelte` + - Update Blaze skeleton to use HMR + +* `npm-mongo@3.9.0` + - Update MongoDB driver version to 3.6.6 + +* `mongo@1.11.0` + - Using useUnifiedTopology as `true` by default to avoid the warning: `(node:59240) [MONGODB DRIVER] Warning: Current Server Discovery and Monitoring engine is deprecated, and will be removed in a future version. To use the new Server Discover and Monitoring engine, pass option { useUnifiedTopology: true } to the MongoClient constructor. You can still use it as false with `Mongo._connectionOptions` or `Meteor.settings?.packages?.mongo?.options`. + +* `cordova@10` + - Update Cordova to 10.0.0 [#11208](https://github.com/meteor/meteor/pull/11208) + +* `typescript@4.2.2` + - Update Typescript to 4.2.2, make sure your read the [breaking changes](https://devblogs.microsoft.com/typescript/announcing-typescript-4-2/#breaking-changes) [#11329](https://github.com/meteor/meteor/pull/11329) + +* `accounts-base@1.9.0` + - Allow to set token expiration to be set in milliseconds. [#11366](https://github.com/meteor/meteor/pull/11366) + +* `facebook-oauth@1.9.0` + - Upgrade default Facebook API to v10 & allow overriding this value. [#11362](https://github.com/meteor/meteor/pull/11362) + +* `minimongo@1.6.2` + - Add [$mul](https://docs.mongodb.com/manual/reference/operator/update/mul/#up._S_mul) to minimongo. [#11364](https://github.com/meteor/meteor/pull/11364) + +* `webapp@1.10.1` + - Fix for UNIX sockets with node cluster. [#11369](https://github.com/meteor/meteor/pull/11369) + + +## v2.1.2, 2021-10-12 + +#### Meteor Version Release + +* `meteor-tool@2.1.2` + - Patch to make 2.1.2 compatible with Push to Deploy feature in Galaxy (Meteor Cloud) + +## v2.1.1, 2021-04-06 + +### Changes + +#### Highlights + +- Node.js security [update](https://nodejs.org/en/blog/vulnerability/april-2021-security-releases/) to 12.22.1 + +#### Meteor Version Release + +* `meteor-tool@2.1.1` + - Node.js security [update](https://nodejs.org/en/blog/vulnerability/april-2021-security-releases/) to 12.22.1 + - npm update to 6.14.12 + +### Breaking changes + +* N/A + +### Migration steps + +* N/A + +## v2.1, 2021-02-24 + +### Changes + +#### Highlights + +- Node.js security [update](https://nodejs.org/en/blog/vulnerability/february-2021-security-releases/) to 12.21.0 + +#### Meteor Version Release + +* `meteor-tool@2.1` + - Node.js security [update](https://nodejs.org/en/blog/vulnerability/february-2021-security-releases/) to 12.21.0 + - `meteor create my-app --plan professional` new flag `plan` to enable you to choose a plan from the deploy command. + +### Breaking changes + +* N/A + +### Migration steps + +* N/A + +## v2.0.1, 2021-10-12 + +#### Meteor Version Release + +* `meteor-tool@2.0.1` + - Patch to make 2.0.1 compatible with Push to Deploy feature in Galaxy (Meteor Cloud) + +## v2.0, 2021-01-20 + +### Changes + +#### Highlights + +- Free deploy on [Cloud](https://www.meteor.com/cloud): Deploy for free to Cloud with one command: `meteor deploy myapp.meteorapp.com --free`. ([docs](https://docs.meteor.com/commandline.html#meteordeploy)) + + +- Deploy including MongoDB on [Cloud](https://www.meteor.com/cloud): Deploy including MongoDB in a shared instance for free to Cloud with one command: `meteor deploy myapp.meteorapp.com --free --mongo`. ([docs](https://docs.meteor.com/commandline.html#meteordeploy)) + + +- Hot Module Replacement (HMR): Updates the javascript modules in a running app that were modified during a rebuild. Reduces the feedback cycle while developing so you can view and test changes quicker (it even updates the app before the build has finished). Enabled by adding the `hot-module-replacement` package to an app. React components are automatically updated by default using React Fast Refresh. Integrations with other libraries and view layers can be provided by third party packages. Support for Blaze is coming soon. This first version supports app code in the modern web architecture. ([docs](https://guide.meteor.com/build-tool.html#hot-module-replacement)) [#11117](https://github.com/meteor/meteor/pull/11117) + +#### Meteor Version Release + +* `meteor-tool@2.0` + - `meteor create my-app` now creates by default a project using React. If you want to create a new project using Blaze you should use the new option `--blaze`. + - `meteor create --react my-app` is still going to create a React project. + - `meteor create --free` deploy for free to Cloud with one command: `meteor deploy myapp.meteorapp.com --free`. ([docs](https://docs.meteor.com/commandline.html#meteordeploy)). + - `meteor create --free --mongo` deploy including MongoDB in a shared instance for free to Cloud with one command: `meteor deploy myapp.meteorapp.com --free --mongo`. ([docs](https://docs.meteor.com/commandline.html#meteordeploy)) + - `isobuild` fixes a regression on recompiling node modules in different architectures. [#11290](https://github.com/meteor/meteor/pull/11290) + - `isobuild` converts npm-discards.js to TypeScript. [#10663](https://github.com/meteor/meteor/pull/10663) + - `cordova` ensures the pathname of the rootUrl is used in the mobile URL. [#11053](hhttps://github.com/meteor/meteor/pull/11053) + - Add `file.hmrAvailable()` for compiler plugins to check if a file meets the minimum requirements to be updated with HMR [#11117](https://github.com/meteor/meteor/pull/11117) + + +* `hot-module-replacement@1.0.0` + - New package that enables Hot Module Replacement for the Meteor app and provides an API to configure how updates are applied. HMR reduces the feedback cycle while developing by updating modified javascript modules within the running application. ([docs](https://docs.meteor.com/packages/hot-module-replacement.html)) [#11117](https://github.com/meteor/meteor/pull/11117) + - These packages have been updated to support HMR: `autoupdate@1.7.0`, `babel-compiler@7.6.0`, `ddp-client@2.4.0`, `dynamic-import@0.6.0`, `ecmascript@0.15.0`, `modules@0.16.0`, `modules-runtime-hot@0.13.0`, `standard-minifier-css@1.7.2`, `webapp@1.10.0`, `webapp-hashing@1.1.0` + + +* `react-fast-refresh@0.1.0` + - New package that updates React components using HMR. This is enabled by default in apps that have HMR enabled and use a supported React version. ([docs](https://atmospherejs.com/meteor/react-fast-refresh)) [#11117](https://github.com/meteor/meteor/pull/11117) + + +* `dev-error-overlay@0.1.0` + - New package that allows you to see build errors and server crashes in your browser during development. Requires the app to have HMR enabled. [#11117](https://github.com/meteor/meteor/pull/11117) + + +* `accounts-base@1.8.0` and `accounts-password@1.7.0` + - Extra parameters can now be added to reset password, verify e-mail and enroll account links that are generated for account e-mails. By default, these are added as search parameters to the generated url. You can pass them as an object in the appropriate functions. E.g. `Accounts.sendEnrollmentEmail(userId, email, null, extraParams);`. [#11288](https://github.com/meteor/meteor/pull/11288) + + +* `logging@1.2.0` + - Updates dependencies and make debug available for use in non production environments. [#11068](https://github.com/meteor/meteor/pull/11068) + +#### Independent Releases +* `react-meteor-data@2.2.0` + - Fix issue with useTracker and Subscriptions when using deps. [#306](https://github.com/meteor/react-packages/pull/306) + - Remove version constraint on core TypeScript package [#308](https://github.com/meteor/react-packages/pull/308) + + +* `http` + - It has been deprecated. [#11068](https://github.com/meteor/meteor/pull/11068) + +### Breaking changes + +* `http` package has been deprecated. Please start on migrating towards the [fetch](https://atmospherejs.com/meteor/fetch) package instead. + +### Migration steps + +Simple run `meteor update` in your app. + +Great new features and no breaking changes (except one package deprecation). You can always check our [Roadmap](https://docs.meteor.com/roadmap.html) to understand what is next. diff --git a/v3-docs/docs/generators/changelog/versions/2.10.md b/v3-docs/docs/generators/changelog/versions/2.10.md new file mode 100644 index 0000000000..fea64636f8 --- /dev/null +++ b/v3-docs/docs/generators/changelog/versions/2.10.md @@ -0,0 +1,84 @@ + +## v2.10.0, 2023-01-13 + +### Highlights + +* Update skeletons to use React 18 [PR](https://github.com/meteor/meteor/pull/12419) by [StorytellerCZ](https://github.com/StorytellerCZ). +* Use MongoDB types instead of the homebuilt [PR](https://github.com/meteor/meteor/pull/12415) by [perbergland](https://github.com/perbergland). +* Fixing wrong type definitions in MongoDB package [PR](https://github.com/meteor/meteor/pull/12409) by [ebroder](https://github.com/ebroder). +* Typescript to version v4.7.4 [PR](https://github.com/meteor/meteor/pull/12393) by [StorytellerCZ](https://github.com/StorytellerCZ). +* Update test-in-browser dependencies [PR](https://github.com/meteor/meteor/pull/12384) by [harryadel](https://github.com/harryadel). +* Update boilerplate-generator-tests [PR](https://github.com/meteor/meteor/pull/12429) by [harryadel](https://github.com/harryadel). +* Replace double-ended-queue with denque [PR](https://github.com/meteor/meteor/pull/12430) by [harryadel](https://github.com/harryadel). +* Allow multiple runtime config and updated runtime hooks [PR](https://github.com/meteor/meteor/pull/12426) by [ebroder](https://github.com/ebroder). +* Added async forEach and clear for method Hooks [PR](https://github.com/meteor/meteor/pull/12427) by [Grubba27](https://github.com/Grubba27). +* Implemented async Tracker with explicit values [PR](https://github.com/meteor/meteor/pull/12294) by [radekmie](https://github.com/radekmie). +* Improved eslint config [PR](https://github.com/meteor/meteor/pull/12309) by [afrokick](https://github.com/afrokick). + +#### Breaking Changes + +N/A + +#### Internal API changes + +N/A + +#### Migration Steps + +N/A + +#### Meteor Version Release + +* `babel-compiler@7.10.2`: + - Updated @meteorjs/babel to version 7.18.0. + - Updated to typescript to version v4.7.4. + +* `boilerplate-generator-tests@1.5.1`: + - Updated parse5 and turned streamToString into a local function. + +* `callback-hook@1.5.0` + - Added forEachAsync. + +* `ecmascript@0.16.5` + - Updated typescript to version 4.7.4. + +* `Command line`: + - Updated React skeletons to use React 18 + +* `Meteor@1.11.0`: + - Replaced double-ended-queue with [denque](https://github.com/invertase/denque) + +* `mongo@1.16.4`: + - Fixed wrong type definitions. + - switch to using MongoDB types instead of the homebuilt. + - Fixed wrong type definitions in MongoDB package related to dropIndexAsync + +* `react-fast-refresh@0.2.5`: + - Updated react-refresh dependency. + +* `test-in-browser@1.3.3`: + - Updated dependencies and removed unused libs. + +* `Tracker@1.3.0`: + - Implemented async Tracker with explicit values + +* `typescript@4.7.4` + - Updated typescript to version 4.7.4. + +* `webapp@1.13.3` + - The forEach method on Hook will stop iterating unless the iterator function returns a truthy value. + Previously, this meant that only the first registered runtime config hook would be called. + +* `@meteorjs/babel@7.18.0-beta.5` + - Updated typescript to version 4.7.4. + +#### Special thanks to +- [@StorytellerCZ](https://github.com/StorytellerCZ). +- [@perbergland](https://github.com/perbergland). +- [@ebroder](https://github.com/ebroder). +- [@harryadel](https://github.com/harryadel). +- [@radekmie](https://github.com/radekmie). +- [@Grubba27](https://github.com/Grubba27). +- [@afrokick](https://github.com/afrokick). + +For making this great framework even better! diff --git a/v3-docs/docs/generators/changelog/versions/2.11.md b/v3-docs/docs/generators/changelog/versions/2.11.md new file mode 100644 index 0000000000..c0a4ec9199 --- /dev/null +++ b/v3-docs/docs/generators/changelog/versions/2.11.md @@ -0,0 +1,137 @@ +## v2.11.0, 2023-03-02 + +### Highlights + +* MongoDB Server 6.x Support +* Embedded Mongo now uses MongoDB 6.0.3 +* Optimized makeLookupFunction + by [radekmie](https://github.com/radekmie) [PR](https://github.com/meteor/meteor/pull/12462) +* In async wrappers, catch exceptions and reject + by [ebroder](https://github.com/ebroder) [PR](https://github.com/meteor/meteor/pull/12469) +* Bump Typescript to v4.9.4 by [Firfi](https://github.com/Firfi) [PR](https://github.com/meteor/meteor/pull/12465) +* Ensure the meteor.loginServiceConfiguration subscription always becomes ready + by [Torgen](https://github.com/Torgen) [PR](https://github.com/meteor/meteor/pull/12480) +* Deprecate appcache package + by [StorytellerCZ](https://github.com/StorytellerCZ) [PR](https://github.com/meteor/meteor/pull/12456) +* Made standard-minifier-css debuggable + by [softwarecreations](https://github.com/softwarecreations) [PR](https://github.com/meteor/meteor/pull/12478). +* Upgrading MongoDB Driver to v4.14 + by [Grubba27](https://github.com/Grubba27) [PR](https://github.com/meteor/meteor/pull/12501) +* Remove Blaze dependency and types that live in blaze.d.ts + by [perbergland](https://github.com/perbergland) [PR](https://github.com/meteor/meteor/pull/12428) + +* Switch typescript skeleton to zodern:types and test that it works by [GH ebroder] [PR #12510] +* Remove packages/*/.npm from gitignore and add missing .npm folders by [GH ebroder] [PR #12508] +* Add type definitions for async methods from Meteor 2.9 by [GH ebroder] [PR #12507] +* TypeScript skeleton fixes by [GH ebroder] [PR #12506] +* Fix TypeScript type dependencies for mongo, webapp, and underscore by [GH ebroder] [PR #12505] +* Improve specificity of types previously declared as "Object" by [GH ebroder] [PR #12520] +* Bump to Node 14.21.3 by [GH StorytellerCZ] [PR #12517] + +#### Breaking Changes + +`meteor mongo` command was removed due compatibility with MongoDB v6.x of `mongosh +for more information about MongoDB migration +read our [Migration Guide](https://guide.meteor.com/2.11-migration.html) for this version. + +#### Internal API changes + +App cache is now deprecated. + +#### Migration Steps + +Read our [Migration Guide](https://guide.meteor.com/2.11-migration.html) for this version. + +#### Meteor Version Release + +* `accounts-2fa@2.0.2`: + - removed .npm/package contents and added .gitignore + +* `accounts-base@2.2.7`: + - Updated types to match async methods added in newer versions. + - Ensured the meteor.loginServiceConfiguration subscription always becomes ready, by adding a this.ready() call. + - Specified that previously were declared as "Object" types. More context can be seen in [PR #12520]. + +* `accounts-password@2.3.4`: + - Updated `Accounts.changePassword` and `Accounts.resetPassword` to be correctly verify if the new password is + valid. + - removed .npm/package contents and added .gitignore + +* `appcache@1.2.8` + - Deprecated appcache + package. [applicationCache](https://developer.mozilla.org/en-US/docs/Web/API/Window/applicationCache), which this + package relies on, has been deprecated and is not available on the latest browsers. + +* `babel-compiler@7.10.3`: + - Updated typescript to version 4.9.4. + +* `ecmascript@0.16.6`: + - Updated typescript to version 4.9.4. + +* `email@2.2.4`: + - Updated types to match async methods added in newer versions. + - Specified that previously were declared as "Object" types. More context can be seen in [PR #12520]. + +* `logging@1.3.2`: + - removed .npm/package contents and added .gitignore + +* `Command line`: + - Corrected typo in vue skeleton. + - Command `meteor mongo` was removed due compatibility with MongoDB v6.x of `mongosh` + +* `meteor@1.11.1`: + - updated types to removed unused Blaze types + - Specified that previously were declared as "Object" types. More context can be seen in [PR #12520]. + +* `minimongo@1.9.2`: + - Updated performance of makeLookupFunction + - In async wrappers, catch exceptions and reject + +* `mongo@1.16.5`: + - In async wrappers, catch exceptions and reject + - Updated MongoDB types to match driver version 4.13.0 and MongoDB server version 6.0.3 + - Specified that previously were declared as "Object" types. More context can be seen in [PR #12520]. + - Now uses MongoDB v6.0.3 + - Now uses Node v14.21.3 + +* `npm-mongo@4.14.0`: + - Updated MongoDB driver to version 4.14.0 + +* `oauth@2.2.0`: + - bumped cordova-plugin-inappbrowser to 5.0.0 + +* `react-fast-refresh@0.2.6`: + - removed .npm/package contents and added .gitignore + +* `standard-minifier-css@1.9.0`: + - standard-minifier-css is now debuggable + +* `tracker@1.3.1`: + - Added missing withComputation method in types + +* `typescript@4.9.4` + - Updated typescript to version 4.9.4. + +* `underscore@1.0.12`: + - Added dependency in types to underscore + +* `webapp@1.13.4`: + - Added dependency in types to webapp(to connect) + - removed .npm/package contents and added .gitignore + +* `@meteorjs/babel@7.18.0-beta.6` + - Updated typescript to version 4.9.4. + +#### Special thanks to + +- [@radekmie](https://github.com/radekmie). +- [@ebroder](https://github.com/ebroder). +- [@Firfi](https://github.com/Firfi). +- [@Torgen](https://github.com/Torgen). +- [@StorytellerCZ](https://github.com/StorytellerCZ). +- [@softwarecreations](https://github.com/softwarecreations). +- [@Grubba27](https://github.com/Grubba27). + +For making this great framework even better! + + diff --git a/v3-docs/docs/generators/changelog/versions/2.12.md b/v3-docs/docs/generators/changelog/versions/2.12.md new file mode 100644 index 0000000000..f0b74d3533 --- /dev/null +++ b/v3-docs/docs/generators/changelog/versions/2.12.md @@ -0,0 +1,150 @@ +## v2.12.0, 2023-04-28 + +### Highlights + +* Document main function in webapp by [harryadel](https://github.com/harryadel) [PR](https://github.com/meteor/meteor/pull/12579) +* Add undocument properties to docs by [harryadel](https://github.com/harryadel) [PR](https://github.com/meteor/meteor/pull/12563) +* Bump NPM versions for css minifiers by [wreiske](https://github.com/wreiske) [PR](https://github.com/meteor/meteor/pull/12562) +* Updated Email and Mongo package types by [ebroder](https://github.com/ebroder) [PR](https://github.com/meteor/meteor/pull/12554) +* Updated security.md by [jamauro](https://github.com/jamauro) [PR](https://github.com/meteor/meteor/pull/12461) +* Added addHtmlAttributeHook type on WebApp by [DblK](https://github.com/DblK) [PR](https://github.com/meteor/meteor/pull/12545) +* Added loginServiceConfiguration type on Accounts by [DblK](https://github.com/DblK) [PR](https://github.com/meteor/meteor/pull/12539) +* Add TS types for Mongo Collection countDocuments and estimatedDocumentCount by [ArthurHoaro](https://github.com/ArthurHoaro) [PR](https://github.com/meteor/meteor/pull/12533) +* Allow setting a custom ddp-rate-limit message per rule by [wreiske](https://github.com/wreiske) [PR](https://github.com/meteor/meteor/pull/12082) +* Updated MongoDB driver to 4.15 by [Grubba27](https://github.com/Grubba27) [PR](https://github.com/meteor/meteor/pull/12583) +* Adding warn with env variable when using old apis vy [Grubba27](https://github.com/Grubba27) [PR](https://github.com/meteor/meteor/pull/12585) +* Fix syntax for legacy client by [zodern](https://github.com/zodern) [PR](https://github.com/meteor/meteor/pull/12596) +* Updating MongoDB driver to 4.16 by [Grubba27](https://github.com/Grubba27) [PR](https://github.com/meteor/meteor/pull/12599) +* Update sockjs-client by [harryadel](https://github.com/harryadel) [PR](https://github.com/meteor/meteor/pull/12590) +* [Accounts] set custom collection by [dmromanov](https://github.com/dmromanov) [PR](https://github.com/meteor/meteor/pull/12591) +* Wrappers to help in the async migration by [matheusccastroo](https://github.com/matheusccastroo) [PR](https://github.com/meteor/meteor/pull/12593) +* Mongo query hangs all clients subscribed to a query/collection by [KoenLav](https://github.com/KoenLav) [PR](https://github.com/meteor/meteor/pull/12587) +* Blaze to 2.6.2 by [StorytellerCZ](https://github.com/StorytellerCZ) [PR](https://github.com/meteor/blaze/pull/411) + +#### Breaking Changes + +N/A + +#### Internal API changes + +N/A + +#### Migration Steps + +Now if you want to check where do you call old-style api methods +you can use ```WARN_WHEN_USING_OLD_API``` before starting your meteor process. + + +#### Meteor Version Release + +* `accounts-base@2.2.8`: + - Added `loginServiceConfiguration` type. + - Added the `collection` option property, in order to be able to set the collection for Accounts, + more can be seen in the [discussion](https://github.com/meteor/meteor/discussions/12544#discussioncomment-5240763) + and in the [related issue](https://github.com/meteor/meteor-feature-requests/issues/20). + - `onCreateUserHook` now accept promises and wait if necessary. + +* `babel-compiler@7.10.4`: + - Added `es5` compatible syntax. + +* `browser-policy-content@1.1.2`: + - Added `es5` compatible syntax. + +* `browser-policy-framing@1.1.2`: + - Added `es5` compatible syntax. + +* `browser-policy@1.1.2`: + - Updated test name. + +* `callback-hook@1.5.1`: + - Added async hooks possibility to make async migrations easier. + +* `context@0.5.1`: + - Added `es5` compatible syntax. + +* `ddp-rate-limiter@1.2.0`: + - Allow setting a custom ddp-rate-limit message per rule. + +* `ddp-server@2.6.1`: + - Updated sockjs version. + +* `dev-error-overlay@0.1.2`: + - Added `es5` compatible syntax by adding the `ecmascript` package. + +* `dynamic-import@0.7.3`: + - Added `es5` compatible syntax. + +* `ecmascript@0.16.7`: + - Updated tests location. + +* `ecmascript-runtime@0.8.1`: + - Updated npm dependencies. + +* `email@2.2.5`: + - Updated type `CustomEmailOptions` to be a type instead of an interface. + +* `hot-module-replacement@0.5.3`: + - Added `es5` compatible syntax. + + +* `meteor@1.11.2`: + - Added documentation for `isTest`, `isAppTest` and `isPackageTest` methods. + - Added possibility to add async hooks to make async migrations easier. [PR](https://github.com/meteor/meteor/pull/12593) + +* `minifier-css@1.6.4`: + - Bump NPM versions for css minifiers. + +* `minimongo@1.9.3`: + - Updated to be able to track old api usage. + +* `modules-runtime-hot@0.14.2`: + - Added `es5` compatible syntax. + +* `mongo@1.16.6`: + - Added `countDocuments` and `estimatedDocumentCount` types. + - Added warning for when old style apis are being used, to use this feature, + use the variable`WARN_WHEN_USING_OLD_API=true` before starting the Meteor process. + - Oplog driver updated to not throw error when MongoDB server and Meteor client mismatch. [issue](https://github.com/meteor/meteor/issues/12516) + +* `non-core`: + - Blaze to version 2.6.2. + +* `npm-mongo@4.16.0`: + - Updated MongoDB driver to 4.15. + - Updated MongoDB driver to 4.16. + +* `rate-limit@1.1.1`: + - Added `ruleId` property that will be used for setting messages. + +* `react-fast-refresh@0.2.7`: + - Added `es5` compatible syntax. + +* `socket-stream-client@0.5.0`: + - Updated sockjs version. + +* `standard-minifier-css@1.9.2`: + - Bump NPM versions for css minifiers. + +* `tracker@1.3.2`: + - Updated types and updated JSDocs for `Tracker.withComputation`. + +* `underscore@1.0.13`: + - Updated npm dependencies. + +* `webapp@1.13.5`: + - Added `addHtmlAttributeHook` type. + + + +#### Special thanks to + +- [@harryadel](https://github.com/harryadel). +- [@wreiske](https://github.com/wreiske). +- [@ebroder](https://github.com/ebroder). +- [@jamauro](https://github.com/jamauro). +- [@DblK](https://github.com/DblK). +- [@ArthurHoaro](https://github.com/ArthurHoaro). +- [@Grubba27](https://github.com/Grubba27). +- [@zodern](https://github.com/zodern). +- [@dmromanov](https://github.com/dmromanov). +- [@matheusccastroo](https://github.com/matheusccastroo). diff --git a/v3-docs/docs/generators/changelog/versions/2.13.0.md b/v3-docs/docs/generators/changelog/versions/2.13.0.md new file mode 100644 index 0000000000..76a105435d --- /dev/null +++ b/v3-docs/docs/generators/changelog/versions/2.13.0.md @@ -0,0 +1,75 @@ +## v2.13.0, 2023-07-26 + +### Highlights + +* Handled implicit collection creation oplog message by [radekmie](https://github.com/radekmie) [PR](https://github.com/meteor/meteor/pull/12643). +* Fix upsert logs when using WARN_WHEN_USING_OLD_API flag by [Grubba27](https://github.com/Grubba27) [PR](https://github.com/meteor/meteor/pull/12640). +* Updating mongo types by [Grubba27](https://github.com/Grubba27) [PR](https://github.com/meteor/meteor/pull/12639). +* Fix solid skeleton by [fredmaiaarantes](https://github.com/fredmaiaarantes) [PR](https://github.com/meteor/meteor/pull/12637). +* Setting The Viewport meta tag on skeletons [fredmaiaarantes](https://github.com/fredmaiaarantes) [PR](https://github.com/meteor/meteor/pull/12636). +* Update mongo.d.ts with projection [StorytellerCZ](https://github.com/StorytellerCZ) [PR](https://github.com/meteor/meteor/pull/12635). +* Update guide code for GraphQL [StorytellerCZ](https://github.com/StorytellerCZ) [PR](https://github.com/meteor/meteor/pull/12619). +* Twitter Whitelist issue resolved [Atharshoyeb](https://github.com/Atharshoyeb) [PR](https://github.com/meteor/meteor/pull/12369). +* Node security patch (14.21.4) [PR](https://github.com/meteor/node-v14-esm/pull/1). Thanks a lot [denihs](https://github.com/denihs) for your contribuiton. +* Updated deprecated reference in mongo package by [StorytellerCZ](https://github.com/StorytellerCZ) [PR](https://github.com/meteor/meteor/pull/12653/files). +* Updated BlazeJS git ref in core meteor to 2.7.1 by [Grubba27](https://github.com/Grubba27) [PR](https://github.com/meteor/meteor/pull/12651). +* Added `Meteor.applyAsync` types by [Julusian](https://github.com/Julusian) [PR](https://github.com/meteor/meteor/pull/12645). + + +#### Breaking Changes + +If you are running Meteor with docker you will +need to update your docker file to use our [new docker image](https://hub.docker.com/r/meteor/node) +that contains Nodejs v14.21.4. + +#### Known issues + +Please, [check our known issues page](https://docs.meteor.com/known-issues) +for more information about the problems and issues you might find while migrating. + +#### Internal changes + +* `ddp-server@get-version`: + - Updated livedata server test to be more easily debbuged. + +* `mongo@get-version`: + - Updated deprecated reference in Mongo package. + +#### Migration Steps + + +Please, follow our [migration guide](https://guide.meteor.com/2.13-migration) to understand what's needed to upgrade to Meteor 2.13. + +#### Meteor Version Release + + +* `Command line`: + - Updated metatags for skeletons. + - Updated solidjs skeleton to be more idiomatic. + +* `meteor@1.11.3`: + - Added types for applyAsync and added more documentation for applyAsync options. + +* `mongo@1.16.7`: + - Updated types with projection. + - Fixed wrong upsert logs when using WARN_WHEN_USING_OLD_API flag. + - Handled implicit collection creation oplog message. + +* `test-in-console@1.2.5`: + - Adjusted log indentation. + - All errors will be logged to console. + - Will always use puppeteer@20.4.0 + +* `twitter-oauth@1.3.3`: + - Fixed twitter whitelist issue. + + +#### Special thanks to + +- [@radekmie](https://github.com/radekmie). +- [@Grubba27](https://github.com/Grubba27). +- [@fredmaiaarantes](https://github.com/fredmaiaarantes). +- [@StorytellerCZ](https://github.com/StorytellerCZ). +- [@Atharshoyeb](https://github.com/Atharshoyeb). +- [@Julusian](https://github.com/Julusian). +- [@denihs](https://github.com/denihs). diff --git a/v3-docs/docs/generators/changelog/versions/2.13.1.md b/v3-docs/docs/generators/changelog/versions/2.13.1.md new file mode 100644 index 0000000000..c89f5400b9 --- /dev/null +++ b/v3-docs/docs/generators/changelog/versions/2.13.1.md @@ -0,0 +1,40 @@ +## v2.13.1, 2023-09-04 + +### Highlights + +* Solved zlib issue with Meteor.js and ESM Node.js 14.21.4 [PR #12765] by (GH Grubba27). + +#### Breaking Changes + +N/A + +#### Internal API changes + +N/A + +#### Migration Steps + +Please run the following command to update your project: + +```bash + +meteor update --release 2.13.1 + +``` + + +#### Meteor Version Release + + +* `Command line`: + - The bundle version was changed to 14.21.4.1 to use another compiled version of the [ESM Node.js](https://guide.meteor.com/using-node-v14.21.4). + + +#### Special thanks to + +- [@Grubba27](https://github.com/Grubba27). + + +For making this great framework even better! + + diff --git a/v3-docs/docs/generators/changelog/versions/2.13.3.md b/v3-docs/docs/generators/changelog/versions/2.13.3.md new file mode 100644 index 0000000000..cc7d30d8f8 --- /dev/null +++ b/v3-docs/docs/generators/changelog/versions/2.13.3.md @@ -0,0 +1,41 @@ +## v2.13.3, 2023-09-08 + +### Highlights + +* Solves the issue [#12771: Version 2.13.1 suddenly requires a newer glibc version](https://github.com/meteor/meteor/issues/12771). + +#### Breaking Changes + +N/A + +#### Internal API changes + +N/A + +#### Migration Steps + +Please run the following command to update your project: + +```bash + +meteor update --release 2.13.3 + +``` + + +#### Meteor Version Release + + +* `Command line`: + - The bundle version was changed to 14.21.4.3 to use another compiled version of the [ESM Node.js](https://guide.meteor.com/using-node-v14.21.4). The previous version was generated using a different unix distribution (Ubuntu) while we should use CentOS. + + +#### Special thanks to + +- [@aquinoit](https://github.com/aquinoit). +- [@fredmaiaarantes](https://github.com/fredmaiaarantes). +- [@Grubba27](https://github.com/Grubba27). + +For making this great framework even better! + + diff --git a/v3-docs/docs/generators/changelog/versions/3.0.md b/v3-docs/docs/generators/changelog/versions/3.0.md new file mode 100644 index 0000000000..ae1edaf6ec --- /dev/null +++ b/v3-docs/docs/generators/changelog/versions/3.0.md @@ -0,0 +1,711 @@ +## v3.0, TBD + +### Highlights + +#### Breaking Changes + +- `accounts-2fa@3.0.0`: + + - Some methods are now async. See below: + - `Accounts._is2faEnabledForUser` + - `(Meteor Method) - generate2faActivationQrCode` + - `(Meteor Method) - enableUser2fa` + - `(Meteor Method) - disableUser2fa` + - `(Meteor Method) - has2faEnabled` + +- `accounts-base@3.0.0`: + + - `methods.removeOtherTokens` is now async + - `Accounts.destroyToken` is now async + - `Accounts.insertUserDoc` is now async + - `Accounts.updateOrCreateUserFromExternalService` is now async + - `Accounts.expirePasswordToken` is now async + - `Accounts.setupUsersCollection` is now async + - `Meteor.user` is now async in server + +- `accounts-facebook@2.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `accounts-github@2.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `accounts-google@2.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `accounts-meetup@2.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `accounts-meteor-developer@2.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `accounts-oauth@2.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `accounts-password@3.0.0`: + + - Some server methods are now async: + - `Accounts.sendResetPasswordEmail` + - `Accounts.sendEnrollmentEmail` + - `Accounts.sendVerificationEmail` + - `Accounts.addEmail` + - `Accounts.removeEmail` + - `Accounts.verifyEmail` + - `Accounts.createUserVerifyingEmail` + - `Accounts.createUser` + - `Accounts.generateVerificationToken` + - `Accounts.generateResetToken` + - `Accounts.forgotPassword` + - `Accounts.setPassword` + - `Accounts.changePassword` + - `Accounts.setUsername` + - `Accounts.findUserByEmail` + - `Accounts.findUserByUsername` + +- `accounts-passwordless@3.0.0`: + + - `Accounts.sendLoginTokenEmail` is now async. + +- `accounts-twitter@2.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `accounts-ui-unstyled@2.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `accounts-ui@2.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `accounts-weibo@2.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `allow-deny@2.0.0`: + + - Updated to accept async functions. + +- `appcache@2.0.0`: + + - Updated internal api to use `handlers` + +- `audit-argument-checks@2.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `autopublish@2.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `autoupdate@2.0.0`: + + - Updated api to be async, with asyncronous queueing. + +- `babel-compiler@8.0.0`: + + - Removed `Promise.await` default transform. + - Added top-level-await to packages. + +- `babel-runtime@2.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `base64@2.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `binary-heap@2.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `blaze@3.0.0`: + - Todo + +- `boilerplate-generator-tests@2.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `boilerplate-generator@2.0.0`: + + - `toHTML` is no longer available (it was already deprecated). Use `toHTMLStream` instead. + - Updated to use `handlers` + +- `browser-policy-common@2.0.0`: + + - Updated to use `handlers` + +- `browser-policy-content@2.0.0`: + + - Some methods are now async. See below: + - `BrowserPolicy.content.setPolicy` + - `BrowserPolicy.content.allowInlineScripts` + - `BrowserPolicy.content.disallowInlineScripts` + - `BrowserPolicy.content.disallowAll` + - `BrowserPolicy.setDefaultPolicy` + +- `browser-policy-framing@2.0.0`: + - Package was bumped due to a dependency update. No code changes were made. + +- `browser-policy@2.0.0`: + Updated to use async methods from `browser-policy-common` and `browser-policy-content`. + +- `caching-compiler@2.0.0`: + + - `afterLink` is now async. + - Updated to use now async API. + +- `callback-hook@2.0.0`: + + - Added `forEachAsync` method. + +- `check@2.0.0`: + + - Removed `fibers` related tests. + +- `constraint-solver@2.0.0`: + + - Some methods are now async. See below: + + - `ConstraintSolver.getVersionCostSteps` + - `ConstraintSolver.analyze` + - `ConstraintSolver.resolve` + + - Updated tests to be async. + - Removed a few underscore usage. + - Added updated to use async methods + +- `context@1.0.0`: + + - Removed `fibers` from package. + +- `core-runtime@2.0.0`: + + - Created package to load packages and the app. + - This is the pakcages that sets up the Runtime. + +- `crosswalk@2.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `ddp-client@3.0.0`: + + - Added `isAsyncCall` method to know if call is being made by a async method. + - Removed `fibers` from package. + - Updated tests to use async methods. + +- `ddp-common@2.0.0`: + + - Added `.fence` option. + +- `ddp-rate-limiter@2.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `ddp-server@3.0.0`: + + - Updated to use async methods. + - Removed `fibers` from package. + - Updated tests to use async methods. + - Turned server implementation to async. + +- `ddp@2.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `diff-sequence@2.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `disable-oplog@2.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `ecmascript-runtime-client@1.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `ecmascript-runtime-server@1.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `ecmascript-runtime@1.0.0`: + + - Added dependency to `@babel/runtime`. + +- `ecmascript@1.0.0`: + + - Added dependency to `@babel/runtime`. + - Moved runtime tests. + +- `ejson@2.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `email@3.0.0`: + + - `Email.send` is no longer available. Use `Email.sendAsync` instead. + - Updated types to reflext async methods and `Email.send` depracation. + +- `es5-shim@5.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `facebook-config-ui@2.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `facebook-oauth@2.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `facts-base@2.0.0`: + + - turned unorderd deps on `ddp` to false. + +- `facts-ui@2.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `fetch@1.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `force-ssl-common@2.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `force-ssl@2.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `geojson-utils@2.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `github-config-ui@2.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `github-oauth@2.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `google-config-ui@2.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `google-oauth@2.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `hot-code-push@2.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `http@`: + - Updated handlers to use `handlers` +- `id-map@2.0.0`: + + - Added `forEachAsync` method. + +- `insecure@2.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `inter-process-messaging@1.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `launch-screen@2.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `localstorage@2.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `logging@2.0.0`: + + - Added dependency to `@babel/runtime`. + +- `logic-solver@3.0.0`: + `Logic.disablingAssertions` is now async. + `minMaxWS` is now async. + +- `meetup-config-ui@2.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `meetup-oauth@2.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `meteor-base@2.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `meteor-developer-config-ui@2.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `meteor-developer-oauth@2.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `meteor-tool@3.0.0`: + + - Changes to how meteor apps are being created [PR](https://github.com/meteor/meteor/pull/12697) + +- `meteor@2.0.0`: + + - Async local storage was added to help deal with async methods. + - Added `promiseEmmiter` to help with async methods. + - Removed `fibers` from package. + - `Meteor.absoluteUrl` in localhost uses `127.0.1` by default. + +- `minifier-css@2.0.0`: + + - `minifyCss` is now async. + - Removed `fibers` from package. + +- `minifier-js@3.0.0`: + + - `minifyJs` is now async. + - `terserMinify` no longer takes callbacks + - Removed `fibers` from package. + +* `minimongo@2.0.0`: + - `cursor.observe` now returns `isReady` and `isReadyPromise` wich indicates + if the cursor is ready and if the callbacks are have been called. + If you only use it in the `Client` or as a `LocalCollection` things have not + changed. + +- `mobile-experience@2.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `mobile-status-bar@2.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `modern-browsers@1.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `modules-runtime@1.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `modules@1.0.0`: + + - Updated `reify` version. + +- `mongo-decimal@`: + + - Updated to use `async` methods. + +- `mongo-dev-server@2.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `mongo-id@2.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `mongo-livedata@2.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `mongo@2.0.0`: + + - Updated to unify methods, `update`,`insert`,`remove`, `fetch` are now async, they are + the same as their `*Async` counterpart. + - `ensureIndex` and `createIndex` are now async. + +- `npm-mongo@5.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `oauth-encryption@2.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `oauth@`: + + - `_endOfPopupResponseTemplate` and `_endOfRedirectResponseTemplate` are no longer a property but now a function that returns a promise of the same value as before + - the following server methods are now async: + - `OAuth._renderOauthResults` + - `OAuth._endOfLoginResponse` + - `OAuth.renderEndOfLoginResponse` + - `OAuth._storePendingCredential` + - `OAuth._retrievePendingCredential` + - `ensureConfigured` + - `_cleanStaleResults` + +- `oauth@3.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `oauth1@`: + + - the following server methods are now async: + - `OAuth._storeRequestToken` + - `OAuth._retrieveRequestToken` + +- `oauth1@2.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `oauth2@`: + + - `OAuth._requestHandlers['2']` is now async. + +- `oauth2@2.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `ordered-dict@2.0.0`: + + - Added `forEachAsync` method. + +- `package-stats-opt-out@2.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `package-version-parser@4.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `promise@1.0.0`: + + - Removed `fibers` usage + +- `random@2.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `rate-limit@2.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `reactive-dict@2.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `reactive-var@2.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `reload-safetybelt@2.0.0`: + + - Added `ecmascript` package to `package.js` + +- `reload@2.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `retry@2.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `routepolicy@2.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `server-render@1.0.0`: + + - Updated usage with `getBoilerplate` that are now `async`. + +- `service-configuration@2.0.0`: + + - Updated to use `createIndexAsync`. + +- `session@2.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `sha@2.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `shell-server@1.0.0`: + + - Updated to handle promises results. + +- `socket-stream-client@1.0.0`: + + - Updated tests to handle `async` code. + +- `spiderable@`: + + - Updated handlers to use `handlers` that are now using express + - removed `fibers` usage if flag is set to `true` + +- `standard-minifier-css@2.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `standard-minifier-js@3.0.0`: + + - `processFilesForBundle` is now `async`. + +- `standard-minifiers@2.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `static-html@2.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `test-helpers@2.0.0`: + + - Updated to use `async` methods. + - Removed `fibers` usage. + - Added possibliy to use `async` tests. + +- `test-in-browser@2.0.0`: + + - Updated css to be in dark mode. + +- `test-in-console@2.0.0`: + + - Updated log identation. + +- `test-server-tests-in-console-once@2.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `tinytest-harness@1.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `tinytest@2.0.0`: + + - Added `test name` to logs. + - Removed `fibers` usage. + +- `twitter-config-ui@2.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `twitter-oauth@2.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `typescript@5.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `underscore-tests@2.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `underscore@2.0.0`: + + - Removed dependency in meteor package. + +- `url@2.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `webapp-hashing@2.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `webapp@2.0.0`: + + - These methods are now async: + + - `WebAppInternals.reloadClientPrograms()` + - `WebAppInternals.pauseClient()` + - `WebAppInternals.generateClientProgram()` + - `WebAppInternals.generateBoilerplate()` + - `WebAppInternals.setInlineScriptsAllowed()` + - `WebAppInternals.enableSubresourceIntegrity()` + - `WebAppInternals.setBundledJsCssUrlRewriteHook()` + - `WebAppInternals.setBundledJsCssPrefix()` + - `WebAppInternals.getBoilerplate` + + - Changed engine from connect to express and changed api naming to match express. See below: + - `WebApp.connectHandlers.use(middleware)` is now `WebApp.handlers.use(middleware)` + - `WebApp.rawConnectHandlers.use(middleware)` is now `WebApp.rawHandlers.use(middleware)` + - `WebApp.connectApp` is now `WebApp.expressApp` + +- `weibo-config-ui@2.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `weibo-oauth@2.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +#### New Public API + + + +- `accounts-base`: (2.9+) + + - `Meteor.userAsync()` + +- `callback-hook`:forEachAsync + + - `forEachAsync` + +- `ddp-server`: (2.8+) + + - `Meteor.callAsync()` + +- `minifier-css`: (2.9+) + + - `CssTools.minifyCssAsync()` + +- `mongo`: + + - `Mongo.Collection`: (2.8+) + - `createCappedCollectionAsync` + - `createIndexAsync` + - `dropCollectionAsync` + - `dropIndexAsync` + - `findOneAsync` + - `insertAsync` + - `removeAsync` + - `updateAsync` + - `upsertAsync` + - `Collection.Cursor`: (2.8+) + - `countAsync` + - `fetchAsync` + - `forEachAsync` + - `mapAsync` + - `[Symbol.asyncIterator]` so this code should work: + ```js + for await (const document of collection.find(query, options)) /* ... */ + ``` + +#### Internal API changes + +`accounts-base`: + +- `_attemptLogin` +- `_loginMethod` +- `_runLoginHandlers` + +* Upgraded `node-gyp` to v9.4.0 +* Upgraded `node-pre-gyp` to `@mapbox/node-pre-gyp` v1.0.11 + +#### New Internal API + +`accounts-password`: + +- `Accounts._checkPasswordAsync` + +#### Special thanks to + +- [@StorytellerCZ](https://github.com/sponsors/StorytellerCZ/) + +For making this great framework even better! diff --git a/v3-docs/docs/generators/changelog/versions/99999-generated-code-warning.md b/v3-docs/docs/generators/changelog/versions/99999-generated-code-warning.md new file mode 100644 index 0000000000..4b3ea646f4 --- /dev/null +++ b/v3-docs/docs/generators/changelog/versions/99999-generated-code-warning.md @@ -0,0 +1,14 @@ +# Changelog + +This is a complete history of changes for Meteor releases. + +[//]: # (Do not edit this file by hand.) + +[//]: # (This is a generated file.) + +[//]: # (If you want to change something in this file) + +[//]: # (go to meteor/docs/generators/changelog/docs) + + + diff --git a/v3-docs/docs/generators/codegen.js b/v3-docs/docs/generators/codegen.js new file mode 100644 index 0000000000..f740041028 --- /dev/null +++ b/v3-docs/docs/generators/codegen.js @@ -0,0 +1,11 @@ +const { generateChangelog } = require("./changelog/script.js"); +const { listPackages } = require("./packages-listing/script.js"); + +async function main() { + console.log("🚂 Started codegen 🚂"); + await generateChangelog(); + await listPackages(); + console.log("🚀 Done codegen 🚀"); +} + +main(); diff --git a/v3-docs/docs/generators/packages-listing/README.md b/v3-docs/docs/generators/packages-listing/README.md new file mode 100644 index 0000000000..a87a3a8072 --- /dev/null +++ b/v3-docs/docs/generators/packages-listing/README.md @@ -0,0 +1,18 @@ +# Listing of all meteor core packages + +This is a script that will generate a list of all meteor core packages, being ran every build. +This ensures that we always have a list of core packages up to date with their correct links to GitHub. + + +We can always add packages to the list by adding them to the `script.js` constant `OUTSIDE_OF_CORE_PACKAGES`. + +Should follow the following format: + +```js +{ + name: 'package-name', + link: 'https://link-to-github.com/meteor/meteor/tree/devel/packages/package-name' +} +``` + +At the end, this script will update the file located in `docs/source/packages/packages-listing.md` with the new list of packages. diff --git a/v3-docs/docs/generators/packages-listing/script.js b/v3-docs/docs/generators/packages-listing/script.js new file mode 100644 index 0000000000..d9b94e9b74 --- /dev/null +++ b/v3-docs/docs/generators/packages-listing/script.js @@ -0,0 +1,55 @@ +const fs = require("fs"); +const HEADER_TEMPLATE = ` + +[//]: # (Do not edit this file by hand.) + +[//]: # (This is a generated file.) + +[//]: # (If you want to change something in this file) + +[//]: # (go to meteor/docs/generators/packages-listing) + +# Core Packages + + +`; + +const OUTSIDE_OF_CORE_PACKAGES = [ + { + name: "blaze", + link: "https://github.com/meteor/blaze", + }, + { + name: "react-packages", + link: "https://github.com/meteor/react-packages", + }, +]; + +const IGNORED = ["depracated", "non-core"]; +const getPackages = () => { + const packages = fs + .readdirSync("../../packages", { withFileTypes: true }) + .filter((dirent) => dirent.isDirectory()) + .map((dirent) => dirent.name) + .filter((name) => !IGNORED.includes(name)) + .map((name) => { + return { + name, + link: `https://github.com/meteor/meteor/tree/devel/packages/${name}`, + }; + }); + return [...OUTSIDE_OF_CORE_PACKAGES, ...packages]; +}; + +const generateMarkdown = (packages) => + packages.map(({ name, link }) => `### [${name}](${link}) {#${name}}`).join("\n"); + +exports.listPackages = function() { + console.log("🚂 Started listing 🚂"); + const packages = getPackages(); + const markdown = generateMarkdown(packages); + const content = HEADER_TEMPLATE + markdown; + console.log("📝 Writing to file 📝"); + fs.writeFileSync("./api/packages-listing.md", content); + console.log("🚀 Done package listing 🚀"); +} diff --git a/v3-docs/docs/history.md b/v3-docs/docs/history.md new file mode 100644 index 0000000000..5aee6fc1ac --- /dev/null +++ b/v3-docs/docs/history.md @@ -0,0 +1,2951 @@ +# Changelog + +This is a complete history of changes for Meteor releases. + +[//]: # (Do not edit this file by hand.) + +[//]: # (This is a generated file.) + +[//]: # (If you want to change something in this file) + +[//]: # (go to meteor/docs/generators/changelog/docs) + + + +## v3.0, TBD + +### Highlights + +#### Breaking Changes + +- `accounts-2fa@3.0.0`: + + - Some methods are now async. See below: + - `Accounts._is2faEnabledForUser` + - `(Meteor Method) - generate2faActivationQrCode` + - `(Meteor Method) - enableUser2fa` + - `(Meteor Method) - disableUser2fa` + - `(Meteor Method) - has2faEnabled` + +- `accounts-base@3.0.0`: + + - `methods.removeOtherTokens` is now async + - `Accounts.destroyToken` is now async + - `Accounts.insertUserDoc` is now async + - `Accounts.updateOrCreateUserFromExternalService` is now async + - `Accounts.expirePasswordToken` is now async + - `Accounts.setupUsersCollection` is now async + - `Meteor.user` is now async in server + +- `accounts-facebook@2.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `accounts-github@2.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `accounts-google@2.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `accounts-meetup@2.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `accounts-meteor-developer@2.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `accounts-oauth@2.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `accounts-password@3.0.0`: + + - Some server methods are now async: + - `Accounts.sendResetPasswordEmail` + - `Accounts.sendEnrollmentEmail` + - `Accounts.sendVerificationEmail` + - `Accounts.addEmail` + - `Accounts.removeEmail` + - `Accounts.verifyEmail` + - `Accounts.createUserVerifyingEmail` + - `Accounts.createUser` + - `Accounts.generateVerificationToken` + - `Accounts.generateResetToken` + - `Accounts.forgotPassword` + - `Accounts.setPassword` + - `Accounts.changePassword` + - `Accounts.setUsername` + - `Accounts.findUserByEmail` + - `Accounts.findUserByUsername` + +- `accounts-passwordless@3.0.0`: + + - `Accounts.sendLoginTokenEmail` is now async. + +- `accounts-twitter@2.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `accounts-ui-unstyled@2.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `accounts-ui@2.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `accounts-weibo@2.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `allow-deny@2.0.0`: + + - Updated to accept async functions. + +- `appcache@2.0.0`: + + - Updated internal api to use `handlers` + +- `audit-argument-checks@2.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `autopublish@2.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `autoupdate@2.0.0`: + + - Updated api to be async, with asyncronous queueing. + +- `babel-compiler@8.0.0`: + + - Removed `Promise.await` default transform. + - Added top-level-await to packages. + +- `babel-runtime@2.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `base64@2.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `binary-heap@2.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `blaze@3.0.0`: + - Todo + +- `boilerplate-generator-tests@2.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `boilerplate-generator@2.0.0`: + + - `toHTML` is no longer available (it was already deprecated). Use `toHTMLStream` instead. + - Updated to use `handlers` + +- `browser-policy-common@2.0.0`: + + - Updated to use `handlers` + +- `browser-policy-content@2.0.0`: + + - Some methods are now async. See below: + - `BrowserPolicy.content.setPolicy` + - `BrowserPolicy.content.allowInlineScripts` + - `BrowserPolicy.content.disallowInlineScripts` + - `BrowserPolicy.content.disallowAll` + - `BrowserPolicy.setDefaultPolicy` + +- `browser-policy-framing@2.0.0`: + - Package was bumped due to a dependency update. No code changes were made. + +- `browser-policy@2.0.0`: + Updated to use async methods from `browser-policy-common` and `browser-policy-content`. + +- `caching-compiler@2.0.0`: + + - `afterLink` is now async. + - Updated to use now async API. + +- `callback-hook@2.0.0`: + + - Added `forEachAsync` method. + +- `check@2.0.0`: + + - Removed `fibers` related tests. + +- `constraint-solver@2.0.0`: + + - Some methods are now async. See below: + + - `ConstraintSolver.getVersionCostSteps` + - `ConstraintSolver.analyze` + - `ConstraintSolver.resolve` + + - Updated tests to be async. + - Removed a few underscore usage. + - Added updated to use async methods + +- `context@1.0.0`: + + - Removed `fibers` from package. + +- `core-runtime@2.0.0`: + + - Created package to load packages and the app. + - This is the pakcages that sets up the Runtime. + +- `crosswalk@2.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `ddp-client@3.0.0`: + + - Added `isAsyncCall` method to know if call is being made by a async method. + - Removed `fibers` from package. + - Updated tests to use async methods. + +- `ddp-common@2.0.0`: + + - Added `.fence` option. + +- `ddp-rate-limiter@2.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `ddp-server@3.0.0`: + + - Updated to use async methods. + - Removed `fibers` from package. + - Updated tests to use async methods. + - Turned server implementation to async. + +- `ddp@2.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `diff-sequence@2.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `disable-oplog@2.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `ecmascript-runtime-client@1.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `ecmascript-runtime-server@1.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `ecmascript-runtime@1.0.0`: + + - Added dependency to `@babel/runtime`. + +- `ecmascript@1.0.0`: + + - Added dependency to `@babel/runtime`. + - Moved runtime tests. + +- `ejson@2.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `email@3.0.0`: + + - `Email.send` is no longer available. Use `Email.sendAsync` instead. + - Updated types to reflext async methods and `Email.send` depracation. + +- `es5-shim@5.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `facebook-config-ui@2.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `facebook-oauth@2.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `facts-base@2.0.0`: + + - turned unorderd deps on `ddp` to false. + +- `facts-ui@2.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `fetch@1.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `force-ssl-common@2.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `force-ssl@2.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `geojson-utils@2.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `github-config-ui@2.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `github-oauth@2.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `google-config-ui@2.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `google-oauth@2.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `hot-code-push@2.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `http@`: + - Updated handlers to use `handlers` +- `id-map@2.0.0`: + + - Added `forEachAsync` method. + +- `insecure@2.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `inter-process-messaging@1.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `launch-screen@2.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `localstorage@2.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `logging@2.0.0`: + + - Added dependency to `@babel/runtime`. + +- `logic-solver@3.0.0`: + `Logic.disablingAssertions` is now async. + `minMaxWS` is now async. + +- `meetup-config-ui@2.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `meetup-oauth@2.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `meteor-base@2.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `meteor-developer-config-ui@2.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `meteor-developer-oauth@2.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `meteor-tool@3.0.0`: + + - Changes to how meteor apps are being created [PR](https://github.com/meteor/meteor/pull/12697) + +- `meteor@2.0.0`: + + - Async local storage was added to help deal with async methods. + - Added `promiseEmmiter` to help with async methods. + - Removed `fibers` from package. + - `Meteor.absoluteUrl` in localhost uses `127.0.1` by default. + +- `minifier-css@2.0.0`: + + - `minifyCss` is now async. + - Removed `fibers` from package. + +- `minifier-js@3.0.0`: + + - `minifyJs` is now async. + - `terserMinify` no longer takes callbacks + - Removed `fibers` from package. + +* `minimongo@2.0.0`: + - `cursor.observe` now returns `isReady` and `isReadyPromise` wich indicates + if the cursor is ready and if the callbacks are have been called. + If you only use it in the `Client` or as a `LocalCollection` things have not + changed. + +- `mobile-experience@2.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `mobile-status-bar@2.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `modern-browsers@1.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `modules-runtime@1.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `modules@1.0.0`: + + - Updated `reify` version. + +- `mongo-decimal@`: + + - Updated to use `async` methods. + +- `mongo-dev-server@2.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `mongo-id@2.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `mongo-livedata@2.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `mongo@2.0.0`: + + - Updated to unify methods, `update`,`insert`,`remove`, `fetch` are now async, they are + the same as their `*Async` counterpart. + - `ensureIndex` and `createIndex` are now async. + +- `npm-mongo@5.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `oauth-encryption@2.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `oauth@`: + + - `_endOfPopupResponseTemplate` and `_endOfRedirectResponseTemplate` are no longer a property but now a function that returns a promise of the same value as before + - the following server methods are now async: + - `OAuth._renderOauthResults` + - `OAuth._endOfLoginResponse` + - `OAuth.renderEndOfLoginResponse` + - `OAuth._storePendingCredential` + - `OAuth._retrievePendingCredential` + - `ensureConfigured` + - `_cleanStaleResults` + +- `oauth@3.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `oauth1@`: + + - the following server methods are now async: + - `OAuth._storeRequestToken` + - `OAuth._retrieveRequestToken` + +- `oauth1@2.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `oauth2@`: + + - `OAuth._requestHandlers['2']` is now async. + +- `oauth2@2.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `ordered-dict@2.0.0`: + + - Added `forEachAsync` method. + +- `package-stats-opt-out@2.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `package-version-parser@4.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `promise@1.0.0`: + + - Removed `fibers` usage + +- `random@2.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `rate-limit@2.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `reactive-dict@2.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `reactive-var@2.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `reload-safetybelt@2.0.0`: + + - Added `ecmascript` package to `package.js` + +- `reload@2.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `retry@2.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `routepolicy@2.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `server-render@1.0.0`: + + - Updated usage with `getBoilerplate` that are now `async`. + +- `service-configuration@2.0.0`: + + - Updated to use `createIndexAsync`. + +- `session@2.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `sha@2.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `shell-server@1.0.0`: + + - Updated to handle promises results. + +- `socket-stream-client@1.0.0`: + + - Updated tests to handle `async` code. + +- `spiderable@`: + + - Updated handlers to use `handlers` that are now using express + - removed `fibers` usage if flag is set to `true` + +- `standard-minifier-css@2.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `standard-minifier-js@3.0.0`: + + - `processFilesForBundle` is now `async`. + +- `standard-minifiers@2.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `static-html@2.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `test-helpers@2.0.0`: + + - Updated to use `async` methods. + - Removed `fibers` usage. + - Added possibliy to use `async` tests. + +- `test-in-browser@2.0.0`: + + - Updated css to be in dark mode. + +- `test-in-console@2.0.0`: + + - Updated log identation. + +- `test-server-tests-in-console-once@2.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `tinytest-harness@1.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `tinytest@2.0.0`: + + - Added `test name` to logs. + - Removed `fibers` usage. + +- `twitter-config-ui@2.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `twitter-oauth@2.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `typescript@5.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `underscore-tests@2.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `underscore@2.0.0`: + + - Removed dependency in meteor package. + +- `url@2.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `webapp-hashing@2.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `webapp@2.0.0`: + + - These methods are now async: + + - `WebAppInternals.reloadClientPrograms()` + - `WebAppInternals.pauseClient()` + - `WebAppInternals.generateClientProgram()` + - `WebAppInternals.generateBoilerplate()` + - `WebAppInternals.setInlineScriptsAllowed()` + - `WebAppInternals.enableSubresourceIntegrity()` + - `WebAppInternals.setBundledJsCssUrlRewriteHook()` + - `WebAppInternals.setBundledJsCssPrefix()` + - `WebAppInternals.getBoilerplate` + + - Changed engine from connect to express and changed api naming to match express. See below: + - `WebApp.connectHandlers.use(middleware)` is now `WebApp.handlers.use(middleware)` + - `WebApp.rawConnectHandlers.use(middleware)` is now `WebApp.rawHandlers.use(middleware)` + - `WebApp.connectApp` is now `WebApp.expressApp` + +- `weibo-config-ui@2.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +- `weibo-oauth@2.0.0`: + + - Package was bumped due to a dependency update. No code changes were made. + +#### New Public API + + + +- `accounts-base`: (2.9+) + + - `Meteor.userAsync()` + +- `callback-hook`:forEachAsync + + - `forEachAsync` + +- `ddp-server`: (2.8+) + + - `Meteor.callAsync()` + +- `minifier-css`: (2.9+) + + - `CssTools.minifyCssAsync()` + +- `mongo`: + + - `Mongo.Collection`: (2.8+) + - `createCappedCollectionAsync` + - `createIndexAsync` + - `dropCollectionAsync` + - `dropIndexAsync` + - `findOneAsync` + - `insertAsync` + - `removeAsync` + - `updateAsync` + - `upsertAsync` + - `Collection.Cursor`: (2.8+) + - `countAsync` + - `fetchAsync` + - `forEachAsync` + - `mapAsync` + - `[Symbol.asyncIterator]` so this code should work: + ```js + for await (const document of collection.find(query, options)) /* ... */ + ``` + +#### Internal API changes + +`accounts-base`: + +- `_attemptLogin` +- `_loginMethod` +- `_runLoginHandlers` + +* Upgraded `node-gyp` to v9.4.0 +* Upgraded `node-pre-gyp` to `@mapbox/node-pre-gyp` v1.0.11 + +#### New Internal API + +`accounts-password`: + +- `Accounts._checkPasswordAsync` + +#### Special thanks to + +- [@StorytellerCZ](https://github.com/sponsors/StorytellerCZ/) + +For making this great framework even better! +## v2.13.3, 2023-09-08 + +### Highlights + +* Solves the issue [#12771: Version 2.13.1 suddenly requires a newer glibc version](https://github.com/meteor/meteor/issues/12771). + +#### Breaking Changes + +N/A + +#### Internal API changes + +N/A + +#### Migration Steps + +Please run the following command to update your project: + +```bash + +meteor update --release 2.13.3 + +``` + + +#### Meteor Version Release + + +* `Command line`: + - The bundle version was changed to 14.21.4.3 to use another compiled version of the [ESM Node.js](https://guide.meteor.com/using-node-v14.21.4). The previous version was generated using a different unix distribution (Ubuntu) while we should use CentOS. + + +#### Special thanks to + +- [@aquinoit](https://github.com/aquinoit). +- [@fredmaiaarantes](https://github.com/fredmaiaarantes). +- [@Grubba27](https://github.com/Grubba27). + +For making this great framework even better! + + +## v2.13.1, 2023-09-04 + +### Highlights + +* Solved zlib issue with Meteor.js and ESM Node.js 14.21.4 [PR](https://github.com/meteor/meteor/pull/12765) by (GH Grubba27). + +#### Breaking Changes + +N/A + +#### Internal API changes + +N/A + +#### Migration Steps + +Please run the following command to update your project: + +```bash + +meteor update --release 2.13.1 + +``` + + +#### Meteor Version Release + + +* `Command line`: + - The bundle version was changed to 14.21.4.1 to use another compiled version of the [ESM Node.js](https://guide.meteor.com/using-node-v14.21.4). + + +#### Special thanks to + +- [@Grubba27](https://github.com/Grubba27). + + +For making this great framework even better! + + +## v2.13.0, 2023-07-26 + +### Highlights + +* Handled implicit collection creation oplog message by [radekmie](https://github.com/radekmie) [PR](https://github.com/meteor/meteor/pull/12643). +* Fix upsert logs when using WARN_WHEN_USING_OLD_API flag by [Grubba27](https://github.com/Grubba27) [PR](https://github.com/meteor/meteor/pull/12640). +* Updating mongo types by [Grubba27](https://github.com/Grubba27) [PR](https://github.com/meteor/meteor/pull/12639). +* Fix solid skeleton by [fredmaiaarantes](https://github.com/fredmaiaarantes) [PR](https://github.com/meteor/meteor/pull/12637). +* Setting The Viewport meta tag on skeletons [fredmaiaarantes](https://github.com/fredmaiaarantes) [PR](https://github.com/meteor/meteor/pull/12636). +* Update mongo.d.ts with projection [StorytellerCZ](https://github.com/StorytellerCZ) [PR](https://github.com/meteor/meteor/pull/12635). +* Update guide code for GraphQL [StorytellerCZ](https://github.com/StorytellerCZ) [PR](https://github.com/meteor/meteor/pull/12619). +* Twitter Whitelist issue resolved [Atharshoyeb](https://github.com/Atharshoyeb) [PR](https://github.com/meteor/meteor/pull/12369). +* Node security patch (14.21.4) [PR](https://github.com/meteor/node-v14-esm/pull/1). Thanks a lot [denihs](https://github.com/denihs) for your contribuiton. +* Updated deprecated reference in mongo package by [StorytellerCZ](https://github.com/StorytellerCZ) [PR](https://github.com/meteor/meteor/pull/12653/files). +* Updated BlazeJS git ref in core meteor to 2.7.1 by [Grubba27](https://github.com/Grubba27) [PR](https://github.com/meteor/meteor/pull/12651). +* Added `Meteor.applyAsync` types by [Julusian](https://github.com/Julusian) [PR](https://github.com/meteor/meteor/pull/12645). + + +#### Breaking Changes + +If you are running Meteor with docker you will +need to update your docker file to use our [new docker image](https://hub.docker.com/r/meteor/node) +that contains Nodejs v14.21.4. + +#### Known issues + +Please, [check our known issues page](https://docs.meteor.com/known-issues) +for more information about the problems and issues you might find while migrating. + +#### Internal changes + +* `ddp-server@3.0.0`: + - Updated livedata server test to be more easily debbuged. + +* `mongo@2.0.0`: + - Updated deprecated reference in Mongo package. + +#### Migration Steps + + +Please, follow our [migration guide](https://guide.meteor.com/2.13-migration) to understand what's needed to upgrade to Meteor 2.13. + +#### Meteor Version Release + + +* `Command line`: + - Updated metatags for skeletons. + - Updated solidjs skeleton to be more idiomatic. + +* `meteor@1.11.3`: + - Added types for applyAsync and added more documentation for applyAsync options. + +* `mongo@1.16.7`: + - Updated types with projection. + - Fixed wrong upsert logs when using WARN_WHEN_USING_OLD_API flag. + - Handled implicit collection creation oplog message. + +* `test-in-console@1.2.5`: + - Adjusted log indentation. + - All errors will be logged to console. + - Will always use puppeteer@20.4.0 + +* `twitter-oauth@1.3.3`: + - Fixed twitter whitelist issue. + + +#### Special thanks to + +- [@radekmie](https://github.com/radekmie). +- [@Grubba27](https://github.com/Grubba27). +- [@fredmaiaarantes](https://github.com/fredmaiaarantes). +- [@StorytellerCZ](https://github.com/StorytellerCZ). +- [@Atharshoyeb](https://github.com/Atharshoyeb). +- [@Julusian](https://github.com/Julusian). +- [@denihs](https://github.com/denihs). +## v2.12.0, 2023-04-28 + +### Highlights + +* Document main function in webapp by [harryadel](https://github.com/harryadel) [PR](https://github.com/meteor/meteor/pull/12579) +* Add undocument properties to docs by [harryadel](https://github.com/harryadel) [PR](https://github.com/meteor/meteor/pull/12563) +* Bump NPM versions for css minifiers by [wreiske](https://github.com/wreiske) [PR](https://github.com/meteor/meteor/pull/12562) +* Updated Email and Mongo package types by [ebroder](https://github.com/ebroder) [PR](https://github.com/meteor/meteor/pull/12554) +* Updated security.md by [jamauro](https://github.com/jamauro) [PR](https://github.com/meteor/meteor/pull/12461) +* Added addHtmlAttributeHook type on WebApp by [DblK](https://github.com/DblK) [PR](https://github.com/meteor/meteor/pull/12545) +* Added loginServiceConfiguration type on Accounts by [DblK](https://github.com/DblK) [PR](https://github.com/meteor/meteor/pull/12539) +* Add TS types for Mongo Collection countDocuments and estimatedDocumentCount by [ArthurHoaro](https://github.com/ArthurHoaro) [PR](https://github.com/meteor/meteor/pull/12533) +* Allow setting a custom ddp-rate-limit message per rule by [wreiske](https://github.com/wreiske) [PR](https://github.com/meteor/meteor/pull/12082) +* Updated MongoDB driver to 4.15 by [Grubba27](https://github.com/Grubba27) [PR](https://github.com/meteor/meteor/pull/12583) +* Adding warn with env variable when using old apis vy [Grubba27](https://github.com/Grubba27) [PR](https://github.com/meteor/meteor/pull/12585) +* Fix syntax for legacy client by [zodern](https://github.com/zodern) [PR](https://github.com/meteor/meteor/pull/12596) +* Updating MongoDB driver to 4.16 by [Grubba27](https://github.com/Grubba27) [PR](https://github.com/meteor/meteor/pull/12599) +* Update sockjs-client by [harryadel](https://github.com/harryadel) [PR](https://github.com/meteor/meteor/pull/12590) +* [Accounts] set custom collection by [dmromanov](https://github.com/dmromanov) [PR](https://github.com/meteor/meteor/pull/12591) +* Wrappers to help in the async migration by [matheusccastroo](https://github.com/matheusccastroo) [PR](https://github.com/meteor/meteor/pull/12593) +* Mongo query hangs all clients subscribed to a query/collection by [KoenLav](https://github.com/KoenLav) [PR](https://github.com/meteor/meteor/pull/12587) +* Blaze to 2.6.2 by [StorytellerCZ](https://github.com/StorytellerCZ) [PR](https://github.com/meteor/blaze/pull/411) + +#### Breaking Changes + +N/A + +#### Internal API changes + +N/A + +#### Migration Steps + +Now if you want to check where do you call old-style api methods +you can use ```WARN_WHEN_USING_OLD_API``` before starting your meteor process. + + +#### Meteor Version Release + +* `accounts-base@2.2.8`: + - Added `loginServiceConfiguration` type. + - Added the `collection` option property, in order to be able to set the collection for Accounts, + more can be seen in the [discussion](https://github.com/meteor/meteor/discussions/12544#discussioncomment-5240763) + and in the [related issue](https://github.com/meteor/meteor-feature-requests/issues/20). + - `onCreateUserHook` now accept promises and wait if necessary. + +* `babel-compiler@7.10.4`: + - Added `es5` compatible syntax. + +* `browser-policy-content@1.1.2`: + - Added `es5` compatible syntax. + +* `browser-policy-framing@1.1.2`: + - Added `es5` compatible syntax. + +* `browser-policy@1.1.2`: + - Updated test name. + +* `callback-hook@1.5.1`: + - Added async hooks possibility to make async migrations easier. + +* `context@0.5.1`: + - Added `es5` compatible syntax. + +* `ddp-rate-limiter@1.2.0`: + - Allow setting a custom ddp-rate-limit message per rule. + +* `ddp-server@2.6.1`: + - Updated sockjs version. + +* `dev-error-overlay@0.1.2`: + - Added `es5` compatible syntax by adding the `ecmascript` package. + +* `dynamic-import@0.7.3`: + - Added `es5` compatible syntax. + +* `ecmascript@0.16.7`: + - Updated tests location. + +* `ecmascript-runtime@0.8.1`: + - Updated npm dependencies. + +* `email@2.2.5`: + - Updated type `CustomEmailOptions` to be a type instead of an interface. + +* `hot-module-replacement@0.5.3`: + - Added `es5` compatible syntax. + + +* `meteor@1.11.2`: + - Added documentation for `isTest`, `isAppTest` and `isPackageTest` methods. + - Added possibility to add async hooks to make async migrations easier. [PR](https://github.com/meteor/meteor/pull/12593) + +* `minifier-css@1.6.4`: + - Bump NPM versions for css minifiers. + +* `minimongo@1.9.3`: + - Updated to be able to track old api usage. + +* `modules-runtime-hot@0.14.2`: + - Added `es5` compatible syntax. + +* `mongo@1.16.6`: + - Added `countDocuments` and `estimatedDocumentCount` types. + - Added warning for when old style apis are being used, to use this feature, + use the variable`WARN_WHEN_USING_OLD_API=true` before starting the Meteor process. + - Oplog driver updated to not throw error when MongoDB server and Meteor client mismatch. [issue](https://github.com/meteor/meteor/issues/12516) + +* `non-core`: + - Blaze to version 2.6.2. + +* `npm-mongo@4.16.0`: + - Updated MongoDB driver to 4.15. + - Updated MongoDB driver to 4.16. + +* `rate-limit@1.1.1`: + - Added `ruleId` property that will be used for setting messages. + +* `react-fast-refresh@0.2.7`: + - Added `es5` compatible syntax. + +* `socket-stream-client@0.5.0`: + - Updated sockjs version. + +* `standard-minifier-css@1.9.2`: + - Bump NPM versions for css minifiers. + +* `tracker@1.3.2`: + - Updated types and updated JSDocs for `Tracker.withComputation`. + +* `underscore@1.0.13`: + - Updated npm dependencies. + +* `webapp@1.13.5`: + - Added `addHtmlAttributeHook` type. + + + +#### Special thanks to + +- [@harryadel](https://github.com/harryadel). +- [@wreiske](https://github.com/wreiske). +- [@ebroder](https://github.com/ebroder). +- [@jamauro](https://github.com/jamauro). +- [@DblK](https://github.com/DblK). +- [@ArthurHoaro](https://github.com/ArthurHoaro). +- [@Grubba27](https://github.com/Grubba27). +- [@zodern](https://github.com/zodern). +- [@dmromanov](https://github.com/dmromanov). +- [@matheusccastroo](https://github.com/matheusccastroo). +## v2.11.0, 2023-03-02 + +### Highlights + +* MongoDB Server 6.x Support +* Embedded Mongo now uses MongoDB 6.0.3 +* Optimized makeLookupFunction + by [radekmie](https://github.com/radekmie) [PR](https://github.com/meteor/meteor/pull/12462) +* In async wrappers, catch exceptions and reject + by [ebroder](https://github.com/ebroder) [PR](https://github.com/meteor/meteor/pull/12469) +* Bump Typescript to v4.9.4 by [Firfi](https://github.com/Firfi) [PR](https://github.com/meteor/meteor/pull/12465) +* Ensure the meteor.loginServiceConfiguration subscription always becomes ready + by [Torgen](https://github.com/Torgen) [PR](https://github.com/meteor/meteor/pull/12480) +* Deprecate appcache package + by [StorytellerCZ](https://github.com/StorytellerCZ) [PR](https://github.com/meteor/meteor/pull/12456) +* Made standard-minifier-css debuggable + by [softwarecreations](https://github.com/softwarecreations) [PR](https://github.com/meteor/meteor/pull/12478). +* Upgrading MongoDB Driver to v4.14 + by [Grubba27](https://github.com/Grubba27) [PR](https://github.com/meteor/meteor/pull/12501) +* Remove Blaze dependency and types that live in blaze.d.ts + by [perbergland](https://github.com/perbergland) [PR](https://github.com/meteor/meteor/pull/12428) + +* Switch typescript skeleton to zodern:types and test that it works by [ebroder](https://github.com/ebroder) [PR](https://github.com/meteor/meteor/pull/12510) +* Remove packages/*/.npm from gitignore and add missing .npm folders by [ebroder](https://github.com/ebroder) [PR](https://github.com/meteor/meteor/pull/12508) +* Add type definitions for async methods from Meteor 2.9 by [ebroder](https://github.com/ebroder) [PR](https://github.com/meteor/meteor/pull/12507) +* TypeScript skeleton fixes by [ebroder](https://github.com/ebroder) [PR](https://github.com/meteor/meteor/pull/12506) +* Fix TypeScript type dependencies for mongo, webapp, and underscore by [ebroder](https://github.com/ebroder) [PR](https://github.com/meteor/meteor/pull/12505) +* Improve specificity of types previously declared as "Object" by [ebroder](https://github.com/ebroder) [PR](https://github.com/meteor/meteor/pull/12520) +* Bump to Node 14.21.3 by [StorytellerCZ](https://github.com/StorytellerCZ) [PR](https://github.com/meteor/meteor/pull/12517) + +#### Breaking Changes + +`meteor mongo` command was removed due compatibility with MongoDB v6.x of `mongosh +for more information about MongoDB migration +read our [Migration Guide](https://guide.meteor.com/2.11-migration.html) for this version. + +#### Internal API changes + +App cache is now deprecated. + +#### Migration Steps + +Read our [Migration Guide](https://guide.meteor.com/2.11-migration.html) for this version. + +#### Meteor Version Release + +* `accounts-2fa@2.0.2`: + - removed .npm/package contents and added .gitignore + +* `accounts-base@2.2.7`: + - Updated types to match async methods added in newer versions. + - Ensured the meteor.loginServiceConfiguration subscription always becomes ready, by adding a this.ready() call. + - Specified that previously were declared as "Object" types. More context can be seen in [PR](https://github.com/meteor/meteor/pull/12520). + +* `accounts-password@2.3.4`: + - Updated `Accounts.changePassword` and `Accounts.resetPassword` to be correctly verify if the new password is + valid. + - removed .npm/package contents and added .gitignore + +* `appcache@1.2.8` + - Deprecated appcache + package. [applicationCache](https://developer.mozilla.org/en-US/docs/Web/API/Window/applicationCache), which this + package relies on, has been deprecated and is not available on the latest browsers. + +* `babel-compiler@7.10.3`: + - Updated typescript to version 4.9.4. + +* `ecmascript@0.16.6`: + - Updated typescript to version 4.9.4. + +* `email@2.2.4`: + - Updated types to match async methods added in newer versions. + - Specified that previously were declared as "Object" types. More context can be seen in [PR](https://github.com/meteor/meteor/pull/12520). + +* `logging@1.3.2`: + - removed .npm/package contents and added .gitignore + +* `Command line`: + - Corrected typo in vue skeleton. + - Command `meteor mongo` was removed due compatibility with MongoDB v6.x of `mongosh` + +* `meteor@1.11.1`: + - updated types to removed unused Blaze types + - Specified that previously were declared as "Object" types. More context can be seen in [PR](https://github.com/meteor/meteor/pull/12520). + +* `minimongo@1.9.2`: + - Updated performance of makeLookupFunction + - In async wrappers, catch exceptions and reject + +* `mongo@1.16.5`: + - In async wrappers, catch exceptions and reject + - Updated MongoDB types to match driver version 4.13.0 and MongoDB server version 6.0.3 + - Specified that previously were declared as "Object" types. More context can be seen in [PR](https://github.com/meteor/meteor/pull/12520). + - Now uses MongoDB v6.0.3 + - Now uses Node v14.21.3 + +* `npm-mongo@4.14.0`: + - Updated MongoDB driver to version 4.14.0 + +* `oauth@2.2.0`: + - bumped cordova-plugin-inappbrowser to 5.0.0 + +* `react-fast-refresh@0.2.6`: + - removed .npm/package contents and added .gitignore + +* `standard-minifier-css@1.9.0`: + - standard-minifier-css is now debuggable + +* `tracker@1.3.1`: + - Added missing withComputation method in types + +* `typescript@4.9.4` + - Updated typescript to version 4.9.4. + +* `underscore@1.0.12`: + - Added dependency in types to underscore + +* `webapp@1.13.4`: + - Added dependency in types to webapp(to connect) + - removed .npm/package contents and added .gitignore + +* `@meteorjs/babel@7.18.0-beta.6` + - Updated typescript to version 4.9.4. + +#### Special thanks to + +- [@radekmie](https://github.com/radekmie). +- [@ebroder](https://github.com/ebroder). +- [@Firfi](https://github.com/Firfi). +- [@Torgen](https://github.com/Torgen). +- [@StorytellerCZ](https://github.com/StorytellerCZ). +- [@softwarecreations](https://github.com/softwarecreations). +- [@Grubba27](https://github.com/Grubba27). + +For making this great framework even better! + + + +## v2.10.0, 2023-01-13 + +### Highlights + +* Update skeletons to use React 18 [PR](https://github.com/meteor/meteor/pull/12419) by [StorytellerCZ](https://github.com/StorytellerCZ). +* Use MongoDB types instead of the homebuilt [PR](https://github.com/meteor/meteor/pull/12415) by [perbergland](https://github.com/perbergland). +* Fixing wrong type definitions in MongoDB package [PR](https://github.com/meteor/meteor/pull/12409) by [ebroder](https://github.com/ebroder). +* Typescript to version v4.7.4 [PR](https://github.com/meteor/meteor/pull/12393) by [StorytellerCZ](https://github.com/StorytellerCZ). +* Update test-in-browser dependencies [PR](https://github.com/meteor/meteor/pull/12384) by [harryadel](https://github.com/harryadel). +* Update boilerplate-generator-tests [PR](https://github.com/meteor/meteor/pull/12429) by [harryadel](https://github.com/harryadel). +* Replace double-ended-queue with denque [PR](https://github.com/meteor/meteor/pull/12430) by [harryadel](https://github.com/harryadel). +* Allow multiple runtime config and updated runtime hooks [PR](https://github.com/meteor/meteor/pull/12426) by [ebroder](https://github.com/ebroder). +* Added async forEach and clear for method Hooks [PR](https://github.com/meteor/meteor/pull/12427) by [Grubba27](https://github.com/Grubba27). +* Implemented async Tracker with explicit values [PR](https://github.com/meteor/meteor/pull/12294) by [radekmie](https://github.com/radekmie). +* Improved eslint config [PR](https://github.com/meteor/meteor/pull/12309) by [afrokick](https://github.com/afrokick). + +#### Breaking Changes + +N/A + +#### Internal API changes + +N/A + +#### Migration Steps + +N/A + +#### Meteor Version Release + +* `babel-compiler@7.10.2`: + - Updated @meteorjs/babel to version 7.18.0. + - Updated to typescript to version v4.7.4. + +* `boilerplate-generator-tests@1.5.1`: + - Updated parse5 and turned streamToString into a local function. + +* `callback-hook@1.5.0` + - Added forEachAsync. + +* `ecmascript@0.16.5` + - Updated typescript to version 4.7.4. + +* `Command line`: + - Updated React skeletons to use React 18 + +* `Meteor@1.11.0`: + - Replaced double-ended-queue with [denque](https://github.com/invertase/denque) + +* `mongo@1.16.4`: + - Fixed wrong type definitions. + - switch to using MongoDB types instead of the homebuilt. + - Fixed wrong type definitions in MongoDB package related to dropIndexAsync + +* `react-fast-refresh@0.2.5`: + - Updated react-refresh dependency. + +* `test-in-browser@1.3.3`: + - Updated dependencies and removed unused libs. + +* `Tracker@1.3.0`: + - Implemented async Tracker with explicit values + +* `typescript@4.7.4` + - Updated typescript to version 4.7.4. + +* `webapp@1.13.3` + - The forEach method on Hook will stop iterating unless the iterator function returns a truthy value. + Previously, this meant that only the first registered runtime config hook would be called. + +* `@meteorjs/babel@7.18.0-beta.5` + - Updated typescript to version 4.7.4. + +#### Special thanks to +- [@StorytellerCZ](https://github.com/StorytellerCZ). +- [@perbergland](https://github.com/perbergland). +- [@ebroder](https://github.com/ebroder). +- [@harryadel](https://github.com/harryadel). +- [@radekmie](https://github.com/radekmie). +- [@Grubba27](https://github.com/Grubba27). +- [@afrokick](https://github.com/afrokick). + +For making this great framework even better! + + + +## v2.9.1, 2022-12-27 + +### Highlights + +* Reverted missing types [PR](https://github.com/meteor/meteor/pull/12366) by [Grubba27](https://github.com/Grubba27). +* Fix fetch() type declaration [PR](https://github.com/meteor/meteor/pull/12352) by [zarvox](https://github.com/zarvox). +* update svelte skeleton [PR](https://github.com/meteor/meteor/pull/12350) by [tosinek](https://github.com/tosinek). +* Bump to node 14.21.2.0 [PR](https://github.com/meteor/meteor/pull/12370) by [Grubba27](https://github.com/Grubba27). +* resetPassword and verifyEmail to no longer sign in the user automatically [PR](https://github.com/meteor/meteor/pull/12385) by [denihs](https://github.com/denihs). +* Added missing vue2 declaration for skeletons [PR](https://github.com/meteor/meteor/pull/12396) by [Grubba27](https://github.com/Grubba27) & [mlanning](https://github.com/mlanning). + +#### Breaking Changes + +* `accounts-password@2.3.3` + - The methods `resetPassword` and `verifyEmail` no longer logs the user if they have 2FA enabled. Now, the functions work as before, but instead of automatically logging in the user at the end, an error with the code `2fa-enabled` will be thrown. + + +#### Internal API changes + +N/A + +#### Migration Steps + +N/A + +#### Meteor Version Release + +* `fetch@0.1.3`: + - Updated fetch type definition. + +* `meteor@1.10.4`: + - Added back meteor type definitions that were removed by mistake in earlier version. + +* `accounts-password@2.3.3` + - The methods `resetPassword` and `verifyEmail` no longer logs the user if they have 2FA enabled. Now, the functions work as before, but instead of automatically logging in the user at the end, an error with the code `2fa-enabled` will be thrown. + +* `Command line`: + - Updated Svelte skeleton to now be able to support typescript out of the box and added ``#each`` in links in the skeleton. + - Updated node to 14.21.2 changes can be seen [here](https://github.com/nodejs/node/releases/tag/v14.21.2). + - Solved [issue](https://github.com/meteor/meteor/issues/12395) that could not allow vue2 apps being created in command line. + +#### Special thanks to +- [@zarvox](https://github.com/zarvox). +- [@tosinek](https://github.com/tosinek). +- [@Grubba27](https://github.com/Grubba27). +- [@denihs](https://github.com/denihs). +- [@mlanning](https://github.com/mlanning). + +For making this great framework even better! + + +## v2.9, 2022-12-12 + +### Highlights + +* TypeScript update to v4.6.4 [PR](https://github.com/meteor/meteor/pull/12204) by [@StorytellerCZ](https://github.com/StorytellerCZ). +* Create Email.sendAsync method without using Fibers [PR](https://github.com/meteor/meteor/pull/12101) + by [edimarlnx](https://github.com/edimarlnx). +* Create async method CssTools.minifyCssAsync [PR](https://github.com/meteor/meteor/pull/12105) + by [edimarlnx](https://github.com/edimarlnx). +* Change Accounts and Oauth to use Async methods [PR](https://github.com/meteor/meteor/pull/12156) + by [edimarlnx](https://github.com/edimarlnx). +* TinyTest package without Future [PR](https://github.com/meteor/meteor/pull/12222) + by [matheusccastroo](https://github.com/matheusccastroo). +* Feat: user accounts base async [PR](https://github.com/meteor/meteor/pull/12274) + by [Grubba27](https://github.com/Grubba27). +* Move somed methods from OAuth of out of accounts-base [PR](https://github.com/meteor/meteor/pull/12202) + by [StorytellerCZ](https://github.com/StorytellerCZ). +* Feat: not using insecure & autopublish [PR](https://github.com/meteor/meteor/pull/12220) + by [Grubba27](https://github.com/Grubba27). +* Don't apply babel async-await plugin when not running on Fibers [PR](https://github.com/meteor/meteor/pull/12221). + by [matheusccastroo](https://github.com/matheusccastroo). +* Implemented Fibers-less MongoDB count methods [PR](https://github.com/meteor/meteor/pull/12295) + by [radekmie](https://github.com/radekmie). +* Feat: Generate scaffold in cli [PR](https://github.com/meteor/meteor/pull/12298) + by [Grubba27](https://github.com/Grubba27). +* Update types [PR](https://github.com/meteor/meteor/pull/12306) by [piotrpospiech](https://github.com/piotrpospiech). +* Remove underscore from package-version-parser [PR](https://github.com/meteor/meteor/pull/12248) + by [harryadel](https://github.com/harryadel). +* Update MongoDB driver version [PR](https://github.com/meteor/meteor/pull/12333) by [Grubba27](https://github.com/Grubba27). +* New Vue3 Skeleton [PR](https://github.com/meteor/meteor/pull/12302) + by [henriquealbert](https://github.com/henriquealbert). + +#### Breaking Changes +* `Accounts.createUserVerifyingEmail` is now async + +#### Internal API changes +* Internal methods from `OAuth` that are now async: + - _attemptLogin + - _loginMethod + - _runLoginHandlers + - OAuth.registerService now accepts async functions + +OAuth related code has been moved from `accounts-base` to `accounts-oauth`, removing the dependency on `service-configuration` +more can be seen in this [discussion](https://github.com/meteor/meteor/discussions/12171) and in the [PR](https://github.com/meteor/meteor/pull/12202). +This means that if you don’t use third-party login on your project, you don’t need to add the package service-configuration anymore. + +#### Migration Steps + +You can follow in [here](https://guide.meteor.com/2.9-migration.html). + +#### Meteor Version Release + +* `eslint-plugin-meteor@7.4.0`: + - updated Typescript deps and meteor babel. +* `eslint-plugin-meteor@7.4.0`: + - updated Typescript deps and meteor babel. +* `accounts-base@2.2.6` + - Moved some functions to accounts-oauth. +* `accounts-oauth@1.4.2` + - Received functions from accounts-base. +* `accounts-password@2.3.2` + - Asyncfied functions such as `changePassword`, `forgotPassword`, `resetPassword`, `verifyEmail`, `setPasswordAsync`. +* `babel-compiler@7.10.1` + - Updated babel to 7.17.1. +* `email@2.2.3` + - Create Email.sendAsync method without using Fibers. +* `facebook-oauth@1.11.2` + - Updated facebook-oauth to use async functions. +* `github-oauth@1.4.1` + - Updated github-oauth to use async functions. +* `google-oauth@1.4.3` + - Updated google-oauth to use async functions. +* `meetup-oauth@1.1.2` + - Updated meetup-oauth to use async functions. +* `meteor-developer-oauth@1.3.2` + - Updated meteor-developer-oauth to use async functions. +* `meteor@1.10.3` + - Added Async Local Storage helpers. +* `minifier-css@1.6.2` + - Asyncfied `minifyCss` function. +* `minimongo@1.9.1` + - Implemented Fibers-less MongoDB count methods. +* `mongo@1.16.2` + - Implemented Fibers-less MongoDB count methods. +* `npm-mongo@4.12.1` + - Updated npm-mongo to 4.12. +* `oauth@2.1.3` + - Asyncfied methods. +* `oauth1@1.5.1` + - Asyncfied methods. +* `oauth2@1.3.2` + - Asyncfied methods. +* `package-version-parser@3.2.1` + - Removed underscore. +* `promise@0.12.2` + - Added DISABLE_FIBERS flag. +* `standard-minifier-css@1.8.3` + - Asyncfied minify method. +* `test-helpers@1.3.1` + - added runAndThrowIfNeeded function. +* `test-in-browser@1.3.2` + - Adjusted e[type] to e.type +* `tinytest@1.2.2` + - TinyTest package without Future. +* `twitter-oauth@1.3.2` + - Asyncfied methods. +* `typescript@4.6.4` + - updated typescript to 4.6.4. +* `weibo-oauth@1.3.2` + - Asyncfied methods. + +#### Special thanks to +- [@henriquealbert](https://github.com/henriquealbert); +- [@edimarlnx](https://github.com/edimarlnx); +- [@matheusccastroo](https://github.com/matheusccastroo); +- [@Grubba27](https://github.com/Grubba27); +- [@StorytellerCZ](https://github.com/StorytellerCZ); +- [@radekmie](https://github.com/radekmie); +- [@piotrpospiech](https://github.com/piotrpospiech); +- [@harryadel](https://github.com/harryadel); + +For making this great framework even better! + + +## v2.8.2, 2022-11-29 + +#### Highlights +* `mongo@1.16.2`: + - Make count NOT create a cursor. [PR](https://github.com/meteor/meteor/pull/12326). +* `meteorjs/babel@7.16.1-beta.0` + - Adjusted config to Auto import React on jsx,tsx files [PR](https://github.com/meteor/meteor/pull/12327). + - needs to use directly from npm the meteorjs/babel@7.16.1-beta.0. + +#### Breaking Changes +N/A + +#### Migration Steps + +#### Meteor Version Release +* `mongo@1.16.2`: + - Make count NOT create a cursor. [PR](https://github.com/meteor/meteor/pull/12326). + +#### Special thanks to +- [@henriquealbert](https://github.com/henriquealbert); +- [@znewsham](https://github.com/znewsham); + +For making this great framework even better! + + + +## v2.8.1, 2022-11-14 + +#### Highlights + +- modernize tools/run-updater.js by [afrokick](https://github.com/afrokick) +- feat(error message): Especifing error message when cross-boundary by [Grubba27](https://github.com/Grubba27) +- Type definitions for core packages by [piotrpospiech](https://github.com/piotrpospiech) +- Add https proxy support to meteor-installer by [heschong](https://github.com/heschong) +- Fix case insensitive lookup resource overuse by [ToyboxZach](https://github.com/ToyboxZach) +- Update default Facebook API to v15 and fix local changelog by [StorytellerCZ](https://github.com/StorytellerCZ) +- Bump to Node v14.21.1 by [StorytellerCZ](https://github.com/StorytellerCZ) +- Use true mongo binary types by [znewsham](https://github.com/znewsham) +- Add docs for Accounts.registerLoginHandler by [shivam1646](https://github.com/shivam1646) +- Updated MongoDB driver to 4.11 by [radekmie](https://github.com/radekmie) +- Show port in restart message by [harryadel](https://github.com/harryadel) +- In the client, don't wait if the stub doesn't return a promise by [denihs](https://github.com/denihs) +- The rest of type definitions for core packages by [piotrpospiech](https://github.com/piotrpospiech) +- Removing underscore in packages by [harryadel](https://github.com/harryadel): + - [twitter-oauth] Remove underscore + - [test-in-browser] Remove underscore + - [webapp-hashing] Remove underscore + - [browser-policy] Remove underscore + - [ecmascript] Remove underscore + - [browser-policy-framing] Remove underscore + - [diff-sequence] Remove underscore + - [facts-ui] Remove underscore + - [geojson-utils] Remove underscore + +#### Breaking Changes + +N/A + +#### Migration Steps + +_In case you want types in your app using the core packages types/zodern:types (now you do have the option)_ + +1. Remove `@types/meteor` package +2. Install [`zodern:types`](https://github.com/zodern/meteor-types) package +3. Follow [installation guide for the Meteor Apps](https://github.com/zodern/meteor-types#meteor-apps) to update + +#### Meteor Version Release + +* `accounts-base@2.2.5` + - added types for package. +* `browser-policy@1.1.1` + - adjusted package tests. +* `browser-policy-common@1.0.12` + - added types for package. +* `browser-policy-framing@1.1.1` + - removed underscore. +* `check@1.3.2` + - added types for package. +* `ddp@1.4.0` + - added types for package. +* `ddp-client@2.6.1` + - In the client, don't wait if the stub doesn't return a promise. +* `ddp-rate-limiter@1.1.1` + - added types for package. +* `diff-sequence@1.1.2` + - removed underscore. +* `ecmascript@0.16.3` + - removed underscore. +* `ejson@1.1.3` + - added types for package. +* `ejson@2.2.2` + - added types for package. +* `facebook-oauth@1.12.0` + - Updated default version of Facebook GraphAPI to v15 +* `facts-ui@1.0.1` + - removed underscore. +* `fetch@0.1.2` + - added types for package. +* `geojson-utils@1.0.11` + - removed underscore. +* `hot-module-replacement@0.5.2` + - added types for package. +* `meteor@1.10.2` + - added types for package. +* `modern-browsers@0.1.9` + - added types for package. +* `modules-runtime@0.13.2` + - added accurate error messages. +* `modules-runtime-hot@0.14.1` + - added accurate error messages. +* `mongo@1.16.1` + - added types for package. + - added true mongo binary +* `npm-mongo@4.11.0` + - updated npm mongo version to match npm one. +* `promise@0.13.0` + - added types for package. +* `random@1.2.1` + - added types for package. +* `reactive-dict@1.3.1` + - added types for package. +* `reactive-dict@1.0.12` + - added types for package. +* `server-render@0.4.1` + - added types for package. +* `service-configuration@1.3.1` + - added types for package. +* `session@1.2.1` + - added types for package. +* `test-in-browser@1.3.1` + - removed underscore. +* `tracker@1.2.1` +- added types for package. +* `twitter-oauth@1.3.1` + - removed underscore. +* `underscore@1.0.11` + - added types for package. +* `webapp@1.13.2` + - added types for package. +* `webapp-hashing@1.1.1` + - added types for package. +## v2.8, 2022-10-19 + +#### Highlights +* New MongoDB Package Async API. [PR](https://github.com/meteor/meteor/pull/12028) +* Node update to [v14.20.1](https://nodejs.org/en/blog/release/v14.20.1/) as part of the [September 22nd security release](https://nodejs.org/en/blog/vulnerability/september-2022-security-releases/) +* Update MongoDB driver to 4.9. [PR](https://github.com/meteor/meteor/pull/12097) +* Meteor.callAsync method. [PR](https://github.com/meteor/meteor/pull/12196) +* Added new Chakra-ui Skeleton. [PR](https://github.com/meteor/meteor/pull/12181) +* Added new Solid Skeleton. [PR](https://github.com/meteor/meteor/pull/12186) + +#### Breaking Changes +N/A + +#### Migration Steps +Read our [Migration Guide](https://guide.meteor.com/2.8-migration.html) for this version. + +#### Meteor Version Release +* `modules@0.19.0`: + - Updating reify version. [PR](https://github.com/meteor/meteor/pull/12055). +* `minimongo@1.9.0`: + - New methods to work with the Async API. [PR](https://github.com/meteor/meteor/pull/12028). + - Solved invalid dates in Minimongo Matcher [PR](https://github.com/meteor/meteor/pull/12165). +* `mongo@1.16.0`: + - Adding async counterparts that allows gradual migration from Fibers. [PR](https://github.com/meteor/meteor/pull/12028). + - Improved oplogV2V1Converter implementation. [PR](https://github.com/meteor/meteor/pull/12116). + - Exit on MongoDB connection error. [PR](https://github.com/meteor/meteor/pull/12115). + - Fixed MongoConnection._onFailover hook. [PR](https://github.com/meteor/meteor/pull/12125). + - Fixed handling objects in oplogV2V1Converter. [PR](https://github.com/meteor/meteor/pull/12107). +* `meteor@1.10.1`: + - Create method to check if Fibers is enabled by flag DISABLE_FIBERS. [PR](https://github.com/meteor/meteor/pull/12100). + - Fix bugs for linter build plugins. [PR](https://github.com/meteor/meteor/pull/12120). + - Document meteor show METEOR. [PR](https://github.com/meteor/meteor/pull/12124). + - Update Cordova Android to 10.1.2. [PR](https://github.com/meteor/meteor/pull/12131). + - Fixed flaky test. [PR](https://github.com/meteor/meteor/pull/12129). + - Refactoring/Remove unused imports from tools folder. [PR](https://github.com/meteor/meteor/pull/12084). + - Fix problem when publishing async methods. [PR](https://github.com/meteor/meteor/pull/12152). + - Update skeletons Apollo[PR](https://github.com/meteor/meteor/pull/12091) and other skeletons [PR](https://github.com/meteor/meteor/pull/12099) + - Added callAsync method for calling async methods [PR](https://github.com/meteor/meteor/pull/12196). +* `meteor-installer@2.7.5`: + - Validates required Node.js version. [PR](https://github.com/meteor/meteor/pull/12066). +* `npm-mongo@4.9.0`: + - Updated MongoDB driver to 4.9. [PR](https://github.com/meteor/meteor/pull/12163). +* `@meteorjs/babel@7.17.0` + - Upgrade TypeScript to `4.6.4` +* `babel-compiler@7.10.0` + - Upgrade TypeScript to `4.6.4` +* `ecmascript@0.16.3` + - Upgrade TypeScript to `4.6.4` +* `typescript@4.6.4` + - Upgrade TypeScript to `4.6.4` +* `eslint-plugin-meteor@7.4.0` + - Upgrade TypeScript to `4.6.4` + +#### Independent Releases +* `accounts-passwordless@2.1.3`: + - Fixing bug where tokens where never expiring. [PR](https://github.com/meteor/meteor/pull/12088). +* `accounts-base@2.2.4`: + - Adding new options to the `Accounts.config()` method: `loginTokenExpirationHours` and `tokenSequenceLength`. [PR](https://github.com/meteor/meteor/pull/12088). +* `Meteor Repo`: + - Included githubactions in the dependabot config. [PR](https://github.com/meteor/meteor/pull/12061). + - Visual rework in meteor readme. [PR](https://github.com/meteor/meteor/pull/12133). + - Remove useraccounts from Guide. [PR](https://github.com/meteor/meteor/pull/12090). +* `minifier-css@1.6.1`: + - Update postcss package to avoid issues with `Browserslist` and `caniuse-lite`. [PR](https://github.com/meteor/meteor/pull/12136). +* `minifier-js@2.7.5`: + - Update terser package due to security fixes and to take advantage of terser improvements. [PR](https://github.com/meteor/meteor/pull/12137). +* `standard-minifier-css@1.8.2`: + - Update dependencies to avoid issues with `Browserslist` and `caniuse-lite`. [PR](https://github.com/meteor/meteor/pull/12141). +* `standard-minifier-js@2.8.1`: + - Update dependencies to avoid issues with `Browserslist` and `caniuse-lite`. [PR](https://github.com/meteor/meteor/pull/12142). +* `ddp-server@2.5.1`: + - Rename setPublicationStrategy and getPublicationStrategy arguments. [PR](https://github.com/meteor/meteor/pull/12166). + +#### Special thanks to +- [@fredmaiaarantes](https://github.com/fredmaiaarantes) +- [@radekmie](https://github.com/radekmie) +- [@naveensrinivasan](https://github.com/naveensrinivasan) +- [@zodern](https://github.com/zodern) +- [@brucejo75](https://github.com/brucejo75) +- [@matheusccastroo](https://github.com/matheusccastroo) +- [@victoriaquasar](https://github.com/victoriaquasar) +- [@StorytellerCZ](https://github.com/StorytellerCZ) +- [@Grubba27](https://github.com/Grubba27) +- [@denihs](https://github.com/denihs) +- [@edimarlnx](https://github.com/edimarlnx) + +For making this great framework even better! + +## v2.7.3, 2022-05-3 + +#### Highlights +* `accounts-passwordless@2.1.2`: + - Throwing an error when the login tokens are not generated well calling requestLoginTokenForUser. [PR](https://github.com/meteor/meteor/pull/12047/files). +* Node updated to v14.19.3 +* npm update to v6.14.17 +* Fix recompiling npm packages for web arch. [PR](https://github.com/meteor/meteor/pull/12023). + +#### Breaking Changes +N/A + +#### Migration Steps + +#### Meteor Version Release +* `accounts-passwordless@2.1.2`: + - Throwing an error when the login tokens are not generated well calling requestLoginTokenForUser. [PR](https://github.com/meteor/meteor/pull/12047/files). +* `babel-runtime@1.5.1`: + - Make client 25kb smaller. [PR](https://github.com/meteor/meteor/pull/12051). +* Node updated to v14.19.3 +* npm update to v6.14.17 +* Fix win style paths being added to watch sets. +* Fix recompiling npm packages for web arch. [PR](https://github.com/meteor/meteor/pull/12023). + +## v2.7.2, 2022-05-10 + +#### Highlights + +#### Breaking Changes +N/A +#### Migration Steps + +#### Meteor Version Release + +* `mongo@1.15.0` + - New option `Meteor.settings.packages.mongo.reCreateIndexOnOptionMismatch` for case when an index with the same name, but different options exists it will be re-created. + - If there is an error on index creation Meteor will output a better message naming the collection and index where the error occured. [PR](https://github.com/meteor/meteor/pull/11995). +* `modern-browsers@0.1.8` + - New api `getMinimumBrowserVersions` to access the `minimumBrowserVersions`. [PR](https://github.com/meteor/meteor/pull/11998). +* `socket-stream-client@0.5.0` + - Ability to disable sockjs on client side. [PR](https://github.com/meteor/meteor/pull/12007/). +* `meteor-node-stubs@1.2.3`: + - Fix using meteor-node-stubs in IE. [PR](https://github.com/meteor/meteor/pull/12014). +* New ARCH environment variable that permit users to set uname info. [PR](https://github.com/meteor/meteor/pull/12020). +* Skeleton dependencies updated. +* New Tailwind skeleton. [PR](https://github.com/meteor/meteor/pull/12000). + +#### Independent Releases + +## v2.7.1, 2022-03-31 + +#### Highlights + +#### Breaking Changes + +* `accounts-2fa@2.0.0` + - The method `has2faEnabled` no longer takes a selector as an argument, just the callback. + - `generate2faActivationQrCode` now throws an error if it's being called when the user already has 2FA enabled. + +#### Migration Steps + +#### Meteor Version Release + +* `accounts-2fa@2.0.0` + - Reduce one DB call on 2FA login. [PR](https://github.com/meteor/meteor/pull/11985) + - Throw error when user is not found on `Accounts._is2faEnabledForUser` + - Remove vulnerability from the method `has2faEnabled` + - Now the package auto-publish the field `services.twoFactorAuthentication.type` for logged in users. +* `accounts-password@2.3.1` + - Use method `Accounts._check2faEnabled` when validating 2FA +* `accounts-passwordless@2.1.1` + - Use method `Accounts._check2faEnabled` when validating 2FA +* `oauth@2.1.2` + - Check effectively if popup was blocked by browser. [PR](https://github.com/meteor/meteor/pull/11984) +* `standard-minifier-css@1.8.1` + - PostCSS bug fixes. [PR](https://github.com/meteor/meteor/pull/11987/files) + +#### Independent Releases + +## v2.7, 2022-03-24 + +#### Highlights +* Bump node version to 14.19.1 +* TailwindCSS 3.x support +* Typescript `4.5.4` upgrade +* New core package: `accounts-2fa` +* Support for 2FA in `accounts-password` and `accounts-passwordless` +* PostCSS's plugins are run by `standard-minifier-css` if the app has PostCSS configured +* App skeletons and test packages were updated to `meteor-node-stubs@1.2.1` + +#### Breaking Changes + +N/A + +#### Migration Steps + +Read our [Migration Guide](https://guide.meteor.com/2.7-migration.html) for this version. + +#### Meteor Version Release + +* `standard-minifier-css@1.8.0` + - Runs PostCSS plugins if the app has a PostCSS config and the `postcss-load-config` npm package installed. Supports TailwindCSS 3.x [PR 1](https://github.com/Meteor-Community-Packages/meteor-postcss/pull/56) [PR 2](https://github.com/meteor/meteor/pull/11903) + +* `react-fast-refresh@0.2.3` + - Fix tracking states with circular dependencies. [PR](https://github.com/meteor/meteor/pull/11923) + +* `accounts-2fa@1.0.0` + - New package to provide 2FA support + +* `accounts-password@2.3.0` + - 2FA support + +* `accounts-passwordless@2.1.0` + - 2FA support + +* `@meteorjs/babel@7.16.0` + - Upgrade TypeScript to `4.5.4` + +* `babel-compiler@7.9.0` + - Upgrade TypeScript to `4.5.4` + +* `ecmascript@0.16.2` + - Upgrade TypeScript to `4.5.4` + +* `typescript@4.5.4` + - Upgrade TypeScript to `4.5.4` [PR](https://github.com/meteor/meteor/pull/11846) + +* `accounts-ui-unstyled@1.6.0` + - `Accounts.ui.config` can now be set via `Meteor.settings.public.packages.accounts-ui-unstyled`. + +* `meteor-tool@2.7` + - CSS minifiers must now handle any caching themselves [PR](https://github.com/meteor/meteor/pull/11882) + - CSS minifiers are always given lazy css resources instead of only during production builds [PR](https://github.com/meteor/meteor/pull/11897) + - Files passed to CSS minifiers now have `file.readAndWatchFileWithHash`, same as for compilers [PR](https://github.com/meteor/meteor/pull/11882) + - If a minifier has a `beforeMinify` function, it will be called once during each build before the minifier is run the first time [PR](https://github.com/meteor/meteor/pull/11882) + - Add `Plugin.fs.readdirWithTypesSync` [PR](https://github.com/meteor/meteor/pull/11882) + +* `ejson@1.1.2` + - Fixing error were EJSON.equals fail to compare object and array if first param is object and second is array. [PR](https://github.com/meteor/meteor/pull/11866), [Issue](https://github.com/meteor/meteor/issues/11864). + +* `oauth@1.4.1` + - If OAuth._retrieveCredentialSecret() fails trying to get credentials inside Accounts.oauth.tryLoginAfterPopupClosed(), we call it again once more. + +* `accounts-base@2.2.2` + - Fix an issue where an extra field defined in `defaultFieldSelector` would not get published to the client + - Proving the login results to the `_onLoginHook` when finishing login inside `callLoginMethod`. [PR](https://github.com/meteor/meteor/pull/11913). + +* `github-oauth@1.4.0` + - More data will be retrieved and saved under `services.github` on the user account. + - Add option to disallow sign-up on GitHub using `allow_signup` [parameter](https://docs.github.com/en/developers/apps/building-oauth-apps/authorizing-oauth-apps#parameters), this will be activated based on your Accounts settings, specifically if the option `forbidClientAccountCreation` is set to `true`. + +* `email@2.2.1` + - Throwing error when trying to send email in a production environment but without a mail URL set. [PR](https://github.com/meteor/meteor/pull/11891), [Issue](https://github.com/meteor/meteor/issues/11709). + +* `facebook-oauth@1.11.0` + - Updated Facebook API to version 12.0 + +* `google-oauth@1.4.2` + - Migrate from `http` to `fetch` + +* `modules-runtime@0.13.0` + - Fix some npm modules being imported as an empty object. [PR](https://github.com/meteor/meteor/pull/11954), [Issue 1](https://github.com/meteor/meteor/issues/11900), [Issue 2](https://github.com/meteor/meteor/issues/11853). + +* `meteor-node-stubs@1.2.1` + - Adds support for [node:](https://nodejs.org/api/esm.html#node-imports) imports. + +* `minifier-jss@2.8.0` + - Updating terser. It will fix this [issue](https://github.com/meteor/meteor/issues/11721) and [this](https://github.com/meteor/meteor/issues/11930) one. [PR](https://github.com/meteor/meteor/pull/11983). + +#### Independent Releases + +## v2.6.1, 2022-02-18 + +#### Highlights + +* Fix regression on build speed by updating babel dependencies to 7.17.x +* We have removed IE 9 from our browser test list +* We are changing the device used for testing, Samsung Galaxy S7, as browserstack is having issues provisioning it. We will be using now Samsung Galaxy Note 10. +* Fix issue when generating tarballs from Windows systems related to execute permissions +* Fix issues with HMR and meteor build --debug [PR](https://github.com/meteor/meteor/pull/11922) + + +#### Breaking Changes + +- IE 9 might not be compatible from now on, although, we will still consider PR's fixing it. + +#### Migration Steps + +#### Meteor Version Release + +* `meteor-tool@2.6.1` + - Use latest @meteor/babel dependency with @babel@7.17.x + +* `@meteorjs/babel@7.15.1` + - Use babel@7.17.x + +* `babel-compiler@7.8.1` + - Use latest @meteor/babel dependency with @babel@7.17.x + +* `hot-module-replacement@0.5.1` + - Fix issues with HMR and meteor build --debug [PR](https://github.com/meteor/meteor/pull/11922) + +* `webapp@1.13.1` + - Fix issues with HMR and meteor build --debug [PR](https://github.com/meteor/meteor/pull/11922) + +#### Independent Releases + +* `mongo@1.14.6` at 2022-02-18 + - Remove false-positive warning for supported operation a.0.b:{} +* `mongo@1.14.5` at 2022-02-16 + - Fix multiple array operators bug and add support for debug messages + - Fix isArrayOperator function regexp false-positive +* `mongo@1.14.4` at 2022-02-11 + - Fix sync return for insert methods inside _collection private method [PR](https://github.com/meteor/meteor/pull/11907) + - Support the new "projection" field inside the decision of using oplog for a published cursor or not [PR](https://github.com/meteor/meteor/pull/11908) +* `mongo@1.14.3` at 2022-02-08 + - Remove throw on _id exclusion inside mongo collection finds. [PR](https://github.com/meteor/meteor/pull/11894). +* `mongo@1.14.2` at 2022-02-06 + - Fix flatten object issue when internal object value is an array on oplog converter. [PR](https://github.com/meteor/meteor/pull/11888). +* `mongo@1.14.1` at 2022-02-04 + - Fix flatten object issue when the object is empty on oplog converter. [PR](https://github.com/meteor/meteor/pull/11885), [Issue](https://github.com/meteor/meteor/issues/11884). + +## v2.6, 2022-02-01 + +#### Highlights + +* MongoDB Node.js driver Upgrade from 3.6.10 to 4.3.1 +* MongoDB Server 5.x Support +* Embedded Mongo now uses MongoDB 5.0.5 +* You are now able to use dark theme specific splash screens for both iOS and Android by passing an object `{src: 'light-image-src-here.png', srcDarkMode: 'dark-mode-src-here.png'}` to the corresponding key in `App.launchScreens` + +#### Breaking Changes + +* `mongo@1.14.0` + - This is not a breaking change in Meteor itself but as this is a major upgrade in the MongoDB Node.js driver you should read the [Migration Guide](https://guide.meteor.com/2.6-migration.html), especially if you are using rawCollection. + +* `meteor-tool@2.6` + - Legacy launch screens keys for iOS on `App.launchScreens` are now deprecated in favor of new storyboard compliant keys [PR #11797](https://github.com/meteor/meteor/pull/11797). This will drop the following keys we have: `['iphone5','iphone6','iphone6p_portrait','iphone6p_landscape','iphoneX_portrait','iphoneX_landscape','ipad_portrait_2x','ipad_landscape_2x','iphone','iphone_2x','ipad_portrait','ipad_landscape']`. Read the [Migration Guide](https://guide.meteor.com/2.6-migration.html) for more details. + +#### Migration Steps + +Read our [Migration Guide](https://guide.meteor.com/2.6-migration.html) for this version. + +#### Meteor Version Release + +* `mongo@1.14.0` + - `applySkipLimit` option for count() on find cursors is no longer supported. Read more about it [here](https://guide.meteor.com/2.6-migration.html), in the `Cursor.count()` section. + - internal result of operations inside Node.js MongoDB driver have changed. If you are depending on rawCollection results (not only the effect inside the DB), please review the expected format as we have done [here](https://github.com/meteor/meteor/blob/155ae639ee590bae66237fc1c29295072ec92aef/packages/mongo/mongo_driver.js#L658) + - useUnifiedTopology is not an option anymore, it defaults to true. + - native parser is not an option anymore, it defaults to false in the mongo connection. + - poolSize not an option anymore, we are using max/minPoolSize for the same behavior on mongo connection. + - fields option is deprecated, we are maintaining a translation layer to "projection" field (now prefered) until the next minor version, where we will start showing alerts. + - _ensureIndex is now showing a deprecation message + - we are maintaining a translation layer for the new oplog format, so if you read or rely on any behavior of it please read our oplog_v2_converter.js code + - update/insert/remove behavior is maintained in the Meteor way, documented in our docs, but we are now using replaceOne/updateOne/updateMany internally. This is subject to changes in the API rewrite of MongoDB without Fibers AND if you are using rawCollection directly you have to review your methods otherwise you will see deprecation messages if you are still using the old mongodb style directly. + - waitForStepDownOnNonCommandShutdown=false is not needed anymore when spawning the mongodb process + - _synchronousCursor._dbCursor.operation is not an option anymore in the raw cursor from nodejs mongodb driver. If you want to access the options, use _synchronousCursor._dbCursor.(GETTERS) - for example, _synchronousCursor._dbCursor.readPreference. + - the default write preference for replica sets on mongo v5 is w:majority + - If you are using MongoDB inside a Docker container in your dev environment, you might need to append directConnection=true in your mongouri to avoid the new mongo driver Service Discovery feature + +* `allow-deny@1.1.1` + - Handle `MongoBulkWriteError` as `BulkWriteError` was already handled. + +* `meteor-tool@2.6.0` + - Cordova changes to support new Launch Screens. + - Mongo changes to support new embedded version, 5.0.5. + - Fix resolving npm deps of local packages when on different drive. [PR](https://github.com/meteor/meteor/pull/11868) + +* `minimongo@1.8.0` + - Changes to keep everything compatible with MongoDB Server 5.x and MongoDB Node.js driver 4.x. + +* `npm-mongo@4.3.1` + - Upgraded MongoDB Node.js driver to 4.3.1 + +* `tinytest@1.2.1` + - Custom message support for `throws` + +#### Independent Releases + +## v2.5.8, 2022-05-31 + +#### Highlights + +* Fixed 2.5.7 MongoDB error +* Patch release to update Node to version 14.19.3 and npm version to 6.14.17. + +#### Breaking Changes + +- N/A + +#### Migration Steps + +- N/A + +## v2.5.7, 2022-05-31 + +#### Highlights + +* Patch release to update Node and npm versions. + +#### Breaking Changes + +- N/A + +#### Migration Steps + +- N/A + +#### Meteor Version Release + +* `meteor-tool@2.5.7` + - Patch release to update Node and npm versions. + +## v2.5.6, 2022-01-25 + +#### Highlights + +* Go back to using node-fibers mainline dependency instead of a fork. Also ships fibers binaries. + +#### Breaking Changes + +- N/A + +#### Migration Steps + +- N/A + +#### Meteor Version Release + +* `meteor-tool@2.5.6` + - Go back to using node-fibers mainline dependency instead of a fork. Also ships fibers binaries. + +## v2.5.5, 2022-01-18 + +#### Highlights + +* Bump node version to 14.18.3 - security patch +* Change the tar implementation for streams, used on deploying and unpacking packages. Reduced "upload bundle" time when deploying is expected. + +#### Breaking Changes + +- N/A + +#### Migration Steps + +- N/A + +#### Meteor Version Release + +* `meteor-tool@2.5.5` + - Bump node version to 14.18.3 - security patch + - Change the tar implementation for streams, used on deploying and unpacking packages. Reduced "upload bundle" time when deploying is expected. + +* `accounts-base@2.2.1` + - Fixes onLogin firing twice. [PR](https://github.com/meteor/meteor/pull/11785) and [Issue](https://github.com/meteor/meteor/issues/10853) + +#### Independent Releases + +* `oauth@2.1.1` + - Fixes end of redirect response for oauth inside iframes. [PR](https://github.com/meteor/meteor/pull/11825) and [Issue](https://github.com/meteor/meteor/issues/11817) + +## v2.5.4, 2022-01-14 + +This version should be ignored. Proceed to 2.5.5 above. + +## v2.5.3, 2022-01-04 + +#### Highlights + +* Fixes invalid package.json error with `resolve` + +#### Breaking Changes + +- N/A + +#### Migration Steps + +- N/A + +#### Meteor Version Release + +* `meteor-tool@2.5.3` + - Fixes invalid package.json files breaking Meteor run. [PR](https://github.com/meteor/meteor/pull/11832) and [Issue](https://github.com/meteor/meteor/issues/11830) + +#### Independent Releases + +## v2.5.2, 2021-12-21 + +#### Highlights + +* Reify performance improvements +* Node.js update to 14.18.2 +* HMR Fixes + +#### Breaking Changes + +* If a module calls `module.hot.decline()`, calling `module.hot.accept()` later now does nothing instead of overriding `module.hot.decline()`. + +#### Migration Steps + +- N/A + +#### Meteor Version Release + +* `meteor-tool@2.5.2` + - Changes @meteorjs/babel and @meteorjs/reify to improve Reify performance. + - Upgrades Node.js to 14.18.2 + - Fixes isopacket [load failure](https://github.com/meteor/meteor/issues/10930) on Windows. [PR](https://github.com/meteor/meteor/pull/11740) + +* `hot-module-replacement@0.5.0` + - Prevents hot.accept from overriding hot.decline. [PR](https://github.com/meteor/meteor/pull/11801) + - Fixes falling back to hot code push on web archs. [PR](https://github.com/meteor/meteor/pull/11795) + +* `@meteorjs/babel@7.15.0` + - Updates @meteorjs/reify to improve Reify performance. + +* `@meteorjs/reify@0.23.0` + - Uses `@meteorjs/reify` instead of `reify` + - Check scope when wrapping to fix slowness in MUI v5. [PR](https://github.com/meteor/reify/pull/1) and [Issue](https://github.com/benjamn/reify/issues/277). + +* `standard-minifier-js@2.8.0` + - Bump to apply improvements from Reify + +* `typescript@4.4.1` + - Bump to apply improvements from Reify + +* `babel-compiler@7.8.0` + - Bump to apply improvements from Reify + +* `ecmascript@0.16.1` + - Bump to apply improvements from Reify + +* `modules@0.18.0` + - Bump to apply improvements from Reify + +#### Independent Releases + +* `react-fast-refresh@0.2.2` + - [Fixes](https://github.com/meteor/meteor/issues/11744) bugs. [PR](https://github.com/meteor/meteor/pull/11794/) + +* `accounts-ui@1.4.2` + - Update usage of `accounts-passwordless` to be compatible with 2.0.0. + +* `minifier-js@2.7.3` + - Revert `evaluate` option that was set to false in 2.7.2. + +* `standard-minifier-js@2.7.3` + - Using `minifier-js@2.7.3` + + +* `npm-mongo@4.2.1` + - Update MongoDB driver version to 4.2.1 + +## v2.5.1, 2021-11-17 + +#### Highlights +- Mac M1 Support - darwin arm64. [Read more](https://blog.meteor.com/). + +#### Breaking Changes +- `Meteor.loginWithToken` from the new package `accounts-passwordless` was conflicting with another method with the same name on `accounts-base` so we had to rename the method of `accounts-passwordless` package to `Meteor.passwordlessLoginWithToken`. + +#### Meteor Version Release + +* `meteor-tool@2.5.1` + - Meteor supports now Mac M1 chips (darwin arm64) + +* `accounts-passwordless@2.0.0` + - `Meteor.loginWithToken` from the new package `accounts-passwordless` was conflicting with another method with the same name on `accounts-base` so we had to rename the method of `accounts-passwordless` package to `Meteor.passwordlessLoginWithToken`. + +#### Independent Releases +* `minifier-js@2.7.2` + - Stopped using `evaluate` option in the compression to fix a [bug](https://github.com/meteor/meteor/issues/11756). + - Updated `terser` to [v5.9.0](https://github.com/terser/terser/blob/master/CHANGELOG.md#v590) to fix various bugs + +* `standard-minifier-js@2.7.2` + - Using `minifier-js@2.7.2` + +* `github-oauth@1.3.2` + - Migrate from `http` to `fetch` + - Fix GitHub login params to adhere to changes in GitHub API + +## v2.5, 2021-10-21 + +#### Highlights + +* New package: `accounts-passwordless` +* Cordova Android v10 +* HMR now works on all architectures and legacy browsers +* `Accounts.config()` and third-party login services can now be configured from Meteor settings + +#### Breaking Changes + +* Cordova Android v10 now enables AndroidX. If you use any cordova-plugin that depends or uses any old support library, you need to include the cordova-plugin-androidx-adapter cordova-plugin, otherwise you will get build errors. + +#### Meteor Version Release + +* CircleCI testing image was updated to include Android 30 and Node 14 + +* `meteor-tool@2.5` + - Cordova Android upgraded to v10 + - HMR improvements related to `hot-module-replacement@0.4.0` + - Fix finding local packages on Windows located on drives other than C + - Fix infinite loop in import scanner when file is on a different drive than source root + - Fix Meteor sometimes not detecting changes to a file after the first time it is modified + - Fixes Meteor sometimes hanging on Windows. Reverts the temporary fix in Meteor 2.4 of disabling native file watchers for some commands + - Uses recursive file watchers on Windows and macOS. In most situations removes the up to 5 seconds delay before detecting the first change to a file, and is more efficient. + - Node updated to [v14.18.1](https://nodejs.org/en/blog/release/v14.18.1/), following [October 12th 2021 security release](https://nodejs.org/en/blog/vulnerability/oct-2021-security-releases/) + - Skeletons had their dependencies updated + +* `accounts-passwordless@1.0.0` + - New accounts package to provide passwordless authentication. + +* `accounts-password@2.2.0` + - Changes to reuse code between passwordless and password packages. + +* `accounts-base@2.2.0` + - You can now apply all the settings for `Accounts.config` in `Meteor.settings.packages.accounts-base`. They will be applied automatically at the start of your app. Given the limitations of `json` format you can only apply configuration that can be applied via types supported by `json` (ie. booleans, strings, numbers, arrays). If you need a function in any of the config options the current approach will still work. The options should have the same name as in `Accounts.config`, [check them out in docs.](https://docs.meteor.com/api/accounts-multi.html#AccountsCommon-config). + - Changes to reuse code between passwordless and password packages. + +* `accounts-ui-unstyled@1.6.0` + - Add support for `accounts-passwordless`. + +* `service-configuration@1.3.0` + - You can now define services configuration via `Meteor.settings.packages.service-configuration` by adding keys as service names and their objects being the service settings. You will need to refer to the specific service for the settings that are expected, most commonly those will be `secret` and `appId`. + +* `autoupdate@1.8.0` + - Enable HMR for all web arch's + +* `ecmascript@0.16.0` + - Enable HMR for all web arch's + +* `hot-module-replacement@0.4.0` + - Provides polyfills needed by Meteor.absoluteUrl in legacy browsers + - Improvements for HMR to work in all architectures and legacy browsers + +* `module-runtime@0.14.0` + - Improvements for legacy browsers + +* `react-fast-refrest@0.2.0` + - Enable HMR for all web arch's + +* `typescript@4.4.0` + - Enable HMR for all web arch's + +* `webapp@1.13.0` + - Update `cordova-plugin-meteor-webapp` to v2 + - Removed dependency on `cordova-plugin-whitelist` as it is now included in core + - Cordova Meteor plugin is now using AndroidX + - Added new settings option `Meteor.settings.packages.webapp.alwaysReturnContent` that will always return content on requests like `POST`, essentially enabling behavior prior to Meteor 2.3.1. + +#### Independent Releases + +* `modern-browsers@0.1.6` + - Added `mobileSafariUI` as an alias for Mobile Safari + +* `minifier-js@2.7.1` + - Updated `terser` to [v5.8.0](https://github.com/terser/terser/blob/master/CHANGELOG.md#v580) to fix various bugs + +* `standard-minifier-js@2.7.1` + - Updated `@babel/runtime` to [v7.15.4](https://github.com/babel/babel/releases/tag/v7.15.4) + +* `accounts-ui@1.4.1` + - Update compatibility range with `less` from 3.0.2 to 4.0.0 + +* `accounts-ui-unstyled@1.5.1` + - Update compatibility range with `less` from 3.0.2 to 4.0.0 + +* `google-config-ui@1.0.3` + - Deliver siteUrl in the same way as other config-ui packages + +* `ecmascript-runtime-client@0.12.1` + - Revert `core-js` to v3.15.2 due to issues in legacy build with arrays, [see issue for more details](https://github.com/meteor/meteor/issues/11662) + +* `modern-browsers@0.1.7` + - Added `firefoxMobile` as an alias for `firefox` + +* `dynamic-import@0.7.2` + - Fixes 404 in dynamic-import/fetch when ROOT_URL is set with a custom path. [see issue](https://github.com/meteor/meteor/issues/11701) + +## v2.4.1, 2021-10-12 + +#### Meteor Version Release + +* `meteor-tool@2.4.1` + - Patch to make 2.4.1 compatible with Push to Deploy feature in Galaxy (Meteor Cloud) + +## v2.4, 2021-09-15 + +#### Highlights + +* Typescript updated to [v4.3.5](https://github.com/Microsoft/TypeScript/releases/tag/v4.3.5) +* Email package now allows setting `Email.customTransport` to override sending method. +* Use `createIndex` instead of `_ensureIndex` to align with new MongoDB naming. +* Apollo skeleton has been upgraded for [Apollo server v3](https://github.com/apollographql/apollo-server/blob/main/CHANGELOG_historical.md#v300) +* `reify` has been updated to v0.22.2 which reduces the overhead of `import` statements and some uses of `export ... from`, especially when a module is imported a large number of times or re-exports a large number of exports from other modules. PRs [1](https://github.com/benjamn/reify/pull/246), [2](https://github.com/benjamn/reify/pull/291) +* Meteor NPM installer is [now available for all platforms](https://github.com/meteor/meteor/pull/11590). +* DDP server now allows you to set publication strategies for your publications to control mergebox behavior +* On Windows Meteor should no longer be hanging on commands + +#### Migration steps + +1. Replace all usage of `collection._ensureIndex` with `collection.createIndex`. You only need to rename the method as the functionality is the same. +2. If you are using a [well known service](https://nodemailer.com/smtp/well-known/) for the email package switch to using `Meteor.settings.packages.email` settings instead of `MAIL_URL` env variable. Alternatively you can utilize the new `Email.customTransport` function to override the default package behavior and use your own. [Read the email docs](https://docs.meteor.com/api/email.html) for implementation details. + +#### Meteor Version Release + +* Skeletons dependencies updated + +* `meteor-tool@2.4` + - `meteor show` now reports if a package is deprecated + - `reify` update to v0.22.2 which bring optimizations for imports. PRs [1](https://github.com/benjamn/reify/pull/246), [2](https://github.com/benjamn/reify/pull/291) + - Apollo skeleton now uses [Apollo server v3](https://github.com/apollographql/apollo-server/blob/main/CHANGELOG.md#v300) - [migration guide](https://www.apollographql.com/docs/apollo-server/migration/) + - Upgraded `chalk` to v4.1.1 + - Typescript updated to [v4.3.5](https://github.com/Microsoft/TypeScript/releases/tag/v4.3.5) + - `METEOR_SETTINGS` is now accepted an all modes + - Native file watchers are now disabled on Windows for many file-intensive actions (like, `create`, `update`, `build` etc.), this solves an issue with hanging Meteor commands on Windows + +* `webapp@1.12` + - npm dependencies have been updated + - Added hook to change runtime config delivered to the client app, [read more](https://github.com/meteor/meteor/pull/11506) + - Added hook to get notified when the app is updated, [read more](https://github.com/meteor/meteor/pull/11607) + - `@vlasky/whomst@0.1.7` + - Added `addUpdateNotifyHook` that gets called when runtime configuration is updated + +* `logging@1.3.0` + - Switch from `cli-color` to `chalk` to have the same dependency as meteor-tool + - Fix detecting eval + - Copy over code from `Meteor._debug` to `Log.debug` which will be deprecated in the future + +* `email@2.2` + - Modernized package code + - Add alternative API function that you can hook into to utilize your own sending method: `Email.customTransport`. [Read the docs](https://docs.meteor.com/api/email.html#Email-customTransport) + - Use `Meteor.settings` for easy setup to sending email via [known providers](https://nodemailer.com/smtp/well-known/). [Read the docs](https://docs.meteor.com/api/email.html) + +* `ddp-server@2.5.0` + - One of three different publication strategies can be selected for any Meteor publication - SERVER_MERGE, NO_MERGE and NO_MERGE_NO_HISTORY. These control the behaviour of the Meteor mergebox, providing a compromise between client-server bandwidth usage and server side memory usage. [See PR](https://github.com/meteor/meteor/pull/11368) or [the documentation](https://docs.meteor.com/api/pubsub.html#Publication-strategies) for more details. + +* `mongo@1.13.0` + - Add `createIndex` as a collection function (in MongoDB since MongoDB v3). This is a new name for `_ensureIndex` which MongoDB has deprecated and removed in MongoDB 5.0. Use of `_ensureIndex` will show a deprecation warning on development. + +* `accounts-base@2.1.0` + - Migrated usage of `_ensureIndex` to `createIndex` + +* `accounts-oauth@1.4.0` + - Migrated usage of `_ensureIndex` to `createIndex` + +* `accounts-password@2.1.0` + - Migrated usage of `_ensureIndex` to `createIndex` + +* `oauth@2.1.0` + - Migrated usage of `_ensureIndex` to `createIndex` + +* `oauth1@1.5.0` + - Migrated usage of `_ensureIndex` to `createIndex` + +* `facebook-oauth@1.10.0` + - Added login handler hook, like in the Google package for easier management in React Native and similar apps. [PR](https://github.com/meteor/meteor/pull/11603) + +* `service-configuration@1.5.0` + - Migrated usage of `_ensureIndex` to `createIndex` + +* `ecmascript-runtime-client@0.12.0` + - `core-js@3.16.0` + +* `ecmascript-runtime-server@0.11.0` + - `core-js@3.16.0` + +* `ecmascript-runtime@0.8.0` + - Version bump to ensure changes from server & client runtime get propagated. + +* `tinytest@1.2.0` + - Add option to temporarily replace `Tinytest.add` or `Tinytest.addAsync` by `Tinytest.only` or `Tinytest.onlyAsync` so only the tests added using `only*` are going to be executed. + +* `test-helpers@1.3.0` + - Support for `Tinytest.only` and `Tinytest.onlyAsync` + +* `modules@0.17.0` + - Update `reify` to `0.22.2` + +* `standard-minifier-js@2.7.0` + - `@babel/runtime@7.15.3` + - Code modernization + - Improved error handling + +* `minifier-js@2.7.0` + - Added tests + - Code modernization + +* `standard-minifier-css@1.7.4` + - `@babel/runtime@7.15.3` + +* `minifier-css@1.6.0` + - Updated dependencies + - `postcss@8.3.5` + - `cssnano@4.1.11` + +* `callback-hook@1.4.0` + - Added `forEach` iterator to be more in-line with the ES use for iterations. `each` is now deprecated, but will remain supported. + +## v2.3.7, 2021-10-12 + +#### Meteor Version Release + +* `meteor-tool@2.3.7` + - Patch to make 2.3.7 compatible with Push to Deploy feature in Galaxy (Meteor Cloud) + +## v2.3.6, 2021-09-02 + +#### Highlights + +* Updated Node.js per [August 31st security release](https://nodejs.org/en/blog/vulnerability/aug-2021-security-releases2/) + +#### Meteor Version Release + +* `meteor-tool@2.3.6` + - Node.js updated to [v14.17.6](https://nodejs.org/en/blog/release/v14.17.6/) + +#### Independent Releases + +* `minifier-js@2.6.1` + - Terser updated to [4.8.0](https://github.com/terser/terser/blob/master/CHANGELOG.md#v480) + +* `routepolicy@1.1.1` + - Removed `underscore` dependency since it was not used in the package + +* `email@2.1.1` + - Updated `nodemailer` to v6.6.3 + +* `callback-hook@1.3.1` + - Modernized the code + - Fixed a variable assignment bug in `dontBindEnvironment` function + +* `less@4.0.0` + - Updated `less` to v4.1.1 + - Fixed tests + +* `npm-mongo@3.9.1` + - `mongodb@3.6.10` + +* `accounts-base@2.0.1` + - Create index on `services.password.enroll.when` + - Blaze weak dependency updated to v2.5.0 + +* `facebook-oauth@1.9.1` + - Allow usage of `http` package both v1 and v2 for backward compatibility + +* `github-oauth@1.3.1` + - Allow usage of `http` package both v1 and v2 for backward compatibility + +* `google-oauth@1.3.1` + - Allow usage of `http` package both v1 and v2 for backward compatibility + +* `meetup-oauth@1.1.1` + - Allow usage of `http` package both v1 and v2 for backward compatibility + +* `meteor-developer-oauth@1.3.1` + - Allow usage of `http` package both v1 and v2 for backward compatibility + +* `weibo-oauth@1.3.1` + - Allow usage of `http` package both v1 and v2 for backward compatibility + +* `oauth1@1.4.1` + - Allow usage of `http` package both v1 and v2 for backward compatibility + - Blaze weak dependency updated to v2.5.0 + +* `ddp-server@2.4.1` + - Fix a bug where `testMessageOnConnect` has always been sent + +* `accounts-password@2.0.1` + - Fix use of `isEnroll` in reset password + +* `mdg:geolocation@1.3.1` + - Fixed API to work with Meteor 2.3+ + +* `mdg:reload-on-resume@1.0.5` + - Fixed API to work with Meteor 2.3+ + +## v2.3.5, 2021-08-12 + +#### Highlights + +* Updated Node.js per the [August security release](https://nodejs.org/en/blog/vulnerability/aug-2021-security-releases/) +* Includes same improvements as in Meteor v2.2.3 + - Typescript updated to [v4.3.5](https://github.com/Microsoft/TypeScript/releases/tag/v4.3.5) + - `@meteorjs/babel@7.12.0` + +#### Meteor Version Release + +* `meteor-tool@2.3.5` + - Node.js updated to [v14.17.5](https://nodejs.org/en/blog/release/v14.17.5/) + - Typescript updated to [v4.3.5](https://github.com/Microsoft/TypeScript/releases/tag/v4.3.5) + - `@meteorjs/babel@7.12.0` + - Fix broken source maps in VSCode - [PR](https://github.com/meteor/meteor/pull/11584) + +## v2.3.4, 2021-08-03 + +* Fix an issue in `bare` and `vue` skeletons + +## v2.3.3, 2021-08-02 + +* Security patch of Node.js to [14.17.4](https://nodejs.org/en/blog/release/v14.17.4/) +* App skeletons had the following dependencies updated: + - `meteor-node-stubs@1.1.0` + - `@babel/runtime@7.14.8` +* `babel/parser@7.14.9` for server dev bundle + +## v2.3.2, 2021-07-13 + +#### Meteor Version Release + +* `meteor-tool@2.3.2` + - fixes a bug that makes `meteor run android` run with the new aab package flag + +## v2.3.1, 2021-07-08 + +#### Highlights + +* Fix windows issue when running webapp package. +* Node.js updated to 14.17.3, following [security release](https://nodejs.org/en/blog/vulnerability/july-2021-security-releases/) + +#### Breaking Changes + +* Meteor will now generate ".aab" (bundle files) by default when building for Android. This is the [new default format](https://android-developers.googleblog.com/2021/06/the-future-of-android-app-bundles-is.html) for Android apps. Use the new build flag `--packageType=apk` if you still need to generate APK. + +#### Meteor Version Release + +* Updated travis CI environment to use Node.js 14.17.3 + +* `meteor-tool@2.3.1` + - Node.js updated to [14.17.2](https://nodejs.org/en/blog/release/v14.17.2/) and [14.17.3](https://nodejs.org/en/blog/release/v14.17.3/) + - `@babel/runtime` dependency updated to v7.14.6 across the tool and testing apps + - Skeletons dependencies updated + - Apollo skeleton removed `apollo-boost` dependency which is no longer needed + - New build flag `--packageType` to choose between apk/bundle for android builds (defaults to bundle). + +#### Independent Releases + +* `webapp@1.11.1` + - Remove `posix` from npm shrinkwrap, to fix a bug it causes on Windows. + +* `less@3.0.2` + - Updated `@babel/runtime` to v7.14.6 + - Updated `less` to v3.11.3 + +* `standard-minifiers-css@1.7.3` + - Updated `@babel/runtime` to v7.14.6 + +* `standard-minifiers-js@2.6.1` + - Updated `@babel/runtime` to v7.14.6 + +* `dynamic-import@0.7.1` + - Fix [Safari 14 bug](https://bugs.webkit.org/show_bug.cgi?id=226547) with indexedDB + +## v2.3, 2021-06-24 + +#### Highlights + +* Node.js update to 14.17.1 from 12.22.1 🎉 + +* Typescript update to [4.3.2](https://devblogs.microsoft.com/typescript/announcing-typescript-4-3/) + +* Packages had their backward compatibility to before Meteor 1.0 removed. See below for more details. + +* Improved tracking of which files are used by build plugins to know when it should do a full rebuild, a faster client-only rebuild, or can completely skip rebuilding after a file is modified. This should work with any type of file in any directory, and for both files in the app and files in packages. The most noticeable improvement is when modifying a file only used on the client Meteor will only rebuild the client, even if the file is not inside `imports` or a `client` folder. + +### Summary of breaking changes + +- As Node.js version was upgraded to a new major version we recommend that you review if your npm dependencies are compatible with Node.js 14. + - If we receive reports from breaking changes we are going to list them here but so far we are not aware of any. + - We recommend that you read Node.js [release notes](https://nodejs.org/en/blog/release/v14.0.0/) though. + +- Accounts have undergone some major changes including major version bump. See below for more details. + +- All official packages that have been deprecated have now the deprecated flag and will inform you about that if you install or update them. + +- If you are working with enrollments in user accounts, do note that the enrollment token handling is now separate from reset password token. The token is now under `services.password.enroll`, so adjust your code accordingly if you use it. + +### Migration steps + +- As Node.js version was upgraded we recommend that you remove your `node_modules` folder (`rm -rf node_modules`) and run `meteor npm i` to be sure you compile all the binary dependencies again using the new Node.js version. + - Maybe you also want to recreate your lock file. + - If you get an error try `meteor reset` which will clear caches, beware that this will also remove your local DB for your app. + +- If you are maintaining a package that depends on one of the accounts packages which had a major version bump you will either need to set the new version manually or set `api.versionsFrom('2.3')`. + You can also have it reference its current version and 2.3 like this: `api.versionsFrom(['1.12', '2.3'])`, for specific package it can be like this: `api.use('accounts-base@1.0.1 || 2.0.0')`. + +- Old API for packages definitions has been removed. The old underscore method names (e.g. `api.add_files()`) will no longer work, please use the camel case method names (e.g. `api.addFiles()`). + +### Breaking changes +* Removed deprecated `mobile-port` flag + +* Removed deprecated `raw` name from `isobuild` + +* Removed deprecated package API method names `Package.on_use`, `Package.on_test`, `Package._transitional_registerBuildPlugin` and `api.add_files`, if you haven't till now, please use the current camel case versions. + +* `accounts-base@2.0.0` + - Deprecated backward compatibility function `logoutOtherClients` has been removed. + +* `accounts-password@2.0.0` + - Deprecated backward compatibility functionality for `SRP` passwords from pre-Meteor 1.0 days has been removed. + - Enroll account workflow has been separated from reset password workflow (the enrollment token records are now stored in a separate db field `services.password.enroll`). + +* `ddp-client@2.5.0` + - Removed deprecated backward compatibility method names for Meteor before 1.0 + +* `ddp-server@2.4.0` + - Removed deprecated backward compatibility method names for Meteor before 1.0 + +* `meteor-base@1.5.0` + - Removed `livedata` dependency which was there for packages build for 0.9.0 + +* `minimongo@1.7.0` + - Removed the `rewind` method that was noop for compatibility with Meteor 0.8.1 + +* `mongo@1.12.0` + - Removed the `rewind` method that was noop for compatibility with Meteor 0.8.1 + +* `oauth@2.0.0` + - Removed deprecated `OAuth.initiateLogin` and other functionality like the addition of `?close` in return URI for deprecated OAuth flow pre Meteor 1.0 + +* `markdown@2.0.0` + - Use lazy imports to prevent it from being added to the initial bundle + - This package is now deprecated + +* `http@2.0.0` + - Internally http has been replaced by [fetch](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API), should still work as previous version, but edge cases might be different. This is to aid you in transition to fetch. Note that this means that the `npmRequestOptions` parameter to `HTTP.call` has been removed, as `request` is no longer used internally. + +* `socket-stream-client@0.4.0` + - Remove IE8 checks + +#### Meteor Version Release + +* `meteor-tool@2.3` + - Node.js update to 14.17.1 from 12.22.1 🎉 + - This is a major upgrade in Node.js. See the [release notes](https://nodejs.org/en/blog/release/v14.0.0/) for more details. + - `npm` update to 6.14.13. + - `fibers` has been updated to v5.0.0. + - `promise` has been updated to v8.1.0. + - `node-gyp` has been updated to v8.0.0. + - `node-pre-gyp` has been updated to v0.15.0. + - `@babel/runtime` has been updated to v7.14.0. + - `request` has been updated to v2.88.2. + - `uuid` has been updated to v3.4.0. + - `graceful-fs` has been updated to v4.2.6. + - `tar` has been updated to v2.2.2. + - `sqlite3` has been updated to v5.0.2. + - `http-proxy` has been updated to v1.18.1. + - `wordwrap` has been updated to v1.0.0. + - `moment` has been updated to v2.29.1. + - `glob` has been updated to v7.1.6. + - `split2` has been updated to v3.2.2. + - `lru-cache` has been updated to v4.1.5. + - `anser` has been updated to v2.0.1. + - `xmlbuilder2` has been updated to v1.8.1. + - `ws` has been updated to v7.4.5. + - `underscore` has been updated to v1.13.1 + - `optimism` has been updated to v0.16.1 + - `@wry/context` has been update to v0.6.0 + - Reduced time spent by server (re)start in development by adding a cache for Reify. This optimization is on by default in development. Set the new `METEOR_TOOL_ENABLE_REIFY_RUNTIME_CACHE` and `METEOR_REIFY_CACHE_DIR` environment variables to adjust it or turn it on for production [read more in the PR](https://github.com/meteor/meteor/pull/11400). + - New flag `--platforms` has been added to the `build` command to specify the platform you want to build for. `meteor build . --platforms=android`. This is useful for example when you are not using a MacOS and you want to build your app only for Android. Also to save time on CI not building all the platforms all the time. See [PR](https://github.com/meteor/meteor/pull/11437) for details. + - The undocumented environment variable `DDP_DEFAULT_CONNECTION_URL` behavior has changed. Setting `DDP_DEFAULT_CONNECTION_URL` when running the server (development: `meteor run` or production: `node main.js`) sets the default DDP server value for meteor. But this did not work for `cordova` apps. Now you can define the `cordova` app default DDP server value by setting `DDP_DEFAULT_CONNECTION_URL` when building (`meteor build`). + - Skeletons dependencies updated to latest version + - Svelte skeleton now has HMR + - New deploy option: `--build-only`. Helpful if you want to build first and after some validations proceeding with the upload and deploy. [Read more](https://galaxy-guide.meteor.com/deploy-command-line.html#cache-only) + - Improved watched system to properly rebuild `client` even when a file is outside of `client` or `imports` folders. See [PR](https://github.com/meteor/meteor/pull/11474) for details. + - Fix an issue when `App.appendToConfig` crashed Cordova build. + - Reify compiler now uses cache in runtime. [Read more](https://github.com/meteor/meteor/pull/11400) + +* `launch-screen@1.3.0` + - Removes LaunchScreen from web clients. + +* `meteor-babel@7.11.0 (@meteorjs/babel)` + - Fixes for Samsung Internet v6.2+ to be considered modern browser and addition of [logical assignment operators](https://github.com/tc39/proposal-logical-assignment) via `babel-presets-meteor`. + - This package was renamed to `@meteorjs/babel`. + +* `hot-module-replacement@0.3.0` + - Fixes various HMR bugs and edge cases see [PR for more](https://github.com/meteor/meteor/pull/11405). + +* `email@2.1.0` + - Updates `nodemailer` to `6.6.0` and it now adds `charset=utf-8` to `text/plain` messages by default. + +* `server-render@0.4.0` + - Updated npm dependencies + +* `accounts-base@2.0.0` + - New hook `setAdditionalFindUserOnExternalLogin` has been added which allows you to customize user selection on external logins if you want to, for example, login a user who has the same e-mail as the external account. + +* `ddp-server@2.4.0` + - Added support for `this.unblock()` in `Meteor.publish()` context. See [PR](https://github.com/meteor/meteor/pull/11392) for more details. + - Add support in `Meteor.publish()` for async functions + +* `webapp@1.11.0` + - Webapp will respond appropriately to unsupported requests instead of sending content, including handling for new HTTP verbs. See [PR](https://github.com/meteor/meteor/pull/11224) for more details. + +#### Independent Releases + +* `ddp-server@2.3.3` + - Updates dependencies which removes Node's HTTP deprecation warning. + +* `socket-stream-client@0.3.2` + - Updates dependencies which removes Node's HTTP deprecation warning. + +* `ddp-client@2.4.1` + - Re-ordering fields in DDP message for better client readability. + +* `mongo@1.11.1` + - Fixes a `Timestamp.ONE is undefined` bug. + +* `mongo-id@1.0.8` + - Removes unused dependency `id-map`. + +* `accounts-server@1.7.1` + - To better test password format & limit password to 256 characters, you can change this limit by setting `Meteor.settings.packages.accounts.passwordMaxLength`. + +* `static-html@1.3.1` + - Removes `underscore` dependency. + +* `dev-error-overlay@0.1.1` + - Fixes sometimes page content being on top of error overlay. + +* `id-map@1.1.1` + - Removes unused dependencies and modernizing the code. + +* `http@1.4.4` + - Used the new deprecation package flag instead of loud console warning. + +* `logic-solver@2.0.8` + - Fixed `package.js` to use current `api` method calls. + +* `socket-stream-client@0.3.3` + - Update `faye-websocket` dependency to v0.11.4. + +* `jshint@1.1.8` + - The package has been deprecated. + +* `npm-bcrypt@0.9.4` + - The package has been deprecated. + +* `ecmascript-runtime-client@0.11.1` + - Updated `core-js` to v3.14.0 + +* `ecmascript-runtime-server@0.11.1` + - Updated `core-js` to v3.14.0 + +* `url@1.3.2` + - Updated `core-js` to v3.14.0 + +* `hot-module-replacement@0.2.1` + - Add missing dependency. + +* `observe-sequence@1.0.17` + - Updated dependencies + +* `observe-sequence@1.0.18` + - When `#each` argument is unsupported it will be shown + - Moving package under Blaze repository + +* `react-fast-refresh@0.1.1` + - Fixed the package to work in IE11 + +## v2.2.4, 2021-10-12 + +#### Meteor Version Release + +* `meteor-tool@2.2.4` + - Patch to make 2.2.4 compatible with Push to Deploy feature in Galaxy (Meteor Cloud) + +## v2.2.3, 2021-08-12 + +#### Highlights + +* Security update to Node.js [12.22.5](https://nodejs.org/en/blog/release/v12.22.5/) +* Typescript updated to [v4.3.5](https://github.com/Microsoft/TypeScript/releases/tag/v4.3.5) + +#### Meteor Version Release + +* `meteor-tool@2.3.3` + - Updated Node.js to 12.22.5 per [Node security update](https://nodejs.org/en/blog/vulnerability/aug-2021-security-releases/) + - Typescript updated to [v4.3.5](https://github.com/Microsoft/TypeScript/releases/tag/v4.3.5) + - `@meteorjs/babel@7.12.0` + +* `@meteorjs/babel@7.12.0` && `@meteorjs/babel@7.13.0` + - Dependencies updated to their latest versions + +* `babel-compile@7.7.0` + - `@meteorjs/babel@7.12.0` + +* `ecmascript@0.15.3` + - Typescript and Babel version bump + +* `typescript@4.3.5` + - [`typescript@4.3.5`](https://github.com/Microsoft/TypeScript/releases/tag/v4.3.5) + +## v2.2.2, 2021-08-02 + +#### Highlights + +- Security update to Node.js [12.22.4](https://nodejs.org/en/blog/release/v12.22.4/) + +## v2.2.1, 2021-06-02 + +#### Highlights + +- Node.js updated to [12.22.2](https://nodejs.org/en/blog/release/v12.22.2/) +- npm updated to 6.14.13 + +#### Meteor Version Release + +* `meteor-tool@2.2.1` + - Updated Node.js to 12.22.2 per [Node security update](https://nodejs.org/en/blog/vulnerability/july-2021-security-releases/) + +## v2.2, 2021-04-15 + +#### Highlights + +- MongoDB Update to 4.4.4 +- Cordova Update to 10 +- Typescript Update to 4.2.2 +- New skeleton: `meteor create myapp --svelte` + +### Breaking changes + +* N/A + +### Migration steps + +* `meteor-tool` maybe you need to install the new Visual C++ Redistributable for Visual Studio 2019 to run MongoDB 4.4.4 on Windows. [read more](https://docs.meteor.com/windows.html) + +* `mongo` package is now using useUnifiedTopology as `true` by default otherwise the new driver was producing a warning (see details below). It's important to test your app with this change. + +* `cordova` plugins and main libraries were updated from 9 to 10. It's important to test your app with these changes. + +* `typescript` was updated to 4.2.2, make sure your read the [breaking changes](https://devblogs.microsoft.com/typescript/announcing-typescript-4-2/#breaking-changes). + +#### Meteor Version Release + +* `meteor-tool@2.2` + - Update embedded MongoDB version to 4.4.4 [#11341](https://github.com/meteor/meteor/pull/11341) + - Maybe you need to install the new Visual C++ Redistributable for Visual Studio 2019 to run on Windows. [read more](https://docs.meteor.com/windows.html) + - Fix WindowsLikeFilesystem true when release string includes case insensitive word microsoft. [#11321](https://github.com/meteor/meteor/pull/11321) + - Fix absoluteFilePath on Windows. [#11346](https://github.com/meteor/meteor/pull/11346) + - New skeleton: `meteor create myapp --svelte` + - Update Blaze skeleton to use HMR + +* `npm-mongo@3.9.0` + - Update MongoDB driver version to 3.6.6 + +* `mongo@1.11.0` + - Using useUnifiedTopology as `true` by default to avoid the warning: `(node:59240) [MONGODB DRIVER] Warning: Current Server Discovery and Monitoring engine is deprecated, and will be removed in a future version. To use the new Server Discover and Monitoring engine, pass option { useUnifiedTopology: true } to the MongoClient constructor. You can still use it as false with `Mongo._connectionOptions` or `Meteor.settings?.packages?.mongo?.options`. + +* `cordova@10` + - Update Cordova to 10.0.0 [#11208](https://github.com/meteor/meteor/pull/11208) + +* `typescript@4.2.2` + - Update Typescript to 4.2.2, make sure your read the [breaking changes](https://devblogs.microsoft.com/typescript/announcing-typescript-4-2/#breaking-changes) [#11329](https://github.com/meteor/meteor/pull/11329) + +* `accounts-base@1.9.0` + - Allow to set token expiration to be set in milliseconds. [#11366](https://github.com/meteor/meteor/pull/11366) + +* `facebook-oauth@1.9.0` + - Upgrade default Facebook API to v10 & allow overriding this value. [#11362](https://github.com/meteor/meteor/pull/11362) + +* `minimongo@1.6.2` + - Add [$mul](https://docs.mongodb.com/manual/reference/operator/update/mul/#up._S_mul) to minimongo. [#11364](https://github.com/meteor/meteor/pull/11364) + +* `webapp@1.10.1` + - Fix for UNIX sockets with node cluster. [#11369](https://github.com/meteor/meteor/pull/11369) + + +## v2.1.2, 2021-10-12 + +#### Meteor Version Release + +* `meteor-tool@2.1.2` + - Patch to make 2.1.2 compatible with Push to Deploy feature in Galaxy (Meteor Cloud) + +## v2.1.1, 2021-04-06 + +### Changes + +#### Highlights + +- Node.js security [update](https://nodejs.org/en/blog/vulnerability/april-2021-security-releases/) to 12.22.1 + +#### Meteor Version Release + +* `meteor-tool@2.1.1` + - Node.js security [update](https://nodejs.org/en/blog/vulnerability/april-2021-security-releases/) to 12.22.1 + - npm update to 6.14.12 + +### Breaking changes + +* N/A + +### Migration steps + +* N/A + +## v2.1, 2021-02-24 + +### Changes + +#### Highlights + +- Node.js security [update](https://nodejs.org/en/blog/vulnerability/february-2021-security-releases/) to 12.21.0 + +#### Meteor Version Release + +* `meteor-tool@2.1` + - Node.js security [update](https://nodejs.org/en/blog/vulnerability/february-2021-security-releases/) to 12.21.0 + - `meteor create my-app --plan professional` new flag `plan` to enable you to choose a plan from the deploy command. + +### Breaking changes + +* N/A + +### Migration steps + +* N/A + +## v2.0.1, 2021-10-12 + +#### Meteor Version Release + +* `meteor-tool@2.0.1` + - Patch to make 2.0.1 compatible with Push to Deploy feature in Galaxy (Meteor Cloud) + +## v2.0, 2021-01-20 + +### Changes + +#### Highlights + +- Free deploy on [Cloud](https://www.meteor.com/cloud): Deploy for free to Cloud with one command: `meteor deploy myapp.meteorapp.com --free`. ([docs](https://docs.meteor.com/commandline.html#meteordeploy)) + + +- Deploy including MongoDB on [Cloud](https://www.meteor.com/cloud): Deploy including MongoDB in a shared instance for free to Cloud with one command: `meteor deploy myapp.meteorapp.com --free --mongo`. ([docs](https://docs.meteor.com/commandline.html#meteordeploy)) + + +- Hot Module Replacement (HMR): Updates the javascript modules in a running app that were modified during a rebuild. Reduces the feedback cycle while developing so you can view and test changes quicker (it even updates the app before the build has finished). Enabled by adding the `hot-module-replacement` package to an app. React components are automatically updated by default using React Fast Refresh. Integrations with other libraries and view layers can be provided by third party packages. Support for Blaze is coming soon. This first version supports app code in the modern web architecture. ([docs](https://guide.meteor.com/build-tool.html#hot-module-replacement)) [#11117](https://github.com/meteor/meteor/pull/11117) + +#### Meteor Version Release + +* `meteor-tool@2.0` + - `meteor create my-app` now creates by default a project using React. If you want to create a new project using Blaze you should use the new option `--blaze`. + - `meteor create --react my-app` is still going to create a React project. + - `meteor create --free` deploy for free to Cloud with one command: `meteor deploy myapp.meteorapp.com --free`. ([docs](https://docs.meteor.com/commandline.html#meteordeploy)). + - `meteor create --free --mongo` deploy including MongoDB in a shared instance for free to Cloud with one command: `meteor deploy myapp.meteorapp.com --free --mongo`. ([docs](https://docs.meteor.com/commandline.html#meteordeploy)) + - `isobuild` fixes a regression on recompiling node modules in different architectures. [#11290](https://github.com/meteor/meteor/pull/11290) + - `isobuild` converts npm-discards.js to TypeScript. [#10663](https://github.com/meteor/meteor/pull/10663) + - `cordova` ensures the pathname of the rootUrl is used in the mobile URL. [#11053](hhttps://github.com/meteor/meteor/pull/11053) + - Add `file.hmrAvailable()` for compiler plugins to check if a file meets the minimum requirements to be updated with HMR [#11117](https://github.com/meteor/meteor/pull/11117) + + +* `hot-module-replacement@1.0.0` + - New package that enables Hot Module Replacement for the Meteor app and provides an API to configure how updates are applied. HMR reduces the feedback cycle while developing by updating modified javascript modules within the running application. ([docs](https://docs.meteor.com/packages/hot-module-replacement.html)) [#11117](https://github.com/meteor/meteor/pull/11117) + - These packages have been updated to support HMR: `autoupdate@1.7.0`, `babel-compiler@7.6.0`, `ddp-client@2.4.0`, `dynamic-import@0.6.0`, `ecmascript@0.15.0`, `modules@0.16.0`, `modules-runtime-hot@0.13.0`, `standard-minifier-css@1.7.2`, `webapp@1.10.0`, `webapp-hashing@1.1.0` + + +* `react-fast-refresh@0.1.0` + - New package that updates React components using HMR. This is enabled by default in apps that have HMR enabled and use a supported React version. ([docs](https://atmospherejs.com/meteor/react-fast-refresh)) [#11117](https://github.com/meteor/meteor/pull/11117) + + +* `dev-error-overlay@0.1.0` + - New package that allows you to see build errors and server crashes in your browser during development. Requires the app to have HMR enabled. [#11117](https://github.com/meteor/meteor/pull/11117) + + +* `accounts-base@1.8.0` and `accounts-password@1.7.0` + - Extra parameters can now be added to reset password, verify e-mail and enroll account links that are generated for account e-mails. By default, these are added as search parameters to the generated url. You can pass them as an object in the appropriate functions. E.g. `Accounts.sendEnrollmentEmail(userId, email, null, extraParams);`. [#11288](https://github.com/meteor/meteor/pull/11288) + + +* `logging@1.2.0` + - Updates dependencies and make debug available for use in non production environments. [#11068](https://github.com/meteor/meteor/pull/11068) + +#### Independent Releases +* `react-meteor-data@2.2.0` + - Fix issue with useTracker and Subscriptions when using deps. [#306](https://github.com/meteor/react-packages/pull/306) + - Remove version constraint on core TypeScript package [#308](https://github.com/meteor/react-packages/pull/308) + + +* `http` + - It has been deprecated. [#11068](https://github.com/meteor/meteor/pull/11068) + +### Breaking changes + +* `http` package has been deprecated. Please start on migrating towards the [fetch](https://atmospherejs.com/meteor/fetch) package instead. + +### Migration steps + +Simple run `meteor update` in your app. + +Great new features and no breaking changes (except one package deprecation). You can always check our [Roadmap](https://docs.meteor.com/roadmap.html) to understand what is next. diff --git a/v3-docs/docs/index.md b/v3-docs/docs/index.md new file mode 100644 index 0000000000..3ccec38705 --- /dev/null +++ b/v3-docs/docs/index.md @@ -0,0 +1,52 @@ +--- +# https://vitepress.dev/reference/default-theme-home-page +layout: home + +hero: + text: "Meteor Docs" + tagline: "All the documentation you need to build and deploy your app with Meteor." + image: + src: /logo.png + alt: Meteor + actions: + - theme: brand + text: View API Docs + link: /about/what-is + - theme: alt + text: View on GitHub + link: https://github.com/meteor/meteor + +# TODO: Update with Docs features and links as they are added +features: + - title: Zero Config + icon: 🛠️ + details: Use popular frameworks and tools right out-of-the-box. Focus on building features instead of configuring tools. + + - title: Front-end Agnostic + icon: 🎨 + details: Choose your preferred front-end framework like React, VueJS, Blaze, Svelte, or Solid. + + - title: RPCs API + icon: 📡 + details: Easily connect back-end and front-end with Methods. Our Remote Procedure Call (RPC) system + + - title: Easy to Deploy + icon: 🚀 + details: Deploy using one command from the CLI or directly from your Git repository by using Meteor Cloud. + + - title: Real-time Features + icon: ⚡ + details: Develop apps with real-time features like chats and collaborative apps with ease by using publications and subscriptions. + + - title: TypeScript Support + icon: 📝 + details: Experience the power of TypeScript inference to boost productivity for your full-stack application. + + - title: Built-in Accounts + icon: 👤 + details: Login and Accounts package ready to use with your app. Never rebuilt an authentication system again. + + - title: Pioneering and Reliable + icon: 🏆 + details: Developed for over a decade and trusted by industry giants. Alows you to build and scale efficiently. +--- diff --git a/v3-docs/docs/jsdoc/docdata-jsdoc-template/publish.js b/v3-docs/docs/jsdoc/docdata-jsdoc-template/publish.js new file mode 100644 index 0000000000..53075f2219 --- /dev/null +++ b/v3-docs/docs/jsdoc/docdata-jsdoc-template/publish.js @@ -0,0 +1,165 @@ +/*global require: true */ +(function () { + 'use strict'; + + // This file receives data from JSDoc via the `publish` exported function, + // and converts it into JSON that is written to a file. + + var fs = require('jsdoc/fs'); + var helper = require('jsdoc/util/templateHelper'); + + var stringify = require("canonical-json"); + + // This is the big map of name -> data that we'll write to a file. + var dataContents = {}; + // List of just the names, which we'll also write to a file. + var names = []; + + /** + * Get a tag dictionary from the tags field on the object, for custom fields + * like package + * @param {JSDocData} data The thing you get in the TaffyDB from JSDoc + * @return {Object} Keys are the parameter names, values are the values. + */ + var getTagDict = function (data) { + var tagDict = {}; + + if (data.tags) { + data.tags.forEach(function (tag) { + tagDict[tag.title] = tag.value; + }); + } + + return tagDict; + }; + + // Fix up a JSDoc entry and add it to `dataContents`. + var addToData = function (entry) { + Object.assign(entry, getTagDict(entry)); + + // strip properties we don't want + entry.comment = undefined; + entry.___id = undefined; + entry.___s = undefined; + entry.tags = undefined; + + // generate `.filepath` and `.lineno` from `.meta` + if (entry.meta && entry.meta.path) { + var packagesFolder = 'packages/'; + var index = entry.meta.path.indexOf(packagesFolder); + if (index != -1 && !entry.isprototype) { + var fullFilePath = entry.meta.path.substr(index + packagesFolder.length) + '/' + entry.meta.filename; + entry.filepath = fullFilePath; + entry.lineno = entry.meta.lineno; + } + } + + entry.meta = undefined; + + if (!entry.importfrompackage && entry.filepath) { + entry.module = entry.filepath.split('/')[0]; + } else { + entry.module = entry.importfrompackage; + } + + names.push(entry.longname); + dataContents[entry.longname] = entry; + }; + + /** + Entry point where JSDoc calls us. It passes us data in the form of + a TaffyDB object (which is an in-JS database of sorts that you can + query for records. + + @param {TAFFY} taffyData See . + @param {object} opts + @param {Tutorial} tutorials + */ + exports.publish = function(taffyData) { + var data = helper.prune(taffyData); + + var namespaces = helper.find(data, {kind: "namespace"}); + + // prepare all of the namespaces + namespaces.forEach(function (namespace) { + if (namespace.summary) { + addToData(namespace); + } + }); + + var properties = helper.find(data, {kind: "member"}); + + properties.forEach(function (property) { + if (property.summary) { + addToData(property); + } + }); + + // Callback descriptions are going to be embedded into Function descriptions + // when they are used as arguments, so we always attach them to reference + // them later. + var callbacks = helper.find(data, {kind: "typedef"}); + callbacks.forEach(function (cb) { + delete cb.comment; + addToData(cb); + }); + + var functions = helper.find(data, {kind: "function"}); + var constructors = helper.find(data, {kind: "class"}); + + // we want to do all of the same transformations to classes and functions + functions = functions.concat(constructors); + + // insert all of the function data into the namespaces + functions.forEach(function (func) { + if (! func.summary) { + // we use the @summary tag to indicate that an item is documented + return; + } + + func.options = []; + var filteredParams = []; + + // Starting a param with `options.` makes it an option, not a + // param. Dot (`.`) in this case binds tighter than comma, so + // `options.foo,bar` will create an option named `foo, bar` + // (representing two options in the docs). We process pipes so + // that `options.foo|bar` also results in `foo, bar`. + (func.params || []).forEach(function (param) { + param.name = param.name.replace(/,|\|/g, ", "); + + var splitName = param.name.split("."); + + if (splitName.length < 2 || splitName[0] !== "options") { + // not an option + filteredParams.push(param); + return; + } + + param.name = splitName[1]; + + func.options.push(param); + }); + + func.params = filteredParams; + + // the entire unparsed doc comment. takes up too much room in the + // data file. + delete func.comment; + + addToData(func); + }); + + // write full docs JSON + var jsonString = stringify(dataContents, null, 2); + var jsString = "export default" + jsonString + ";"; + jsString = "// This file is automatically generated by JSDoc; regenerate it with scripts/admin/jsdoc/jsdoc.sh\n" + jsString; + var docsDataFilename = "./v3-docs/docs/data/data.js"; + fs.writeFileSync(docsDataFilename, jsString); + + // write name tree JSON + jsonString = stringify(names.sort(), null, 2); + var nameTreeFilename= "./v3-docs/docs/data/names.json"; + fs.writeFileSync(nameTreeFilename, jsonString); + }; +})(); diff --git a/v3-docs/docs/jsdoc/jsdoc-conf.json b/v3-docs/docs/jsdoc/jsdoc-conf.json new file mode 100644 index 0000000000..4f220413fb --- /dev/null +++ b/v3-docs/docs/jsdoc/jsdoc-conf.json @@ -0,0 +1,22 @@ +{ + "plugins": ["plugins/markdown"], + "markdown": { + "parser": "gfm" + }, + "source": { + "exclude": [ + "packages/ddp/sockjs-0.3.4.js", + "packages/test-in-browser/diff_match_patch_uncompressed.js", + "packages/jquery/jquery.js", + "packages/underscore/underscore.js", + "packages/json/json2.js", + "packages/minimongo/minimongo_tests.js", + "tools/node_modules", + "tools/skel-pack/package.js", + "docs", + "guide", + "**/node_modules", + "npm-packages" + ] + } +} diff --git a/v3-docs/docs/jsdoc/jsdoc.sh b/v3-docs/docs/jsdoc/jsdoc.sh new file mode 100755 index 0000000000..f40c75f3ac --- /dev/null +++ b/v3-docs/docs/jsdoc/jsdoc.sh @@ -0,0 +1,19 @@ +#!/usr/bin/env bash + +INFINITY=10000 + +TOPDIR=$(pwd) +METEOR_DIR="../../" +cd "$METEOR_DIR" + +# Ensure that jsdoc failure actually makes this script fail. +set -o pipefail + +# Call git grep to find all js files with the appropriate comment tags, +# and only then pass it to JSDoc which will parse the JS files. +# This is a whole lot faster than calling JSDoc recursively. +git grep -ialE "@(summary|borrows|namespace|memberof|alias)" | xargs -L ${INFINITY} -t \ + "$TOPDIR/node_modules/.bin/jsdoc" \ + -t "$TOPDIR/jsdoc/docdata-jsdoc-template" \ + -c "$TOPDIR/jsdoc/jsdoc-conf.json" \ + 2>&1 | grep -v 'WARNING: JSDoc does not currently handle' diff --git a/v3-docs/docs/package-lock.json b/v3-docs/docs/package-lock.json new file mode 100644 index 0000000000..e59ffd9eaa --- /dev/null +++ b/v3-docs/docs/package-lock.json @@ -0,0 +1,2282 @@ +{ + "name": "docs", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "dependencies": { + "vue-collapsed": "^1.3.0" + }, + "devDependencies": { + "canonical-json": "^0.0.4", + "jsdoc": "^4.0.2", + "vitepress": "1.0.0-rc.31" + } + }, + "node_modules/@algolia/autocomplete-core": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/@algolia/autocomplete-core/-/autocomplete-core-1.9.3.tgz", + "integrity": "sha512-009HdfugtGCdC4JdXUbVJClA0q0zh24yyePn+KUGk3rP7j8FEe/m5Yo/z65gn6nP/cM39PxpzqKrL7A6fP6PPw==", + "dev": true, + "dependencies": { + "@algolia/autocomplete-plugin-algolia-insights": "1.9.3", + "@algolia/autocomplete-shared": "1.9.3" + } + }, + "node_modules/@algolia/autocomplete-plugin-algolia-insights": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/@algolia/autocomplete-plugin-algolia-insights/-/autocomplete-plugin-algolia-insights-1.9.3.tgz", + "integrity": "sha512-a/yTUkcO/Vyy+JffmAnTWbr4/90cLzw+CC3bRbhnULr/EM0fGNvM13oQQ14f2moLMcVDyAx/leczLlAOovhSZg==", + "dev": true, + "dependencies": { + "@algolia/autocomplete-shared": "1.9.3" + }, + "peerDependencies": { + "search-insights": ">= 1 < 3" + } + }, + "node_modules/@algolia/autocomplete-preset-algolia": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/@algolia/autocomplete-preset-algolia/-/autocomplete-preset-algolia-1.9.3.tgz", + "integrity": "sha512-d4qlt6YmrLMYy95n5TB52wtNDr6EgAIPH81dvvvW8UmuWRgxEtY0NJiPwl/h95JtG2vmRM804M0DSwMCNZlzRA==", + "dev": true, + "dependencies": { + "@algolia/autocomplete-shared": "1.9.3" + }, + "peerDependencies": { + "@algolia/client-search": ">= 4.9.1 < 6", + "algoliasearch": ">= 4.9.1 < 6" + } + }, + "node_modules/@algolia/autocomplete-shared": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/@algolia/autocomplete-shared/-/autocomplete-shared-1.9.3.tgz", + "integrity": "sha512-Wnm9E4Ye6Rl6sTTqjoymD+l8DjSTHsHboVRYrKgEt8Q7UHm9nYbqhN/i0fhUYA3OAEH7WA8x3jfpnmJm3rKvaQ==", + "dev": true, + "peerDependencies": { + "@algolia/client-search": ">= 4.9.1 < 6", + "algoliasearch": ">= 4.9.1 < 6" + } + }, + "node_modules/@algolia/cache-browser-local-storage": { + "version": "4.20.0", + "resolved": "https://registry.npmjs.org/@algolia/cache-browser-local-storage/-/cache-browser-local-storage-4.20.0.tgz", + "integrity": "sha512-uujahcBt4DxduBTvYdwO3sBfHuJvJokiC3BP1+O70fglmE1ShkH8lpXqZBac1rrU3FnNYSUs4pL9lBdTKeRPOQ==", + "dev": true, + "dependencies": { + "@algolia/cache-common": "4.20.0" + } + }, + "node_modules/@algolia/cache-common": { + "version": "4.20.0", + "resolved": "https://registry.npmjs.org/@algolia/cache-common/-/cache-common-4.20.0.tgz", + "integrity": "sha512-vCfxauaZutL3NImzB2G9LjLt36vKAckc6DhMp05An14kVo8F1Yofb6SIl6U3SaEz8pG2QOB9ptwM5c+zGevwIQ==", + "dev": true + }, + "node_modules/@algolia/cache-in-memory": { + "version": "4.20.0", + "resolved": "https://registry.npmjs.org/@algolia/cache-in-memory/-/cache-in-memory-4.20.0.tgz", + "integrity": "sha512-Wm9ak/IaacAZXS4mB3+qF/KCoVSBV6aLgIGFEtQtJwjv64g4ePMapORGmCyulCFwfePaRAtcaTbMcJF+voc/bg==", + "dev": true, + "dependencies": { + "@algolia/cache-common": "4.20.0" + } + }, + "node_modules/@algolia/client-account": { + "version": "4.20.0", + "resolved": "https://registry.npmjs.org/@algolia/client-account/-/client-account-4.20.0.tgz", + "integrity": "sha512-GGToLQvrwo7am4zVkZTnKa72pheQeez/16sURDWm7Seyz+HUxKi3BM6fthVVPUEBhtJ0reyVtuK9ArmnaKl10Q==", + "dev": true, + "dependencies": { + "@algolia/client-common": "4.20.0", + "@algolia/client-search": "4.20.0", + "@algolia/transporter": "4.20.0" + } + }, + "node_modules/@algolia/client-analytics": { + "version": "4.20.0", + "resolved": "https://registry.npmjs.org/@algolia/client-analytics/-/client-analytics-4.20.0.tgz", + "integrity": "sha512-EIr+PdFMOallRdBTHHdKI3CstslgLORQG7844Mq84ib5oVFRVASuuPmG4bXBgiDbcsMLUeOC6zRVJhv1KWI0ug==", + "dev": true, + "dependencies": { + "@algolia/client-common": "4.20.0", + "@algolia/client-search": "4.20.0", + "@algolia/requester-common": "4.20.0", + "@algolia/transporter": "4.20.0" + } + }, + "node_modules/@algolia/client-common": { + "version": "4.20.0", + "resolved": "https://registry.npmjs.org/@algolia/client-common/-/client-common-4.20.0.tgz", + "integrity": "sha512-P3WgMdEss915p+knMMSd/fwiHRHKvDu4DYRrCRaBrsfFw7EQHon+EbRSm4QisS9NYdxbS04kcvNoavVGthyfqQ==", + "dev": true, + "dependencies": { + "@algolia/requester-common": "4.20.0", + "@algolia/transporter": "4.20.0" + } + }, + "node_modules/@algolia/client-personalization": { + "version": "4.20.0", + "resolved": "https://registry.npmjs.org/@algolia/client-personalization/-/client-personalization-4.20.0.tgz", + "integrity": "sha512-N9+zx0tWOQsLc3K4PVRDV8GUeOLAY0i445En79Pr3zWB+m67V+n/8w4Kw1C5LlbHDDJcyhMMIlqezh6BEk7xAQ==", + "dev": true, + "dependencies": { + "@algolia/client-common": "4.20.0", + "@algolia/requester-common": "4.20.0", + "@algolia/transporter": "4.20.0" + } + }, + "node_modules/@algolia/client-search": { + "version": "4.20.0", + "resolved": "https://registry.npmjs.org/@algolia/client-search/-/client-search-4.20.0.tgz", + "integrity": "sha512-zgwqnMvhWLdpzKTpd3sGmMlr4c+iS7eyyLGiaO51zDZWGMkpgoNVmltkzdBwxOVXz0RsFMznIxB9zuarUv4TZg==", + "dev": true, + "dependencies": { + "@algolia/client-common": "4.20.0", + "@algolia/requester-common": "4.20.0", + "@algolia/transporter": "4.20.0" + } + }, + "node_modules/@algolia/logger-common": { + "version": "4.20.0", + "resolved": "https://registry.npmjs.org/@algolia/logger-common/-/logger-common-4.20.0.tgz", + "integrity": "sha512-xouigCMB5WJYEwvoWW5XDv7Z9f0A8VoXJc3VKwlHJw/je+3p2RcDXfksLI4G4lIVncFUYMZx30tP/rsdlvvzHQ==", + "dev": true + }, + "node_modules/@algolia/logger-console": { + "version": "4.20.0", + "resolved": "https://registry.npmjs.org/@algolia/logger-console/-/logger-console-4.20.0.tgz", + "integrity": "sha512-THlIGG1g/FS63z0StQqDhT6bprUczBI8wnLT3JWvfAQDZX5P6fCg7dG+pIrUBpDIHGszgkqYEqECaKKsdNKOUA==", + "dev": true, + "dependencies": { + "@algolia/logger-common": "4.20.0" + } + }, + "node_modules/@algolia/requester-browser-xhr": { + "version": "4.20.0", + "resolved": "https://registry.npmjs.org/@algolia/requester-browser-xhr/-/requester-browser-xhr-4.20.0.tgz", + "integrity": "sha512-HbzoSjcjuUmYOkcHECkVTwAelmvTlgs48N6Owt4FnTOQdwn0b8pdht9eMgishvk8+F8bal354nhx/xOoTfwiAw==", + "dev": true, + "dependencies": { + "@algolia/requester-common": "4.20.0" + } + }, + "node_modules/@algolia/requester-common": { + "version": "4.20.0", + "resolved": "https://registry.npmjs.org/@algolia/requester-common/-/requester-common-4.20.0.tgz", + "integrity": "sha512-9h6ye6RY/BkfmeJp7Z8gyyeMrmmWsMOCRBXQDs4mZKKsyVlfIVICpcSibbeYcuUdurLhIlrOUkH3rQEgZzonng==", + "dev": true + }, + "node_modules/@algolia/requester-node-http": { + "version": "4.20.0", + "resolved": "https://registry.npmjs.org/@algolia/requester-node-http/-/requester-node-http-4.20.0.tgz", + "integrity": "sha512-ocJ66L60ABSSTRFnCHIEZpNHv6qTxsBwJEPfYaSBsLQodm0F9ptvalFkHMpvj5DfE22oZrcrLbOYM2bdPJRHng==", + "dev": true, + "dependencies": { + "@algolia/requester-common": "4.20.0" + } + }, + "node_modules/@algolia/transporter": { + "version": "4.20.0", + "resolved": "https://registry.npmjs.org/@algolia/transporter/-/transporter-4.20.0.tgz", + "integrity": "sha512-Lsii1pGWOAISbzeyuf+r/GPhvHMPHSPrTDWNcIzOE1SG1inlJHICaVe2ikuoRjcpgxZNU54Jl+if15SUCsaTUg==", + "dev": true, + "dependencies": { + "@algolia/cache-common": "4.20.0", + "@algolia/logger-common": "4.20.0", + "@algolia/requester-common": "4.20.0" + } + }, + "node_modules/@babel/parser": { + "version": "7.23.6", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.6.tgz", + "integrity": "sha512-Z2uID7YJ7oNvAI20O9X0bblw7Qqs8Q2hFy0R9tAfnfLkp5MW0UH9eUvnDSnFwKZ0AvgS1ucqR4KzvVHgnke1VQ==", + "dev": true, + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@docsearch/css": { + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/@docsearch/css/-/css-3.5.2.tgz", + "integrity": "sha512-SPiDHaWKQZpwR2siD0KQUwlStvIAnEyK6tAE2h2Wuoq8ue9skzhlyVQ1ddzOxX6khULnAALDiR/isSF3bnuciA==", + "dev": true + }, + "node_modules/@docsearch/js": { + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/@docsearch/js/-/js-3.5.2.tgz", + "integrity": "sha512-p1YFTCDflk8ieHgFJYfmyHBki1D61+U9idwrLh+GQQMrBSP3DLGKpy0XUJtPjAOPltcVbqsTjiPFfH7JImjUNg==", + "dev": true, + "dependencies": { + "@docsearch/react": "3.5.2", + "preact": "^10.0.0" + } + }, + "node_modules/@docsearch/react": { + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/@docsearch/react/-/react-3.5.2.tgz", + "integrity": "sha512-9Ahcrs5z2jq/DcAvYtvlqEBHImbm4YJI8M9y0x6Tqg598P40HTEkX7hsMcIuThI+hTFxRGZ9hll0Wygm2yEjng==", + "dev": true, + "dependencies": { + "@algolia/autocomplete-core": "1.9.3", + "@algolia/autocomplete-preset-algolia": "1.9.3", + "@docsearch/css": "3.5.2", + "algoliasearch": "^4.19.1" + }, + "peerDependencies": { + "@types/react": ">= 16.8.0 < 19.0.0", + "react": ">= 16.8.0 < 19.0.0", + "react-dom": ">= 16.8.0 < 19.0.0", + "search-insights": ">= 1 < 3" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "react": { + "optional": true + }, + "react-dom": { + "optional": true + }, + "search-insights": { + "optional": true + } + } + }, + "node_modules/@esbuild/aix-ppc64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.19.12.tgz", + "integrity": "sha512-bmoCYyWdEL3wDQIVbcyzRyeKLgk2WtWLTWz1ZIAZF/EGbNOwSA6ew3PftJ1PqMiOOGu0OyFMzG53L0zqIpPeNA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-arm": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.19.12.tgz", + "integrity": "sha512-qg/Lj1mu3CdQlDEEiWrlC4eaPZ1KztwGJ9B6J+/6G+/4ewxJg7gqj8eVYWvao1bXrqGiW2rsBZFSX3q2lcW05w==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-arm64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.19.12.tgz", + "integrity": "sha512-P0UVNGIienjZv3f5zq0DP3Nt2IE/3plFzuaS96vihvD0Hd6H/q4WXUGpCxD/E8YrSXfNyRPbpTq+T8ZQioSuPA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-x64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.19.12.tgz", + "integrity": "sha512-3k7ZoUW6Q6YqhdhIaq/WZ7HwBpnFBlW905Fa4s4qWJyiNOgT1dOqDiVAQFwBH7gBRZr17gLrlFCRzF6jFh7Kew==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.19.12.tgz", + "integrity": "sha512-B6IeSgZgtEzGC42jsI+YYu9Z3HKRxp8ZT3cqhvliEHovq8HSX2YX8lNocDn79gCKJXOSaEot9MVYky7AKjCs8g==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/darwin-x64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.19.12.tgz", + "integrity": "sha512-hKoVkKzFiToTgn+41qGhsUJXFlIjxI/jSYeZf3ugemDYZldIXIxhvwN6erJGlX4t5h417iFuheZ7l+YVn05N3A==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.19.12.tgz", + "integrity": "sha512-4aRvFIXmwAcDBw9AueDQ2YnGmz5L6obe5kmPT8Vd+/+x/JMVKCgdcRwH6APrbpNXsPz+K653Qg8HB/oXvXVukA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.19.12.tgz", + "integrity": "sha512-EYoXZ4d8xtBoVN7CEwWY2IN4ho76xjYXqSXMNccFSx2lgqOG/1TBPW0yPx1bJZk94qu3tX0fycJeeQsKovA8gg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.19.12.tgz", + "integrity": "sha512-J5jPms//KhSNv+LO1S1TX1UWp1ucM6N6XuL6ITdKWElCu8wXP72l9MM0zDTzzeikVyqFE6U8YAV9/tFyj0ti+w==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.19.12.tgz", + "integrity": "sha512-EoTjyYyLuVPfdPLsGVVVC8a0p1BFFvtpQDB/YLEhaXyf/5bczaGeN15QkR+O4S5LeJ92Tqotve7i1jn35qwvdA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.19.12.tgz", + "integrity": "sha512-Thsa42rrP1+UIGaWz47uydHSBOgTUnwBwNq59khgIwktK6x60Hivfbux9iNR0eHCHzOLjLMLfUMLCypBkZXMHA==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.19.12.tgz", + "integrity": "sha512-LiXdXA0s3IqRRjm6rV6XaWATScKAXjI4R4LoDlvO7+yQqFdlr1Bax62sRwkVvRIrwXxvtYEHHI4dm50jAXkuAA==", + "cpu": [ + "loong64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.19.12.tgz", + "integrity": "sha512-fEnAuj5VGTanfJ07ff0gOA6IPsvrVHLVb6Lyd1g2/ed67oU1eFzL0r9WL7ZzscD+/N6i3dWumGE1Un4f7Amf+w==", + "cpu": [ + "mips64el" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.19.12.tgz", + "integrity": "sha512-nYJA2/QPimDQOh1rKWedNOe3Gfc8PabU7HT3iXWtNUbRzXS9+vgB0Fjaqr//XNbd82mCxHzik2qotuI89cfixg==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.19.12.tgz", + "integrity": "sha512-2MueBrlPQCw5dVJJpQdUYgeqIzDQgw3QtiAHUC4RBz9FXPrskyyU3VI1hw7C0BSKB9OduwSJ79FTCqtGMWqJHg==", + "cpu": [ + "riscv64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.19.12.tgz", + "integrity": "sha512-+Pil1Nv3Umes4m3AZKqA2anfhJiVmNCYkPchwFJNEJN5QxmTs1uzyy4TvmDrCRNT2ApwSari7ZIgrPeUx4UZDg==", + "cpu": [ + "s390x" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.19.12.tgz", + "integrity": "sha512-B71g1QpxfwBvNrfyJdVDexenDIt1CiDN1TIXLbhOw0KhJzE78KIFGX6OJ9MrtC0oOqMWf+0xop4qEU8JrJTwCg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.19.12.tgz", + "integrity": "sha512-3ltjQ7n1owJgFbuC61Oj++XhtzmymoCihNFgT84UAmJnxJfm4sYCiSLTXZtE00VWYpPMYc+ZQmB6xbSdVh0JWA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.19.12.tgz", + "integrity": "sha512-RbrfTB9SWsr0kWmb9srfF+L933uMDdu9BIzdA7os2t0TXhCRjrQyCeOt6wVxr79CKD4c+p+YhCj31HBkYcXebw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.19.12.tgz", + "integrity": "sha512-HKjJwRrW8uWtCQnQOz9qcU3mUZhTUQvi56Q8DPTLLB+DawoiQdjsYq+j+D3s9I8VFtDr+F9CjgXKKC4ss89IeA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.19.12.tgz", + "integrity": "sha512-URgtR1dJnmGvX864pn1B2YUYNzjmXkuJOIqG2HdU62MVS4EHpU2946OZoTMnRUHklGtJdJZ33QfzdjGACXhn1A==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.19.12.tgz", + "integrity": "sha512-+ZOE6pUkMOJfmxmBZElNOx72NKpIa/HFOMGzu8fqzQJ5kgf6aTGrcJaFsNiVMH4JKpMipyK+7k0n2UXN7a8YKQ==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.19.12.tgz", + "integrity": "sha512-T1QyPSDCyMXaO3pzBkF96E8xMkiRYbUEZADd29SyPGabqxMViNoii+NcK7eWJAEoU6RZyEm5lVSIjTmcdoB9HA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.4.15", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", + "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", + "dev": true + }, + "node_modules/@jsdoc/salty": { + "version": "0.2.6", + "resolved": "https://registry.npmjs.org/@jsdoc/salty/-/salty-0.2.6.tgz", + "integrity": "sha512-aA+awb5yoml8TQ3CzI5Ue7sM3VMRC4l1zJJW4fgZ8OCL1wshJZhNzaf0PL85DSnOUw6QuFgeHGD/eq/xwwAF2g==", + "dev": true, + "dependencies": { + "lodash": "^4.17.21" + }, + "engines": { + "node": ">=v12.0.0" + } + }, + "node_modules/@rollup/rollup-android-arm-eabi": { + "version": "4.9.6", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.9.6.tgz", + "integrity": "sha512-MVNXSSYN6QXOulbHpLMKYi60ppyO13W9my1qogeiAqtjb2yR4LSmfU2+POvDkLzhjYLXz9Rf9+9a3zFHW1Lecg==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-android-arm64": { + "version": "4.9.6", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.9.6.tgz", + "integrity": "sha512-T14aNLpqJ5wzKNf5jEDpv5zgyIqcpn1MlwCrUXLrwoADr2RkWA0vOWP4XxbO9aiO3dvMCQICZdKeDrFl7UMClw==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-darwin-arm64": { + "version": "4.9.6", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.9.6.tgz", + "integrity": "sha512-CqNNAyhRkTbo8VVZ5R85X73H3R5NX9ONnKbXuHisGWC0qRbTTxnF1U4V9NafzJbgGM0sHZpdO83pLPzq8uOZFw==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-darwin-x64": { + "version": "4.9.6", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.9.6.tgz", + "integrity": "sha512-zRDtdJuRvA1dc9Mp6BWYqAsU5oeLixdfUvkTHuiYOHwqYuQ4YgSmi6+/lPvSsqc/I0Omw3DdICx4Tfacdzmhog==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-linux-arm-gnueabihf": { + "version": "4.9.6", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.9.6.tgz", + "integrity": "sha512-oNk8YXDDnNyG4qlNb6is1ojTOGL/tRhbbKeE/YuccItzerEZT68Z9gHrY3ROh7axDc974+zYAPxK5SH0j/G+QQ==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-gnu": { + "version": "4.9.6", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.9.6.tgz", + "integrity": "sha512-Z3O60yxPtuCYobrtzjo0wlmvDdx2qZfeAWTyfOjEDqd08kthDKexLpV97KfAeUXPosENKd8uyJMRDfFMxcYkDQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-musl": { + "version": "4.9.6", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.9.6.tgz", + "integrity": "sha512-gpiG0qQJNdYEVad+1iAsGAbgAnZ8j07FapmnIAQgODKcOTjLEWM9sRb+MbQyVsYCnA0Im6M6QIq6ax7liws6eQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-gnu": { + "version": "4.9.6", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.9.6.tgz", + "integrity": "sha512-+uCOcvVmFUYvVDr27aiyun9WgZk0tXe7ThuzoUTAukZJOwS5MrGbmSlNOhx1j80GdpqbOty05XqSl5w4dQvcOA==", + "cpu": [ + "riscv64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-gnu": { + "version": "4.9.6", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.9.6.tgz", + "integrity": "sha512-HUNqM32dGzfBKuaDUBqFB7tP6VMN74eLZ33Q9Y1TBqRDn+qDonkAUyKWwF9BR9unV7QUzffLnz9GrnKvMqC/fw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-musl": { + "version": "4.9.6", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.9.6.tgz", + "integrity": "sha512-ch7M+9Tr5R4FK40FHQk8VnML0Szi2KRujUgHXd/HjuH9ifH72GUmw6lStZBo3c3GB82vHa0ZoUfjfcM7JiiMrQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-win32-arm64-msvc": { + "version": "4.9.6", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.9.6.tgz", + "integrity": "sha512-VD6qnR99dhmTQ1mJhIzXsRcTBvTjbfbGGwKAHcu+52cVl15AC/kplkhxzW/uT0Xl62Y/meBKDZvoJSJN+vTeGA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-ia32-msvc": { + "version": "4.9.6", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.9.6.tgz", + "integrity": "sha512-J9AFDq/xiRI58eR2NIDfyVmTYGyIZmRcvcAoJ48oDld/NTR8wyiPUu2X/v1navJ+N/FGg68LEbX3Ejd6l8B7MQ==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-x64-msvc": { + "version": "4.9.6", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.9.6.tgz", + "integrity": "sha512-jqzNLhNDvIZOrt69Ce4UjGRpXJBzhUBzawMwnaDAwyHriki3XollsewxWzOzz+4yOFDkuJHtTsZFwMxhYJWmLQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@types/estree": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz", + "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==", + "dev": true + }, + "node_modules/@types/hast": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@types/hast/-/hast-3.0.3.tgz", + "integrity": "sha512-2fYGlaDy/qyLlhidX42wAH0KBi2TCjKMH8CHmBXgRlJ3Y+OXTiqsPQ6IWarZKwF1JoUcAJdPogv1d4b0COTpmQ==", + "dev": true, + "dependencies": { + "@types/unist": "*" + } + }, + "node_modules/@types/linkify-it": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/@types/linkify-it/-/linkify-it-3.0.5.tgz", + "integrity": "sha512-yg6E+u0/+Zjva+buc3EIb+29XEg4wltq7cSmd4Uc2EE/1nUVmxyzpX6gUXD0V8jIrG0r7YeOGVIbYRkxeooCtw==", + "dev": true + }, + "node_modules/@types/markdown-it": { + "version": "13.0.7", + "resolved": "https://registry.npmjs.org/@types/markdown-it/-/markdown-it-13.0.7.tgz", + "integrity": "sha512-U/CBi2YUUcTHBt5tjO2r5QV/x0Po6nsYwQU4Y04fBS6vfoImaiZ6f8bi3CjTCxBPQSO1LMyUqkByzi8AidyxfA==", + "dev": true, + "dependencies": { + "@types/linkify-it": "*", + "@types/mdurl": "*" + } + }, + "node_modules/@types/mdast": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-4.0.3.tgz", + "integrity": "sha512-LsjtqsyF+d2/yFOYaN22dHZI1Cpwkrj+g06G8+qtUKlhovPW89YhqSnfKtMbkgmEtYpH2gydRNULd6y8mciAFg==", + "dev": true, + "dependencies": { + "@types/unist": "*" + } + }, + "node_modules/@types/mdurl": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@types/mdurl/-/mdurl-1.0.5.tgz", + "integrity": "sha512-6L6VymKTzYSrEf4Nev4Xa1LCHKrlTlYCBMTlQKFuddo1CvQcE52I0mwfOJayueUC7MJuXOeHTcIU683lzd0cUA==", + "dev": true + }, + "node_modules/@types/unist": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-3.0.2.tgz", + "integrity": "sha512-dqId9J8K/vGi5Zr7oo212BGii5m3q5Hxlkwy3WpYuKPklmBEvsbMYYyLxAQpSffdLl/gdW0XUpKWFvYmyoWCoQ==", + "dev": true + }, + "node_modules/@types/web-bluetooth": { + "version": "0.0.20", + "resolved": "https://registry.npmjs.org/@types/web-bluetooth/-/web-bluetooth-0.0.20.tgz", + "integrity": "sha512-g9gZnnXVq7gM7v3tJCWV/qw7w+KeOlSHAhgF9RytFyifW6AF61hdT2ucrYhPq9hLs5JIryeupHV3qGk95dH9ow==", + "dev": true + }, + "node_modules/@ungap/structured-clone": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz", + "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==", + "dev": true + }, + "node_modules/@vitejs/plugin-vue": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/@vitejs/plugin-vue/-/plugin-vue-4.6.2.tgz", + "integrity": "sha512-kqf7SGFoG+80aZG6Pf+gsZIVvGSCKE98JbiWqcCV9cThtg91Jav0yvYFC9Zb+jKetNGF6ZKeoaxgZfND21fWKw==", + "dev": true, + "engines": { + "node": "^14.18.0 || >=16.0.0" + }, + "peerDependencies": { + "vite": "^4.0.0 || ^5.0.0", + "vue": "^3.2.25" + } + }, + "node_modules/@vue/compiler-core": { + "version": "3.4.15", + "resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.4.15.tgz", + "integrity": "sha512-XcJQVOaxTKCnth1vCxEChteGuwG6wqnUHxAm1DO3gCz0+uXKaJNx8/digSz4dLALCy8n2lKq24jSUs8segoqIw==", + "dev": true, + "dependencies": { + "@babel/parser": "^7.23.6", + "@vue/shared": "3.4.15", + "entities": "^4.5.0", + "estree-walker": "^2.0.2", + "source-map-js": "^1.0.2" + } + }, + "node_modules/@vue/compiler-dom": { + "version": "3.4.15", + "resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.4.15.tgz", + "integrity": "sha512-wox0aasVV74zoXyblarOM3AZQz/Z+OunYcIHe1OsGclCHt8RsRm04DObjefaI82u6XDzv+qGWZ24tIsRAIi5MQ==", + "dev": true, + "dependencies": { + "@vue/compiler-core": "3.4.15", + "@vue/shared": "3.4.15" + } + }, + "node_modules/@vue/compiler-sfc": { + "version": "3.4.15", + "resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.4.15.tgz", + "integrity": "sha512-LCn5M6QpkpFsh3GQvs2mJUOAlBQcCco8D60Bcqmf3O3w5a+KWS5GvYbrrJBkgvL1BDnTp+e8q0lXCLgHhKguBA==", + "dev": true, + "dependencies": { + "@babel/parser": "^7.23.6", + "@vue/compiler-core": "3.4.15", + "@vue/compiler-dom": "3.4.15", + "@vue/compiler-ssr": "3.4.15", + "@vue/shared": "3.4.15", + "estree-walker": "^2.0.2", + "magic-string": "^0.30.5", + "postcss": "^8.4.33", + "source-map-js": "^1.0.2" + } + }, + "node_modules/@vue/compiler-ssr": { + "version": "3.4.15", + "resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.4.15.tgz", + "integrity": "sha512-1jdeQyiGznr8gjFDadVmOJqZiLNSsMa5ZgqavkPZ8O2wjHv0tVuAEsw5hTdUoUW4232vpBbL/wJhzVW/JwY1Uw==", + "dev": true, + "dependencies": { + "@vue/compiler-dom": "3.4.15", + "@vue/shared": "3.4.15" + } + }, + "node_modules/@vue/devtools-api": { + "version": "6.5.1", + "resolved": "https://registry.npmjs.org/@vue/devtools-api/-/devtools-api-6.5.1.tgz", + "integrity": "sha512-+KpckaAQyfbvshdDW5xQylLni1asvNSGme1JFs8I1+/H5pHEhqUKMEQD/qn3Nx5+/nycBq11qAEi8lk+LXI2dA==", + "dev": true + }, + "node_modules/@vue/reactivity": { + "version": "3.4.15", + "resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.4.15.tgz", + "integrity": "sha512-55yJh2bsff20K5O84MxSvXKPHHt17I2EomHznvFiJCAZpJTNW8IuLj1xZWMLELRhBK3kkFV/1ErZGHJfah7i7w==", + "dev": true, + "dependencies": { + "@vue/shared": "3.4.15" + } + }, + "node_modules/@vue/runtime-core": { + "version": "3.4.15", + "resolved": "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.4.15.tgz", + "integrity": "sha512-6E3by5m6v1AkW0McCeAyhHTw+3y17YCOKG0U0HDKDscV4Hs0kgNT5G+GCHak16jKgcCDHpI9xe5NKb8sdLCLdw==", + "dev": true, + "dependencies": { + "@vue/reactivity": "3.4.15", + "@vue/shared": "3.4.15" + } + }, + "node_modules/@vue/runtime-dom": { + "version": "3.4.15", + "resolved": "https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.4.15.tgz", + "integrity": "sha512-EVW8D6vfFVq3V/yDKNPBFkZKGMFSvZrUQmx196o/v2tHKdwWdiZjYUBS+0Ez3+ohRyF8Njwy/6FH5gYJ75liUw==", + "dev": true, + "dependencies": { + "@vue/runtime-core": "3.4.15", + "@vue/shared": "3.4.15", + "csstype": "^3.1.3" + } + }, + "node_modules/@vue/server-renderer": { + "version": "3.4.15", + "resolved": "https://registry.npmjs.org/@vue/server-renderer/-/server-renderer-3.4.15.tgz", + "integrity": "sha512-3HYzaidu9cHjrT+qGUuDhFYvF/j643bHC6uUN9BgM11DVy+pM6ATsG6uPBLnkwOgs7BpJABReLmpL3ZPAsUaqw==", + "dev": true, + "dependencies": { + "@vue/compiler-ssr": "3.4.15", + "@vue/shared": "3.4.15" + }, + "peerDependencies": { + "vue": "3.4.15" + } + }, + "node_modules/@vue/shared": { + "version": "3.4.15", + "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.4.15.tgz", + "integrity": "sha512-KzfPTxVaWfB+eGcGdbSf4CWdaXcGDqckoeXUh7SB3fZdEtzPCK2Vq9B/lRRL3yutax/LWITz+SwvgyOxz5V75g==", + "dev": true + }, + "node_modules/@vueuse/core": { + "version": "10.7.2", + "resolved": "https://registry.npmjs.org/@vueuse/core/-/core-10.7.2.tgz", + "integrity": "sha512-AOyAL2rK0By62Hm+iqQn6Rbu8bfmbgaIMXcE3TSr7BdQ42wnSFlwIdPjInO62onYsEMK/yDMU8C6oGfDAtZ2qQ==", + "dev": true, + "dependencies": { + "@types/web-bluetooth": "^0.0.20", + "@vueuse/metadata": "10.7.2", + "@vueuse/shared": "10.7.2", + "vue-demi": ">=0.14.6" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + } + }, + "node_modules/@vueuse/core/node_modules/vue-demi": { + "version": "0.14.6", + "resolved": "https://registry.npmjs.org/vue-demi/-/vue-demi-0.14.6.tgz", + "integrity": "sha512-8QA7wrYSHKaYgUxDA5ZC24w+eHm3sYCbp0EzcDwKqN3p6HqtTCGR/GVsPyZW92unff4UlcSh++lmqDWN3ZIq4w==", + "dev": true, + "hasInstallScript": true, + "bin": { + "vue-demi-fix": "bin/vue-demi-fix.js", + "vue-demi-switch": "bin/vue-demi-switch.js" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + }, + "peerDependencies": { + "@vue/composition-api": "^1.0.0-rc.1", + "vue": "^3.0.0-0 || ^2.6.0" + }, + "peerDependenciesMeta": { + "@vue/composition-api": { + "optional": true + } + } + }, + "node_modules/@vueuse/integrations": { + "version": "10.7.2", + "resolved": "https://registry.npmjs.org/@vueuse/integrations/-/integrations-10.7.2.tgz", + "integrity": "sha512-+u3RLPFedjASs5EKPc69Ge49WNgqeMfSxFn+qrQTzblPXZg6+EFzhjarS5edj2qAf6xQ93f95TUxRwKStXj/sQ==", + "dev": true, + "dependencies": { + "@vueuse/core": "10.7.2", + "@vueuse/shared": "10.7.2", + "vue-demi": ">=0.14.6" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + }, + "peerDependencies": { + "async-validator": "*", + "axios": "*", + "change-case": "*", + "drauu": "*", + "focus-trap": "*", + "fuse.js": "*", + "idb-keyval": "*", + "jwt-decode": "*", + "nprogress": "*", + "qrcode": "*", + "sortablejs": "*", + "universal-cookie": "*" + }, + "peerDependenciesMeta": { + "async-validator": { + "optional": true + }, + "axios": { + "optional": true + }, + "change-case": { + "optional": true + }, + "drauu": { + "optional": true + }, + "focus-trap": { + "optional": true + }, + "fuse.js": { + "optional": true + }, + "idb-keyval": { + "optional": true + }, + "jwt-decode": { + "optional": true + }, + "nprogress": { + "optional": true + }, + "qrcode": { + "optional": true + }, + "sortablejs": { + "optional": true + }, + "universal-cookie": { + "optional": true + } + } + }, + "node_modules/@vueuse/integrations/node_modules/vue-demi": { + "version": "0.14.6", + "resolved": "https://registry.npmjs.org/vue-demi/-/vue-demi-0.14.6.tgz", + "integrity": "sha512-8QA7wrYSHKaYgUxDA5ZC24w+eHm3sYCbp0EzcDwKqN3p6HqtTCGR/GVsPyZW92unff4UlcSh++lmqDWN3ZIq4w==", + "dev": true, + "hasInstallScript": true, + "bin": { + "vue-demi-fix": "bin/vue-demi-fix.js", + "vue-demi-switch": "bin/vue-demi-switch.js" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + }, + "peerDependencies": { + "@vue/composition-api": "^1.0.0-rc.1", + "vue": "^3.0.0-0 || ^2.6.0" + }, + "peerDependenciesMeta": { + "@vue/composition-api": { + "optional": true + } + } + }, + "node_modules/@vueuse/metadata": { + "version": "10.7.2", + "resolved": "https://registry.npmjs.org/@vueuse/metadata/-/metadata-10.7.2.tgz", + "integrity": "sha512-kCWPb4J2KGrwLtn1eJwaJD742u1k5h6v/St5wFe8Quih90+k2a0JP8BS4Zp34XUuJqS2AxFYMb1wjUL8HfhWsQ==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/antfu" + } + }, + "node_modules/@vueuse/shared": { + "version": "10.7.2", + "resolved": "https://registry.npmjs.org/@vueuse/shared/-/shared-10.7.2.tgz", + "integrity": "sha512-qFbXoxS44pi2FkgFjPvF4h7c9oMDutpyBdcJdMYIMg9XyXli2meFMuaKn+UMgsClo//Th6+beeCgqweT/79BVA==", + "dev": true, + "dependencies": { + "vue-demi": ">=0.14.6" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + } + }, + "node_modules/@vueuse/shared/node_modules/vue-demi": { + "version": "0.14.6", + "resolved": "https://registry.npmjs.org/vue-demi/-/vue-demi-0.14.6.tgz", + "integrity": "sha512-8QA7wrYSHKaYgUxDA5ZC24w+eHm3sYCbp0EzcDwKqN3p6HqtTCGR/GVsPyZW92unff4UlcSh++lmqDWN3ZIq4w==", + "dev": true, + "hasInstallScript": true, + "bin": { + "vue-demi-fix": "bin/vue-demi-fix.js", + "vue-demi-switch": "bin/vue-demi-switch.js" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + }, + "peerDependencies": { + "@vue/composition-api": "^1.0.0-rc.1", + "vue": "^3.0.0-0 || ^2.6.0" + }, + "peerDependenciesMeta": { + "@vue/composition-api": { + "optional": true + } + } + }, + "node_modules/algoliasearch": { + "version": "4.20.0", + "resolved": "https://registry.npmjs.org/algoliasearch/-/algoliasearch-4.20.0.tgz", + "integrity": "sha512-y+UHEjnOItoNy0bYO+WWmLWBlPwDjKHW6mNHrPi0NkuhpQOOEbrkwQH/wgKFDLh7qlKjzoKeiRtlpewDPDG23g==", + "dev": true, + "dependencies": { + "@algolia/cache-browser-local-storage": "4.20.0", + "@algolia/cache-common": "4.20.0", + "@algolia/cache-in-memory": "4.20.0", + "@algolia/client-account": "4.20.0", + "@algolia/client-analytics": "4.20.0", + "@algolia/client-common": "4.20.0", + "@algolia/client-personalization": "4.20.0", + "@algolia/client-search": "4.20.0", + "@algolia/logger-common": "4.20.0", + "@algolia/logger-console": "4.20.0", + "@algolia/requester-browser-xhr": "4.20.0", + "@algolia/requester-common": "4.20.0", + "@algolia/requester-node-http": "4.20.0", + "@algolia/transporter": "4.20.0" + } + }, + "node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true + }, + "node_modules/bluebird": { + "version": "3.7.2", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", + "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==", + "dev": true + }, + "node_modules/canonical-json": { + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/canonical-json/-/canonical-json-0.0.4.tgz", + "integrity": "sha512-2sW7x0m/P7dqEnO0O87U7RTVQAaa7MELcd+Jd9FA6CYgYtwJ1TlDWIYMD8nuMkH1KoThsJogqgLyklrt9d/Azw==", + "dev": true + }, + "node_modules/catharsis": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/catharsis/-/catharsis-0.9.0.tgz", + "integrity": "sha512-prMTQVpcns/tzFgFVkVp6ak6RykZyWb3gu8ckUpd6YkTlacOd3DXGJjIpD4Q6zJirizvaiAjSSHlOsA+6sNh2A==", + "dev": true, + "dependencies": { + "lodash": "^4.17.15" + }, + "engines": { + "node": ">= 10" + } + }, + "node_modules/ccount": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/ccount/-/ccount-2.0.1.tgz", + "integrity": "sha512-eyrF0jiFpY+3drT6383f1qhkbGsLSifNAjA61IUjZjmLCWjItY6LB9ft9YhoDgwfmclB2zhu51Lc7+95b8NRAg==", + "dev": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/character-entities-html4": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/character-entities-html4/-/character-entities-html4-2.1.0.tgz", + "integrity": "sha512-1v7fgQRj6hnSwFpq1Eu0ynr/CDEw0rXo2B61qXrLNdHZmPKgb7fqS1a2JwF0rISo9q77jDI8VMEHoApn8qDoZA==", + "dev": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/character-entities-legacy": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/character-entities-legacy/-/character-entities-legacy-3.0.0.tgz", + "integrity": "sha512-RpPp0asT/6ufRm//AJVwpViZbGM/MkjQFxJccQRHmISF/22NBtsHqAWmL+/pmkPWoIUJdWyeVleTl1wydHATVQ==", + "dev": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/comma-separated-tokens": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/comma-separated-tokens/-/comma-separated-tokens-2.0.3.tgz", + "integrity": "sha512-Fu4hJdvzeylCfQPp9SGWidpzrMs7tTrlu6Vb8XGaRGck8QSNZJJp538Wrb60Lax4fPwR64ViY468OIUTbRlGZg==", + "dev": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/csstype": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.3.tgz", + "integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==", + "dev": true + }, + "node_modules/dequal": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/dequal/-/dequal-2.0.3.tgz", + "integrity": "sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/devlop": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/devlop/-/devlop-1.1.0.tgz", + "integrity": "sha512-RWmIqhcFf1lRYBvNmr7qTNuyCt/7/ns2jbpp1+PalgE/rDQcBT0fioSMUpJ93irlUhC5hrg4cYqe6U+0ImW0rA==", + "dev": true, + "dependencies": { + "dequal": "^2.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/entities": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", + "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", + "dev": true, + "engines": { + "node": ">=0.12" + }, + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } + }, + "node_modules/esbuild": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.19.12.tgz", + "integrity": "sha512-aARqgq8roFBj054KvQr5f1sFu0D65G+miZRCuJyJ0G13Zwx7vRar5Zhn2tkQNzIXcBrNVsv/8stehpj+GAjgbg==", + "dev": true, + "hasInstallScript": true, + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=12" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.19.12", + "@esbuild/android-arm": "0.19.12", + "@esbuild/android-arm64": "0.19.12", + "@esbuild/android-x64": "0.19.12", + "@esbuild/darwin-arm64": "0.19.12", + "@esbuild/darwin-x64": "0.19.12", + "@esbuild/freebsd-arm64": "0.19.12", + "@esbuild/freebsd-x64": "0.19.12", + "@esbuild/linux-arm": "0.19.12", + "@esbuild/linux-arm64": "0.19.12", + "@esbuild/linux-ia32": "0.19.12", + "@esbuild/linux-loong64": "0.19.12", + "@esbuild/linux-mips64el": "0.19.12", + "@esbuild/linux-ppc64": "0.19.12", + "@esbuild/linux-riscv64": "0.19.12", + "@esbuild/linux-s390x": "0.19.12", + "@esbuild/linux-x64": "0.19.12", + "@esbuild/netbsd-x64": "0.19.12", + "@esbuild/openbsd-x64": "0.19.12", + "@esbuild/sunos-x64": "0.19.12", + "@esbuild/win32-arm64": "0.19.12", + "@esbuild/win32-ia32": "0.19.12", + "@esbuild/win32-x64": "0.19.12" + } + }, + "node_modules/escape-string-regexp": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", + "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/estree-walker": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", + "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==", + "dev": true + }, + "node_modules/focus-trap": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/focus-trap/-/focus-trap-7.5.4.tgz", + "integrity": "sha512-N7kHdlgsO/v+iD/dMoJKtsSqs5Dz/dXZVebRgJw23LDk+jMi/974zyiOYDziY2JPp8xivq9BmUGwIJMiuSBi7w==", + "dev": true, + "dependencies": { + "tabbable": "^6.2.0" + } + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "dev": true + }, + "node_modules/hast-util-from-parse5": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/hast-util-from-parse5/-/hast-util-from-parse5-8.0.1.tgz", + "integrity": "sha512-Er/Iixbc7IEa7r/XLtuG52zoqn/b3Xng/w6aZQ0xGVxzhw5xUFxcRqdPzP6yFi/4HBYRaifaI5fQ1RH8n0ZeOQ==", + "dev": true, + "dependencies": { + "@types/hast": "^3.0.0", + "@types/unist": "^3.0.0", + "devlop": "^1.0.0", + "hastscript": "^8.0.0", + "property-information": "^6.0.0", + "vfile": "^6.0.0", + "vfile-location": "^5.0.0", + "web-namespaces": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/hast-util-parse-selector": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/hast-util-parse-selector/-/hast-util-parse-selector-4.0.0.tgz", + "integrity": "sha512-wkQCkSYoOGCRKERFWcxMVMOcYE2K1AaNLU8DXS9arxnLOUEWbOXKXiJUNzEpqZ3JOKpnha3jkFrumEjVliDe7A==", + "dev": true, + "dependencies": { + "@types/hast": "^3.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/hast-util-raw": { + "version": "9.0.2", + "resolved": "https://registry.npmjs.org/hast-util-raw/-/hast-util-raw-9.0.2.tgz", + "integrity": "sha512-PldBy71wO9Uq1kyaMch9AHIghtQvIwxBUkv823pKmkTM3oV1JxtsTNYdevMxvUHqcnOAuO65JKU2+0NOxc2ksA==", + "dev": true, + "dependencies": { + "@types/hast": "^3.0.0", + "@types/unist": "^3.0.0", + "@ungap/structured-clone": "^1.0.0", + "hast-util-from-parse5": "^8.0.0", + "hast-util-to-parse5": "^8.0.0", + "html-void-elements": "^3.0.0", + "mdast-util-to-hast": "^13.0.0", + "parse5": "^7.0.0", + "unist-util-position": "^5.0.0", + "unist-util-visit": "^5.0.0", + "vfile": "^6.0.0", + "web-namespaces": "^2.0.0", + "zwitch": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/hast-util-to-html": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/hast-util-to-html/-/hast-util-to-html-9.0.0.tgz", + "integrity": "sha512-IVGhNgg7vANuUA2XKrT6sOIIPgaYZnmLx3l/CCOAK0PtgfoHrZwX7jCSYyFxHTrGmC6S9q8aQQekjp4JPZF+cw==", + "dev": true, + "dependencies": { + "@types/hast": "^3.0.0", + "@types/unist": "^3.0.0", + "ccount": "^2.0.0", + "comma-separated-tokens": "^2.0.0", + "hast-util-raw": "^9.0.0", + "hast-util-whitespace": "^3.0.0", + "html-void-elements": "^3.0.0", + "mdast-util-to-hast": "^13.0.0", + "property-information": "^6.0.0", + "space-separated-tokens": "^2.0.0", + "stringify-entities": "^4.0.0", + "zwitch": "^2.0.4" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/hast-util-to-parse5": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/hast-util-to-parse5/-/hast-util-to-parse5-8.0.0.tgz", + "integrity": "sha512-3KKrV5ZVI8if87DVSi1vDeByYrkGzg4mEfeu4alwgmmIeARiBLKCZS2uw5Gb6nU9x9Yufyj3iudm6i7nl52PFw==", + "dev": true, + "dependencies": { + "@types/hast": "^3.0.0", + "comma-separated-tokens": "^2.0.0", + "devlop": "^1.0.0", + "property-information": "^6.0.0", + "space-separated-tokens": "^2.0.0", + "web-namespaces": "^2.0.0", + "zwitch": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/hast-util-whitespace": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/hast-util-whitespace/-/hast-util-whitespace-3.0.0.tgz", + "integrity": "sha512-88JUN06ipLwsnv+dVn+OIYOvAuvBMy/Qoi6O7mQHxdPXpjy+Cd6xRkWwux7DKO+4sYILtLBRIKgsdpS2gQc7qw==", + "dev": true, + "dependencies": { + "@types/hast": "^3.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/hastscript": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/hastscript/-/hastscript-8.0.0.tgz", + "integrity": "sha512-dMOtzCEd3ABUeSIISmrETiKuyydk1w0pa+gE/uormcTpSYuaNJPbX1NU3JLyscSLjwAQM8bWMhhIlnCqnRvDTw==", + "dev": true, + "dependencies": { + "@types/hast": "^3.0.0", + "comma-separated-tokens": "^2.0.0", + "hast-util-parse-selector": "^4.0.0", + "property-information": "^6.0.0", + "space-separated-tokens": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/html-void-elements": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/html-void-elements/-/html-void-elements-3.0.0.tgz", + "integrity": "sha512-bEqo66MRXsUGxWHV5IP0PUiAWwoEjba4VCzg0LjFJBpchPaTfyfCKTG6bc5F8ucKec3q5y6qOdGyYTSBEvhCrg==", + "dev": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/js2xmlparser": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/js2xmlparser/-/js2xmlparser-4.0.2.tgz", + "integrity": "sha512-6n4D8gLlLf1n5mNLQPRfViYzu9RATblzPEtm1SthMX1Pjao0r9YI9nw7ZIfRxQMERS87mcswrg+r/OYrPRX6jA==", + "dev": true, + "dependencies": { + "xmlcreate": "^2.0.4" + } + }, + "node_modules/jsdoc": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/jsdoc/-/jsdoc-4.0.2.tgz", + "integrity": "sha512-e8cIg2z62InH7azBBi3EsSEqrKx+nUtAS5bBcYTSpZFA+vhNPyhv8PTFZ0WsjOPDj04/dOLlm08EDcQJDqaGQg==", + "dev": true, + "dependencies": { + "@babel/parser": "^7.20.15", + "@jsdoc/salty": "^0.2.1", + "@types/markdown-it": "^12.2.3", + "bluebird": "^3.7.2", + "catharsis": "^0.9.0", + "escape-string-regexp": "^2.0.0", + "js2xmlparser": "^4.0.2", + "klaw": "^3.0.0", + "markdown-it": "^12.3.2", + "markdown-it-anchor": "^8.4.1", + "marked": "^4.0.10", + "mkdirp": "^1.0.4", + "requizzle": "^0.2.3", + "strip-json-comments": "^3.1.0", + "underscore": "~1.13.2" + }, + "bin": { + "jsdoc": "jsdoc.js" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/jsdoc/node_modules/@types/markdown-it": { + "version": "12.2.3", + "resolved": "https://registry.npmjs.org/@types/markdown-it/-/markdown-it-12.2.3.tgz", + "integrity": "sha512-GKMHFfv3458yYy+v/N8gjufHO6MSZKCOXpZc5GXIWWy8uldwfmPn98vp81gZ5f9SVw8YYBctgfJ22a2d7AOMeQ==", + "dev": true, + "dependencies": { + "@types/linkify-it": "*", + "@types/mdurl": "*" + } + }, + "node_modules/klaw": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/klaw/-/klaw-3.0.0.tgz", + "integrity": "sha512-0Fo5oir+O9jnXu5EefYbVK+mHMBeEVEy2cmctR1O1NECcCkPRreJKrS6Qt/j3KC2C148Dfo9i3pCmCMsdqGr0g==", + "dev": true, + "dependencies": { + "graceful-fs": "^4.1.9" + } + }, + "node_modules/linkify-it": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-3.0.3.tgz", + "integrity": "sha512-ynTsyrFSdE5oZ/O9GEf00kPngmOfVwazR5GKDq6EYfhlpFug3J2zybX56a2PRRpc9P+FuSoGNAwjlbDs9jJBPQ==", + "dev": true, + "dependencies": { + "uc.micro": "^1.0.1" + } + }, + "node_modules/lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "dev": true + }, + "node_modules/magic-string": { + "version": "0.30.5", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.5.tgz", + "integrity": "sha512-7xlpfBaQaP/T6Vh8MO/EqXSW5En6INHEvEXQiuff7Gku0PWjU3uf6w/j9o7O+SpB5fOAkrI5HeoNgwjEO0pFsA==", + "dev": true, + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.4.15" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/mark.js": { + "version": "8.11.1", + "resolved": "https://registry.npmjs.org/mark.js/-/mark.js-8.11.1.tgz", + "integrity": "sha512-1I+1qpDt4idfgLQG+BNWmrqku+7/2bi5nLf4YwF8y8zXvmfiTBY3PV3ZibfrjBueCByROpuBjLLFCajqkgYoLQ==", + "dev": true + }, + "node_modules/markdown-it": { + "version": "12.3.2", + "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-12.3.2.tgz", + "integrity": "sha512-TchMembfxfNVpHkbtriWltGWc+m3xszaRD0CZup7GFFhzIgQqxIfn3eGj1yZpfuflzPvfkt611B2Q/Bsk1YnGg==", + "dev": true, + "dependencies": { + "argparse": "^2.0.1", + "entities": "~2.1.0", + "linkify-it": "^3.0.1", + "mdurl": "^1.0.1", + "uc.micro": "^1.0.5" + }, + "bin": { + "markdown-it": "bin/markdown-it.js" + } + }, + "node_modules/markdown-it-anchor": { + "version": "8.6.7", + "resolved": "https://registry.npmjs.org/markdown-it-anchor/-/markdown-it-anchor-8.6.7.tgz", + "integrity": "sha512-FlCHFwNnutLgVTflOYHPW2pPcl2AACqVzExlkGQNsi4CJgqOHN7YTgDd4LuhgN1BFO3TS0vLAruV1Td6dwWPJA==", + "dev": true, + "peerDependencies": { + "@types/markdown-it": "*", + "markdown-it": "*" + } + }, + "node_modules/markdown-it/node_modules/entities": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-2.1.0.tgz", + "integrity": "sha512-hCx1oky9PFrJ611mf0ifBLBRW8lUUVRlFolb5gWRfIELabBlbp9xZvrqZLZAs+NxFnbfQoeGd8wDkygjg7U85w==", + "dev": true, + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } + }, + "node_modules/marked": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/marked/-/marked-4.3.0.tgz", + "integrity": "sha512-PRsaiG84bK+AMvxziE/lCFss8juXjNaWzVbN5tXAm4XjeaS9NAHhop+PjQxz2A9h8Q4M/xGmzP8vqNwy6JeK0A==", + "dev": true, + "bin": { + "marked": "bin/marked.js" + }, + "engines": { + "node": ">= 12" + } + }, + "node_modules/mdast-util-to-hast": { + "version": "13.1.0", + "resolved": "https://registry.npmjs.org/mdast-util-to-hast/-/mdast-util-to-hast-13.1.0.tgz", + "integrity": "sha512-/e2l/6+OdGp/FB+ctrJ9Avz71AN/GRH3oi/3KAx/kMnoUsD6q0woXlDT8lLEeViVKE7oZxE7RXzvO3T8kF2/sA==", + "dev": true, + "dependencies": { + "@types/hast": "^3.0.0", + "@types/mdast": "^4.0.0", + "@ungap/structured-clone": "^1.0.0", + "devlop": "^1.0.0", + "micromark-util-sanitize-uri": "^2.0.0", + "trim-lines": "^3.0.0", + "unist-util-position": "^5.0.0", + "unist-util-visit": "^5.0.0", + "vfile": "^6.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdurl": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/mdurl/-/mdurl-1.0.1.tgz", + "integrity": "sha512-/sKlQJCBYVY9Ers9hqzKou4H6V5UWc/M59TH2dvkt+84itfnq7uFOMLpOiOS4ujvHP4etln18fmIxA5R5fll0g==", + "dev": true + }, + "node_modules/micromark-util-character": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/micromark-util-character/-/micromark-util-character-2.0.1.tgz", + "integrity": "sha512-3wgnrmEAJ4T+mGXAUfMvMAbxU9RDG43XmGce4j6CwPtVxB3vfwXSZ6KhFwDzZ3mZHhmPimMAXg71veiBGzeAZw==", + "dev": true, + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "dependencies": { + "micromark-util-symbol": "^2.0.0", + "micromark-util-types": "^2.0.0" + } + }, + "node_modules/micromark-util-encode": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/micromark-util-encode/-/micromark-util-encode-2.0.0.tgz", + "integrity": "sha512-pS+ROfCXAGLWCOc8egcBvT0kf27GoWMqtdarNfDcjb6YLuV5cM3ioG45Ys2qOVqeqSbjaKg72vU+Wby3eddPsA==", + "dev": true, + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ] + }, + "node_modules/micromark-util-sanitize-uri": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/micromark-util-sanitize-uri/-/micromark-util-sanitize-uri-2.0.0.tgz", + "integrity": "sha512-WhYv5UEcZrbAtlsnPuChHUAsu/iBPOVaEVsntLBIdpibO0ddy8OzavZz3iL2xVvBZOpolujSliP65Kq0/7KIYw==", + "dev": true, + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "dependencies": { + "micromark-util-character": "^2.0.0", + "micromark-util-encode": "^2.0.0", + "micromark-util-symbol": "^2.0.0" + } + }, + "node_modules/micromark-util-symbol": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/micromark-util-symbol/-/micromark-util-symbol-2.0.0.tgz", + "integrity": "sha512-8JZt9ElZ5kyTnO94muPxIGS8oyElRJaiJO8EzV6ZSyGQ1Is8xwl4Q45qU5UOg+bGH4AikWziz0iN4sFLWs8PGw==", + "dev": true, + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ] + }, + "node_modules/micromark-util-types": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/micromark-util-types/-/micromark-util-types-2.0.0.tgz", + "integrity": "sha512-oNh6S2WMHWRZrmutsRmDDfkzKtxF+bc2VxLC9dvtrDIRFln627VsFP6fLMgTryGDljgLPjkrzQSDcPrjPyDJ5w==", + "dev": true, + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ] + }, + "node_modules/minisearch": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/minisearch/-/minisearch-6.3.0.tgz", + "integrity": "sha512-ihFnidEeU8iXzcVHy74dhkxh/dn8Dc08ERl0xwoMMGqp4+LvRSCgicb+zGqWthVokQKvCSxITlh3P08OzdTYCQ==", + "dev": true + }, + "node_modules/mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "dev": true, + "bin": { + "mkdirp": "bin/cmd.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/mrmime": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/mrmime/-/mrmime-1.0.1.tgz", + "integrity": "sha512-hzzEagAgDyoU1Q6yg5uI+AorQgdvMCur3FcKf7NhMKWsaYg+RnbTyHRa/9IlLF9rf455MOCtcqqrQQ83pPP7Uw==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/nanoid": { + "version": "3.3.7", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz", + "integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "node_modules/parse5": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-7.1.2.tgz", + "integrity": "sha512-Czj1WaSVpaoj0wbhMzLmWD69anp2WH7FXMB9n1Sy8/ZFF9jolSQVMu1Ij5WIyGmcBmhk7EOndpO4mIpihVqAXw==", + "dev": true, + "dependencies": { + "entities": "^4.4.0" + }, + "funding": { + "url": "https://github.com/inikulin/parse5?sponsor=1" + } + }, + "node_modules/picocolors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", + "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", + "dev": true + }, + "node_modules/postcss": { + "version": "8.4.33", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.33.tgz", + "integrity": "sha512-Kkpbhhdjw2qQs2O2DGX+8m5OVqEcbB9HRBvuYM9pgrjEFUg30A9LmXNlTAUj4S9kgtGyrMbTzVjH7E+s5Re2yg==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "dependencies": { + "nanoid": "^3.3.7", + "picocolors": "^1.0.0", + "source-map-js": "^1.0.2" + }, + "engines": { + "node": "^10 || ^12 || >=14" + } + }, + "node_modules/preact": { + "version": "10.19.2", + "resolved": "https://registry.npmjs.org/preact/-/preact-10.19.2.tgz", + "integrity": "sha512-UA9DX/OJwv6YwP9Vn7Ti/vF80XL+YA5H2l7BpCtUr3ya8LWHFzpiO5R+N7dN16ujpIxhekRFuOOF82bXX7K/lg==", + "dev": true, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/preact" + } + }, + "node_modules/property-information": { + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/property-information/-/property-information-6.4.0.tgz", + "integrity": "sha512-9t5qARVofg2xQqKtytzt+lZ4d1Qvj8t5B8fEwXK6qOfgRLgH/b13QlgEyDh033NOS31nXeFbYv7CLUDG1CeifQ==", + "dev": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/requizzle": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/requizzle/-/requizzle-0.2.4.tgz", + "integrity": "sha512-JRrFk1D4OQ4SqovXOgdav+K8EAhSB/LJZqCz8tbX0KObcdeM15Ss59ozWMBWmmINMagCwmqn4ZNryUGpBsl6Jw==", + "dev": true, + "dependencies": { + "lodash": "^4.17.21" + } + }, + "node_modules/rollup": { + "version": "4.9.6", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.9.6.tgz", + "integrity": "sha512-05lzkCS2uASX0CiLFybYfVkwNbKZG5NFQ6Go0VWyogFTXXbR039UVsegViTntkk4OglHBdF54ccApXRRuXRbsg==", + "dev": true, + "dependencies": { + "@types/estree": "1.0.5" + }, + "bin": { + "rollup": "dist/bin/rollup" + }, + "engines": { + "node": ">=18.0.0", + "npm": ">=8.0.0" + }, + "optionalDependencies": { + "@rollup/rollup-android-arm-eabi": "4.9.6", + "@rollup/rollup-android-arm64": "4.9.6", + "@rollup/rollup-darwin-arm64": "4.9.6", + "@rollup/rollup-darwin-x64": "4.9.6", + "@rollup/rollup-linux-arm-gnueabihf": "4.9.6", + "@rollup/rollup-linux-arm64-gnu": "4.9.6", + "@rollup/rollup-linux-arm64-musl": "4.9.6", + "@rollup/rollup-linux-riscv64-gnu": "4.9.6", + "@rollup/rollup-linux-x64-gnu": "4.9.6", + "@rollup/rollup-linux-x64-musl": "4.9.6", + "@rollup/rollup-win32-arm64-msvc": "4.9.6", + "@rollup/rollup-win32-ia32-msvc": "4.9.6", + "@rollup/rollup-win32-x64-msvc": "4.9.6", + "fsevents": "~2.3.2" + } + }, + "node_modules/search-insights": { + "version": "2.11.0", + "resolved": "https://registry.npmjs.org/search-insights/-/search-insights-2.11.0.tgz", + "integrity": "sha512-Uin2J8Bpm3xaZi9Y8QibSys6uJOFZ+REMrf42v20AA3FUDUrshKkMEP6liJbMAHCm71wO6ls4mwAf7a3gFVxLw==", + "dev": true, + "peer": true + }, + "node_modules/shikiji": { + "version": "0.7.6", + "resolved": "https://registry.npmjs.org/shikiji/-/shikiji-0.7.6.tgz", + "integrity": "sha512-KzEtvSGQtBvfwVIB70kOmIfl/5rz1LC8j+tvlHXsJKAIdONNQvG1at7ivUUq3xUctqgO6fsO3AGomUSh0F+wsQ==", + "dev": true, + "dependencies": { + "hast-util-to-html": "^9.0.0" + } + }, + "node_modules/shikiji-transformers": { + "version": "0.7.6", + "resolved": "https://registry.npmjs.org/shikiji-transformers/-/shikiji-transformers-0.7.6.tgz", + "integrity": "sha512-yTp+7JMD/aXbV9ndn14eo9IK/UNt8iDsLNyqlOmCtcldlkqWE9T2YKAlOHOTVaeDfYWUWZa2EgSXb/CBfepBrw==", + "dev": true, + "dependencies": { + "shikiji": "0.7.6" + } + }, + "node_modules/source-map-js": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz", + "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/space-separated-tokens": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/space-separated-tokens/-/space-separated-tokens-2.0.2.tgz", + "integrity": "sha512-PEGlAwrG8yXGXRjW32fGbg66JAlOAwbObuqVoJpv/mRgoWDQfgH1wDPvtzWyUSNAXBGSk8h755YDbbcEy3SH2Q==", + "dev": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/stringify-entities": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/stringify-entities/-/stringify-entities-4.0.3.tgz", + "integrity": "sha512-BP9nNHMhhfcMbiuQKCqMjhDP5yBCAxsPu4pHFFzJ6Alo9dZgY4VLDPutXqIjpRiMoKdp7Av85Gr73Q5uH9k7+g==", + "dev": true, + "dependencies": { + "character-entities-html4": "^2.0.0", + "character-entities-legacy": "^3.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/tabbable": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/tabbable/-/tabbable-6.2.0.tgz", + "integrity": "sha512-Cat63mxsVJlzYvN51JmVXIgNoUokrIaT2zLclCXjRd8boZ0004U4KCs/sToJ75C6sdlByWxpYnb5Boif1VSFew==", + "dev": true + }, + "node_modules/trim-lines": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/trim-lines/-/trim-lines-3.0.1.tgz", + "integrity": "sha512-kRj8B+YHZCc9kQYdWfJB2/oUl9rA99qbowYYBtr4ui4mZyAQ2JpvVBd/6U2YloATfqBhBTSMhTpgBHtU0Mf3Rg==", + "dev": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/uc.micro": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-1.0.6.tgz", + "integrity": "sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA==", + "dev": true + }, + "node_modules/underscore": { + "version": "1.13.6", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.13.6.tgz", + "integrity": "sha512-+A5Sja4HP1M08MaXya7p5LvjuM7K6q/2EaC0+iovj/wOcMsTzMvDFbasi/oSapiwOlt252IqsKqPjCl7huKS0A==", + "dev": true + }, + "node_modules/unist-util-is": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-6.0.0.tgz", + "integrity": "sha512-2qCTHimwdxLfz+YzdGfkqNlH0tLi9xjTnHddPmJwtIG9MGsdbutfTc4P+haPD7l7Cjxf/WZj+we5qfVPvvxfYw==", + "dev": true, + "dependencies": { + "@types/unist": "^3.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/unist-util-position": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/unist-util-position/-/unist-util-position-5.0.0.tgz", + "integrity": "sha512-fucsC7HjXvkB5R3kTCO7kUjRdrS0BJt3M/FPxmHMBOm8JQi2BsHAHFsy27E0EolP8rp0NzXsJ+jNPyDWvOJZPA==", + "dev": true, + "dependencies": { + "@types/unist": "^3.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/unist-util-stringify-position": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-4.0.0.tgz", + "integrity": "sha512-0ASV06AAoKCDkS2+xw5RXJywruurpbC4JZSm7nr7MOt1ojAzvyyaO+UxZf18j8FCF6kmzCZKcAgN/yu2gm2XgQ==", + "dev": true, + "dependencies": { + "@types/unist": "^3.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/unist-util-visit": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-5.0.0.tgz", + "integrity": "sha512-MR04uvD+07cwl/yhVuVWAtw+3GOR/knlL55Nd/wAdblk27GCVt3lqpTivy/tkJcZoNPzTwS1Y+KMojlLDhoTzg==", + "dev": true, + "dependencies": { + "@types/unist": "^3.0.0", + "unist-util-is": "^6.0.0", + "unist-util-visit-parents": "^6.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/unist-util-visit-parents": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-6.0.1.tgz", + "integrity": "sha512-L/PqWzfTP9lzzEa6CKs0k2nARxTdZduw3zyh8d2NVBnsyvHjSX4TWse388YrrQKbvI8w20fGjGlhgT96WwKykw==", + "dev": true, + "dependencies": { + "@types/unist": "^3.0.0", + "unist-util-is": "^6.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/vfile": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/vfile/-/vfile-6.0.1.tgz", + "integrity": "sha512-1bYqc7pt6NIADBJ98UiG0Bn/CHIVOoZ/IyEkqIruLg0mE1BKzkOXY2D6CSqQIcKqgadppE5lrxgWXJmXd7zZJw==", + "dev": true, + "dependencies": { + "@types/unist": "^3.0.0", + "unist-util-stringify-position": "^4.0.0", + "vfile-message": "^4.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/vfile-location": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/vfile-location/-/vfile-location-5.0.2.tgz", + "integrity": "sha512-NXPYyxyBSH7zB5U6+3uDdd6Nybz6o6/od9rk8bp9H8GR3L+cm/fC0uUTbqBmUTnMCUDslAGBOIKNfvvb+gGlDg==", + "dev": true, + "dependencies": { + "@types/unist": "^3.0.0", + "vfile": "^6.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/vfile-message": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/vfile-message/-/vfile-message-4.0.2.tgz", + "integrity": "sha512-jRDZ1IMLttGj41KcZvlrYAaI3CfqpLpfpf+Mfig13viT6NKvRzWZ+lXz0Y5D60w6uJIBAOGq9mSHf0gktF0duw==", + "dev": true, + "dependencies": { + "@types/unist": "^3.0.0", + "unist-util-stringify-position": "^4.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/vite": { + "version": "5.0.12", + "resolved": "https://registry.npmjs.org/vite/-/vite-5.0.12.tgz", + "integrity": "sha512-4hsnEkG3q0N4Tzf1+t6NdN9dg/L3BM+q8SWgbSPnJvrgH2kgdyzfVJwbR1ic69/4uMJJ/3dqDZZE5/WwqW8U1w==", + "dev": true, + "dependencies": { + "esbuild": "^0.19.3", + "postcss": "^8.4.32", + "rollup": "^4.2.0" + }, + "bin": { + "vite": "bin/vite.js" + }, + "engines": { + "node": "^18.0.0 || >=20.0.0" + }, + "funding": { + "url": "https://github.com/vitejs/vite?sponsor=1" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + }, + "peerDependencies": { + "@types/node": "^18.0.0 || >=20.0.0", + "less": "*", + "lightningcss": "^1.21.0", + "sass": "*", + "stylus": "*", + "sugarss": "*", + "terser": "^5.4.0" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "less": { + "optional": true + }, + "lightningcss": { + "optional": true + }, + "sass": { + "optional": true + }, + "stylus": { + "optional": true + }, + "sugarss": { + "optional": true + }, + "terser": { + "optional": true + } + } + }, + "node_modules/vitepress": { + "version": "1.0.0-rc.31", + "resolved": "https://registry.npmjs.org/vitepress/-/vitepress-1.0.0-rc.31.tgz", + "integrity": "sha512-ikH9pIjOOAbyoYAGBVfTz8TzuXp+UoWaIRMU4bw/oiTg8R65SbAaGKY84xx6TuL+f4VqUJ8lhzW82YyxSLvstA==", + "dev": true, + "dependencies": { + "@docsearch/css": "^3.5.2", + "@docsearch/js": "^3.5.2", + "@types/markdown-it": "^13.0.7", + "@vitejs/plugin-vue": "^4.5.0", + "@vue/devtools-api": "^6.5.1", + "@vueuse/core": "^10.6.1", + "@vueuse/integrations": "^10.6.1", + "focus-trap": "^7.5.4", + "mark.js": "8.11.1", + "minisearch": "^6.3.0", + "mrmime": "^1.0.1", + "shikiji": "^0.7.4", + "shikiji-transformers": "^0.7.4", + "vite": "^5.0.2", + "vue": "^3.3.8" + }, + "bin": { + "vitepress": "bin/vitepress.js" + }, + "peerDependencies": { + "markdown-it-mathjax3": "^4.3.2", + "postcss": "^8.4.31" + }, + "peerDependenciesMeta": { + "markdown-it-mathjax3": { + "optional": true + }, + "postcss": { + "optional": true + } + } + }, + "node_modules/vue": { + "version": "3.4.15", + "resolved": "https://registry.npmjs.org/vue/-/vue-3.4.15.tgz", + "integrity": "sha512-jC0GH4KkWLWJOEQjOpkqU1bQsBwf4R1rsFtw5GQJbjHVKWDzO6P0nWWBTmjp1xSemAioDFj1jdaK1qa3DnMQoQ==", + "dev": true, + "dependencies": { + "@vue/compiler-dom": "3.4.15", + "@vue/compiler-sfc": "3.4.15", + "@vue/runtime-dom": "3.4.15", + "@vue/server-renderer": "3.4.15", + "@vue/shared": "3.4.15" + }, + "peerDependencies": { + "typescript": "*" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/vue-collapsed": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/vue-collapsed/-/vue-collapsed-1.3.0.tgz", + "integrity": "sha512-d2qwv0fj4aaoekI+6x1RgxpoK0s5K8HLj70E+dWxIKkgzADcZ9kUrnXRazgIz9ETYkKOi6j2CWv/8+rS8Kr3LQ==" + }, + "node_modules/web-namespaces": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/web-namespaces/-/web-namespaces-2.0.1.tgz", + "integrity": "sha512-bKr1DkiNa2krS7qxNtdrtHAmzuYGFQLiQ13TsorsdT6ULTkPLKuu5+GsFpDlg6JFjUTwX2DyhMPG2be8uPrqsQ==", + "dev": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/xmlcreate": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/xmlcreate/-/xmlcreate-2.0.4.tgz", + "integrity": "sha512-nquOebG4sngPmGPICTS5EnxqhKbCmz5Ox5hsszI2T6U5qdrJizBc+0ilYSEjTSzU0yZcmvppztXe/5Al5fUwdg==", + "dev": true + }, + "node_modules/zwitch": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/zwitch/-/zwitch-2.0.4.tgz", + "integrity": "sha512-bXE4cR/kVZhKZX/RjPEflHaKVhUVl85noU3v6b8apfQEc1x4A+zBxjZ4lN8LqGd6WZ3dl98pY4o717VFmoPp+A==", + "dev": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + } + } +} diff --git a/v3-docs/docs/package.json b/v3-docs/docs/package.json new file mode 100644 index 0000000000..0f348bd8d3 --- /dev/null +++ b/v3-docs/docs/package.json @@ -0,0 +1,18 @@ +{ + "scripts": { + "generate-jsdoc": "jsdoc/jsdoc.sh", + "codegen": "jsdoc/jsdoc.sh && node ./generators/codegen.js", + "docs:dev": "npm run codegen && vitepress dev", + "docs:build": "npm run codegen && vitepress build", + "docs:preview": "vitepress preview", + "deploy:preview": "npm run docs:build && npm run docs:preview" + }, + "devDependencies": { + "canonical-json": "^0.0.4", + "jsdoc": "^4.0.2", + "vitepress": "1.0.0-rc.31" + }, + "dependencies": { + "vue-collapsed": "^1.3.0" + } +} diff --git a/v3-docs/docs/packages/accounts-2fa.md b/v3-docs/docs/packages/accounts-2fa.md new file mode 100644 index 0000000000..627ace8766 --- /dev/null +++ b/v3-docs/docs/packages/accounts-2fa.md @@ -0,0 +1,222 @@ +# accounts-2fa + +This package allows you to provide a way for your users to enable 2FA on their accounts, using an authenticator app such as Google Authenticator, or 1Password. When the user is logged in on your app, they will be able to generate a new QR code and read this code on the app they prefer. After that, they'll start receiving their codes. Then, they can finish enabling 2FA on your app, and every time they try to log in to your app, you can redirect them to a place where they can provide a code they received from the authenticator. + +To provide codes that are exactly compatible with all other Authenticator apps and services that implements TOTP, this package uses [node-2fa](https://www.npmjs.com/package/node-2fa) which works on top of [notp](https://github.com/guyht/notp), **that** implements TOTP ([RFC 6238](https://www.ietf.org/rfc/rfc6238.txt)) (the Authenticator standard), which is based on HOTP ([RFC 4226](https://www.ietf.org/rfc/rfc4226.txt)). + +> This package is meant to be used with [`accounts-password`](../api/accounts.md#passwords) or [`accounts-passwordless`](./accounts-passwordless.md), so if you don't have either of those in your project, you'll need to add one of them. In the future, we want to enable the use of this package with other login methods, our oauth methods (Google, GitHub, etc...). + +## 2FA Activation Flow {#activating-2fa} + +The first step, in order to enable 2FA, is to generate a QR code so that the user can scan it in an authenticator app and start receiving codes. + + + +Receives an `appName` which is the name of your app that will show up when the user scans the QR code. Also, a callback called, on success, with a QR code in SVG format, a QR secret, and the URI that can be used to activate the 2FA in an authenticator app, +or a single `Error` argument on failure. + +On success, this function will also add an object to the logged user's services object containing the QR secret: + +```js +services: { + ... + twoFactorAuthentication: { + secret: "***" + } +} +``` + +Here it's an example on how to call this function: + +```js +import { Buffer } from "buffer"; +import { Accounts } from 'meteor/accounts-base'; + + +// component +const [qrCode, setQrCode] = useState(null); + + + +``` + +This method can fail throwing the following error: + +- "The 2FA is activated. You need to disable the 2FA first before trying to generate a new activation code [2fa-activated]" if trying to generate an activation when the user already have 2FA enabled. + +At this point, the 2FA won't be activated just yet. Now that the user has access to the codes generated by their authenticator app, you can call the function `Accounts.enableUser2fa`: + + + +It should be called with a code that the users will receive from the authenticator app once they read the QR code. The callback is called with a single `Error` argument on failure. If the code provided is correct, a `type` will be added to the user's `twoFactorAuthentication` object and now 2FA is considered enabled: + +```js +services: { + ... + twoFactorAuthentication: { + type: "otp", + secret: "***", + } +} +``` + +To verify whether or not a user has 2FA enabled, you can call the function `Accounts.has2faEnabled`: + + + +This function must be called when the user is logged in. + + +## Disabling 2FA {#disabling-2fa} + +To disable 2FA for a user use this method: + + + +To call this function the user must be already logged in. + +## Log in with 2FA {#log-in-with-2fa} + +Now that you have a way to allow your users to enable 2FA on their accounts, you can create a login flow based on that. + +As said at the beginning of this guide, this package is currently working with two other packages: `accounts-password` and `accounts-passwordless`. Below there is an explanation on how to use this package with them. + + +## Working with accounts-password {#working-with-accounts-password} + +When calling the function `Meteor.loginWithPassword`, if the 2FA is enabled for the user, an error will be returned to the callback, so you can redirect the user to a place where they can provide a code. + +As an example: + +```js + +``` + +If the 2FA is not enabled, the user will be logged in normally. + +The function you will need to call now to allow the user to login is `Meteor.loginWithPasswordAnd2faCode`: + + + +Now you will be able to receive a code from the user and this function will verify if the code is valid. If it is, the user will be logged in. + +So the call of this function should look something like this: + +```js + +``` + +This method can fail throwing one of the following errors: + +- "2FA code must be informed [no-2fa-code]" if a 2FA code was not provided. +- "Invalid 2FA code [invalid-2fa-code]" if the provided 2FA code is invalid. + + +## Working with accounts-passwordless {#working-with-accounts-passwordless} + +Following the same logic from the previous package, if the 2FA is enabled, an error will be returned to the callback of the function +[`Meteor.passwordlessLoginWithToken`](./accounts-passwordless.md#Meteor-passwordlessLoginWithToken), + then you can redirect the user to a place where they can provide a code. + +Here is an example: + +```js + +``` + +Now you can call the function `Meteor.passwordlessLoginWithTokenAnd2faCode` that will allow you to provide a selector, token, and 2FA code: + + + +This method can fail throwing one of the following errors: + +- "2FA code must be informed [no-2fa-code]" if a 2FA code was not provided. +- "Invalid 2FA code [invalid-2fa-code]" if the provided 2FA code is invalid. + +## Integrating an Authentication Package with accounts-2fa {#integrating-auth-package} + +To integrate this package with any other existing Login method, it's necessary following two steps: + +1 - For the client, create a new method from your current login method. So for example, from the method `Meteor.loginWithPassword` we created a new one called `Meteor.loginWithPasswordAnd2faCode`, and the only difference between them is that the latest one receives one additional parameter, the 2FA code, but we call the same function on the server side. + +2 - For the server, inside the function that will log the user in, you verify if the function `Accounts._check2faEnabled` exists, and if yes, you call it providing the user object you want to check if the 2FA is enabled, and if either of these statements are false, you proceed with the login flow. This function exists only when the package `accounts-2fa` is added to the project. + +If both statements are true, and the login validation succeeds, you verify if a code was provided: if not, throw an error; if it was provided, verify if the code is valid by calling the function `Accounts._isTokenValid`. if `Accounts._isTokenValid` returns false, throw an error. + +Here it's an example: + +```js +const result = validateLogin(); +if (!result.error && Accounts._check2faEnabled?.(user)) { + if (!code) { + Accounts._handleError("2FA code must be informed."); + } + if ( + !Accounts._isTokenValid(user.services.twoFactorAuthentication.secret, code) + ) { + Accounts._handleError("Invalid 2FA code."); + } +} + +return result; +``` diff --git a/v3-docs/docs/packages/accounts-passwordless.md b/v3-docs/docs/packages/accounts-passwordless.md new file mode 100644 index 0000000000..938b00e033 --- /dev/null +++ b/v3-docs/docs/packages/accounts-passwordless.md @@ -0,0 +1,39 @@ +# Passwordless + +Passwordless package allows you to create a login for users without the need for user to provide password. Upon registering or login an email is sent to the user's email with a code to enter to confirm login and a link to login directly. Since the user is responding to the email it will also verify the email. + +The first step to in the passwordless process is for the user to sign-up or request a token to their email address. You can do that with the following: + + +If the user is signing up you can pass in the `userData` object like in [Accounts.createUser](/api/accounts#Accounts-createUser). + + +The second step in the passwordless flow. Like all the other `loginWith` functions call this method to login the user with the token they have inputted. + + +Use this function if you want to manually send the email to users to login with token from the server. Do note that you will need to create the token/sequence and save it in the DB yourself. This is good if you want to change how the tokens look or are generated, but unless you are sure of what you are doing we don't recommend it. + +

Settings Options

+ +You can use the function `Accounts.config` in the server to change some settings on this package: + +- **tokenSequenceLength**: use `Accounts.config({tokenSequenceLength: _Number_})` to the size of the token sequence generated. The default is 6. + +- **loginTokenExpirationHours**: use `Accounts.config({loginTokenExpirationHours: _Number_})` to set the amount of time a token sent is valid. As it's just a number, you can use, for example, 0.5 to make the token valid for just half hour. The default is 1 hour. + +

E-mail templates

+ +`accounts-passwordless` brings new templates that you can edit to change the look of emails which send code to users. The email template is named `sendLoginToken` and beside `user` and `url`, the templates also receive a data object with `sequence` which is the user's code. + +```javascript +sendLoginToken: { + text: (user, url, { sequence }) => { + /* text template */ + }; +} +``` + +

Enable 2FA for this package

+ +You can add 2FA to your login flow by using the package [accounts-2fa](./accounts-2fa.md). +You can find an example showing how this would look like [here](./accounts-2fa.md#working-with-accounts-passwordless). diff --git a/v3-docs/docs/packages/accounts-ui.md b/v3-docs/docs/packages/accounts-ui.md new file mode 100644 index 0000000000..c7246efcb6 --- /dev/null +++ b/v3-docs/docs/packages/accounts-ui.md @@ -0,0 +1,29 @@ +# accounts-ui + +A turn-key user interface for Meteor Accounts. + +To add Accounts and a set of login controls to an application, add the +`accounts-ui` package and at least one login provider package: +`accounts-password`, `accounts-facebook`, `accounts-github`, +`accounts-google`, `accounts-twitter`, or `accounts-weibo`. + +Then simply add the `{{> loginButtons}}` helper to an HTML file. This +will place a login widget on the page. If there is only one provider configured +and it is an external service, this will add a login/logout button. If you use +`accounts-password` or use multiple external login services, this will add +a "Sign in" link which opens a dropdown menu with login options. If you plan to +position the login dropdown in the right edge of the screen, use +`{{> loginButtons align="right"}}` in order to get the dropdown to lay +itself out without expanding off the edge of the screen. + +To configure the behavior of `{{> loginButtons}}`, use +[`Accounts.ui.config`](../api/accounts.md#loggingIn). + +`accounts-ui` also includes modal popup dialogs to handle links from +[`sendResetPasswordEmail`](../api/accounts.md#Accounts-sendResetPasswordEmail), +[`sendVerificationEmail`](../api/accounts.md#Accounts-sendVerificationEmail), +and [`sendEnrollmentEmail`](../api/accounts.md#Accounts-sendEnrollmentEmail). These +do not have to be manually placed in HTML: they are automatically activated +when the URLs are loaded. + +If you want to control the look and feel of your accounts system a little more, we recommend reading the [useraccounts](http://guide.meteor.com/accounts.html#useraccounts) section of the Meteor Guide. diff --git a/v3-docs/docs/packages/appcache.md b/v3-docs/docs/packages/appcache.md new file mode 100644 index 0000000000..3b4b572355 --- /dev/null +++ b/v3-docs/docs/packages/appcache.md @@ -0,0 +1,111 @@ +# AppCache + +> This package has been deprecated since [applicationCache](https://developer.mozilla.org/en-US/docs/Web/API/Window/applicationCache), which this package relies on, has been deprecated and is not available on the latest browsers. Plaese consider using [Service Worker](https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API) as an replacement. + +The `appcache` package stores the static parts of a Meteor application +(the client side Javascript, HTML, CSS, and images) in the browser's +[application cache](https://en.wikipedia.org/wiki/AppCache). To enable +caching simply add the `appcache` package to your project. + +* Once a user has visited a Meteor application for the first time and + the application has been cached, on subsequent visits the web page + loads faster because the browser can load the application out of the + cache without contacting the server first. + +* Hot code pushes are loaded by the browser in the background while the + app continues to run. Once the new code has been fully loaded the + browser is able to switch over to the new code quickly. + +* The application cache allows the application to be loaded even when + the browser doesn't have an Internet connection, and so enables using + the app offline. + +(Note however that the `appcache` package by itself doesn't make +*data* available offline: in an application loaded offline, a Meteor +Collection will appear to be empty in the client until the Internet +becomes available and the browser is able to establish a DDP +connection). + +To turn AppCache off for specific browsers use: + +```js +Meteor.AppCache.config({ + chrome: false, + firefox: false +}); +``` + +The supported browsers that can be enabled or disabled include, but are +not limited to, `android`, `chrome`, `chromium`, `chromeMobileIOS`, +`firefox`, `ie`, `mobileSafari` and `safari`. + +Browsers limit the amount of data they will put in the application +cache, which can vary due to factors such as how much disk space is +free. Unfortunately if your application goes over the limit rather +than disabling the application cache altogether and running the +application online, the browser will instead fail that particular +*update* of the cache, leaving your users running old code. + +Thus it's best to keep the size of the cache below 5MB. The +`appcache` package will print a warning on the Meteor server console +if the total size of the resources being cached is over 5MB. + +Starting from `appcache@1.2.5`, if you need more advanced logic +to enable/disable the cache, you can use the `enableCallback` option +that is evaluated on a per-request basis. For example: + +```js +// Enable offline mode using a value from database and certificate validation +Meteor.AppCache.config({ + // This option is available starting from appcache@1.2.4 + enableCallback: () => { + if (!getSettingsFromDb("public.appcache_enabled")) { + return false; + } + + const validation = validateClientCert({ + clientCertPayload: req.headers["x-client-cert"], + url: req.url.href, + }); + + return validation.passed; + }, +}); +``` + +If you have files too large to fit in the cache you can disable +caching by URL prefix. For example, + +```js +Meteor.AppCache.config({ onlineOnly: ['/online/'] }); +``` + +causes files in your `public/online` directory to not be cached, and +so they will only be available online. You can then move your large +files into that directory and refer to them at the new URL: + +```html + +``` + +If you'd prefer not to move your files, you can use the file names +themselves as the URL prefix: + +```js +Meteor.AppCache.config({ + onlineOnly: [ + '/bigimage.jpg', + '/largedata.json' + ] +}); +``` + +though keep in mind that since the exclusion is by prefix (this is a +limitation of the application cache manifest), excluding +`/largedata.json` will also exclude such URLs as +`/largedata.json.orig` and `/largedata.json/file1`. + +For more information about how Meteor interacts with the application +cache, see the +[AppCache page](https://github.com/meteor/meteor/wiki/AppCache) +in the Meteor wiki. diff --git a/v3-docs/docs/packages/audit-argument-checks.md b/v3-docs/docs/packages/audit-argument-checks.md new file mode 100644 index 0000000000..5b97b256d2 --- /dev/null +++ b/v3-docs/docs/packages/audit-argument-checks.md @@ -0,0 +1,13 @@ +# Audit Argument Checks + + +This package causes Meteor to require that all arguments passed to methods and +publish functions are [checked](../api/check.md). Any method that does not pass each +one of its arguments to `check` will throw an error, which will be logged on the +server and which will appear to the client as a +`500 Internal server error`. This is a simple way to help ensure that your +app has complete check coverage. + +Methods and publish functions that do not need to validate their arguments can +simply run `check(arguments, [Match.Any])` to satisfy the +`audit-argument-checks` coverage checker. diff --git a/v3-docs/docs/packages/autoupdate.md b/v3-docs/docs/packages/autoupdate.md new file mode 100644 index 0000000000..a54575e506 --- /dev/null +++ b/v3-docs/docs/packages/autoupdate.md @@ -0,0 +1,62 @@ +# Autoupdate + +This is the Meteor package that provides hot code push (HCP) functionality. + +Every Meteor application that wasn't created with the `--minimal` option +has this package already through `meteor-base` and HCP should work out of the +box. For those running `--minimal` applications and want to benefit from this +package, just add it with `meteor add autoupdate`. + +> `autoupdate` adds up to 30KB on your client's production bundle. + +With this package Meteor will use DDP to publish a collection called +_'meteor_autoupdate_clientVersions'_. This collection will be subscribed by the +user's client and every time the client identifies a change in the published +version it will refresh itself. + +## Browser Client + +The refresh will happen in the browser in two different ways: a _soft update_, +and a _hard update_. If Meteor identifies that only stylesheets were changed, then it +will verify if the user's browser is capable of reloading CSS on the fly, and a +soft update will take place. The soft update will replace the old stylesheet +with the new stylesheet without triggering a full page reload. + +In cases where a change in a server's or client's compiled file happens, the hard +update will take place: Meteor will force a complete browser reload using the +`reload` package. + +> Among other things, the `reload` package tries do reload the application +> preserving some unchanged cached files. + +## Cordova Client + +There is no soft update with Cordova apps, the client is always fully refreshed +once a change is detected. + +### `usesCleartextTraffic` +Starting with Android 9 (API level 28), [cleartext support is disabled](https://developer.android.com/training/articles/security-config) by default. +During development `autoupdate` uses cleartext to publish new client versions. +If your app targets Android 9 or greater, it will be necessary to create a +`mobile-config.js` file enabling the use of cleartext in order to have HCP working: + +```js +App.appendToConfig(` + + +`); +``` + +### `--mobile-server` +Additionally, for the HCP functionality to work it is also mandatory to provide +the address for the application server with `--mobile-server` option. If you're +testing your app on an emulator you should run it with `meteor run android --mobile-server 10.0.2.2:3000`. +If you're running it on a real device, the application server and the device +should be on the same network, and you should run your app with `meteor run android --mobile-server XXX.XXX.XXX.XXX` +where *XXX.XXX.XXX.XXX* is your local development address, _e.g. 192.168.1.4_. + +> To have a better understanding of how HCP works for mobile apps already +> published to production refer to [Hot code push on mobile](https://guide.meteor.com/cordova.html#hot-code-push) diff --git a/v3-docs/docs/packages/browser-policy.md b/v3-docs/docs/packages/browser-policy.md new file mode 100644 index 0000000000..248c49fe7c --- /dev/null +++ b/v3-docs/docs/packages/browser-policy.md @@ -0,0 +1,175 @@ +# Browser Policy + +The `browser-policy` family of packages, part of +[Webapp](https://github.com/meteor/meteor/tree/master/packages/webapp), lets you +set security-related policies that will be enforced by newer browsers. These +policies help you prevent and mitigate common attacks like cross-site scripting +and clickjacking. + +## Details + +When you add `browser-policy` to your app, you get default configurations for +the HTTP headers X-Frame-Options and Content-Security-Policy. X-Frame-Options +tells the browser which websites are allowed to frame your app. You should only +let trusted websites frame your app, because malicious sites could harm your +users with [clickjacking attacks](https://www.owasp.org/index.php/Clickjacking). +[Content-Security-Policy](https://developer.mozilla.org/en-US/docs/Security/CSP/Introducing_Content_Security_Policy) +tells the browser where your app can load content from, which encourages safe +practices and mitigates the damage of a cross-site-scripting attack. +`browser-policy` also provides functions for you to configure these policies if +the defaults are not suitable. + +If you only want to use Content-Security-Policy or X-Frame-Options but not both, +you can add the individual packages `browser-policy-content` or +`browser-policy-framing` instead of `browser-policy`. + +For most apps, we recommend that you take the following steps: + +- Add `browser-policy` to your app to enable a starter policy. With this starter + policy, your app's client code will be able to load content (images, scripts, + fonts, etc.) only from its own origin, except that XMLHttpRequests and WebSocket + connections can go to any origin. Further, your app's client code will not be + able to use functions such as `eval()` that convert strings to code. Users' + browsers will only let your app be framed by web pages on the same origin as + your app. +- You can use the functions described below to customize the policies. If your + app does not need any inline Javascript such as inline ` + + +``` + +```javascript [index.js] +/* global WebApp Assets */ +import crypto from "crypto"; +import express from "express"; + +const router = express.Router(); + +router.get("/", function (req, res, next) { + const buf = Assets.getText("index.html"); + + if (buf.length > 0) { + const eTag = crypto.createHash("md5").update(buf).digest("hex"); + + if (req.headers["if-none-match"] === eTag) { + res.writeHead(304, "Not Modified"); + return res.end(); + } + + res.writeHead(200, { + ETag: eTag, + "Content-Type": "text/html", + }); + + return res.end(buf); + } + + return res.end("Index page not found!"); +}); + +WebApp.handlers.use(router); + +``` + +::: +There are a couple things to think about with this approach. + +We're reading the contents of index.html using the [Assets](../api/assets.md) module that makes it really easy to read files out of the _private_ root folder. + +We're using the [connect-route](https://www.npmjs.com/package/connect-route) NPM package to simplify WebApp route processing. But you can use any package you want to understand what is being requested. + +And finally, if you decide to use this technique you'll want to make sure you understand how conflicting client side routing will affect user experience. + +### Dynamic Runtime Configuration + +In some cases it is valuable to be able to control the **meteor_runtime_config** variable that initializes Meteor at runtime. + +#### Example + +There are occasions when a single Meteor server would like to serve multiple cordova applications that each have a unique `ROOT_URL`. But there are 2 problems: + +1. The Meteor server can only be configured to serve a single `ROOT_URL`. +2. The `cordova` applications are build time configured with a specific `ROOT_URL`. + +These 2 conditions break `autoupdate` for the cordova applications. `cordova-plugin-meteor-webapp` will fail the update if the `ROOT_URL` from the server does not match the build time configured `ROOT_URL` of the cordova application. + +To remedy this problem `webapp` has a hook for dynamically configuring `__meteor_runtime_config__` on the server. + +#### Dynamic Runtime Configuration Hook + +```js +WebApp.addRuntimeConfigHook( + ({ arch, request, encodedCurrentConfig, updated }) => { + // check the request to see if this is a request that requires + // modifying the runtime configuration + if (request.headers.domain === "calling.domain") { + // make changes to the config for this domain + // decode the current runtime config string into an object + const config = WebApp.decodeRuntimeConfig(current); + // make your changes + config.newVar = "some value"; + config.oldVar = "new value"; + // encode the modified object to the runtime config string + // and return it + return WebApp.encodeRuntimeConfig(config); + } + // Not modifying other domains so return undefined + return undefined; + } +); +``` + + + + +Additionally, 2 helper functions are available to decode the runtime config string and encode the runtime config object. + + + + +### Updated Runtime Configuration Hook + +```js +const autoupdateCache; +// Get a notification when the runtime configuration is updated +// for each arch +WebApp.addUpdatedNotifyHook(({arch, manifest, runtimeConfig}) => { + // Example, see if runtimeConfig.autoupdate has changed and if so + // do something + if(!_.isEqual(autoupdateCache, runtimeConfig.autoupdate)) { + autoupdateCache = runtimeConfig.autoupdate; + // do something... + } +}) +``` + + + + diff --git a/v3-docs/docs/public/logo.png b/v3-docs/docs/public/logo.png new file mode 100644 index 0000000000..c333537981 Binary files /dev/null and b/v3-docs/docs/public/logo.png differ diff --git a/v3-docs/docs/public/meteor-blue.png b/v3-docs/docs/public/meteor-blue.png new file mode 100644 index 0000000000..c91f7a9718 Binary files /dev/null and b/v3-docs/docs/public/meteor-blue.png differ diff --git a/v3-docs/docs/public/meteor-logo.png b/v3-docs/docs/public/meteor-logo.png new file mode 100644 index 0000000000..ca7bb89de5 Binary files /dev/null and b/v3-docs/docs/public/meteor-logo.png differ diff --git a/v3-docs/docs/public/meteor.png b/v3-docs/docs/public/meteor.png new file mode 100644 index 0000000000..5ccc82d138 Binary files /dev/null and b/v3-docs/docs/public/meteor.png differ diff --git a/v3-docs/docs/public/openssl-suport-table.png b/v3-docs/docs/public/openssl-suport-table.png new file mode 100644 index 0000000000..97a6bb11dc Binary files /dev/null and b/v3-docs/docs/public/openssl-suport-table.png differ diff --git a/v3-docs/docs/troubleshooting/expired-certificate.md b/v3-docs/docs/troubleshooting/expired-certificate.md new file mode 100644 index 0000000000..5678a59e04 --- /dev/null +++ b/v3-docs/docs/troubleshooting/expired-certificate.md @@ -0,0 +1,87 @@ + +# Expired Certificates +Troubleshooting Expired Certificates Issues + + + +Let's Encrypt Root Certificate expired on September 30th and this change is causing some issues. We explain the possible problems below and also how to solve them. + +This is not an issue with Meteor or Galaxy, but a natural process if you are using Let's Encrypt's generated certificates. + + +## Can't run Meteor commands {#commands} + +Galaxy and all Meteor servers uses Let's Encrypt, which announced a change in May in this [post](https://letsencrypt.org/docs/dst-root-ca-x3-expiration-september-2021) about DST Root CA X3 expiring on September 30, 2021. + +Older versions of Meteor, more specifically anything older than Meteor v1.9 shipped with a Node.JS version below v10, which used OpenSSL < 1.0.2. + + +![](/openssl-suport-table.png) + + +If you are getting errors like Connection error (certificate has expired) when running Meteor commands it means that you are running a version of Meteor older than v1.9. + +A workaround, for now, is to run all the meteor commands with the following environment variable ***NODE_TLS_REJECT_UNAUTHORIZED***, for example in the deploy command: + +```bash +NODE_TLS_REJECT_UNAUTHORIZED=0 meteor deploy +``` + +Also note that if you are running old distributions, like Ubuntu 16 and before, locally, or in any of your CI pipelines you may also face this issue. In this case, we do recommend updating your distribution, or your local repository of root certificates (the how-to of this varies based on your distribution). + +This is not a Meteor or Galaxy issue, but it's a change in the Let's Encrypt certificate in our resources that you are accessing. + + +## Requests failing {#server-requests} + +If your server is accessing external resources where the target host is using Let's Encrypt certificates and your app is running an old Meteor version, you will also need to add `NODE_TLS_REJECT_UNAUTHORIZED` to your server environment variables. + +If you are using Galaxy, it's as simple as adding this to your settings file: + +```json +{ + "galaxy.meteor.com": { + "env": { + "NODE_TLS_REJECT_UNAUTHORIZED": "0" + } + } +} +``` + +***Please note:*** We don't recommend continued use of this workaround, as any SSL certificate is going to be authorized and you are exposing your application to serious security issues. The best option is to update Meteor to latest version, or at least Meteor 1.9 as it is the first using Node.js 12. + +You can check our list of supported Meteor versions [here](https://github.com/meteor/meteor/blob/devel/SECURITY.md#supported-versions). If your applications is not in one of them, you should migrate as soon as possible. + +This is not a Meteor or Galaxy issue, but it's a change in the Let's Encrypt certificate in the external resource that you are accessing. + + +## Client Compatibility {#client-compatibility} + +As stated before, Galaxy issues Let's Encrypt certificates automatically for all clients. This is source of confusion, as if you are depending on older clients being able to access your website, this won't work. + +If Let's encrypt certificates are not good for your clients you would need to acquire other certificate from a different provider and upload your custom certificate into Galaxy. + +You can also generate a Let's Encrypt certificate manually and upload to Galaxy, but specifying an alternative preferred chain on certbot: + +``` +sudo certbot certonly --manual --preferred-chain "ISRG Root X1" --preferred-challenges dns +``` + +More info can be obtained [here](https://letsencrypt.org/certificates). + +If you are using Galaxy, you need to follow the requirements and steps [here](https://galaxy-guide.meteor.com/encryption.html#Custom%20certificate) after generating the certificate. Galaxy only accepts custom certs in `.pem` format, the same as nginx uses. + +This is not a Meteor or Galaxy issue, but it's a change in the Let's Encrypt certificate you are using. + + +## Clients Known to be not working {#clients-not-working} + +Here is a succinct list of known to be not working clients: + +- Mac OS X prior to 10.12.1. Any browser, except firefox that bundles root chains, won't work. +- Node.JS HTTP requests prior to v10. This includes any Meteor version prior to 1.9(except). +- Any client using OpenSSL 1.0.2 and before. + +Please note that this is not an exhaustive list, but based on our reports and experience. + +This is not a Meteor or Galaxy issue, but it's a change in the Let's Encrypt certificate you are using. diff --git a/v3-docs/docs/troubleshooting/known-issues.md b/v3-docs/docs/troubleshooting/known-issues.md new file mode 100644 index 0000000000..f533d80a76 --- /dev/null +++ b/v3-docs/docs/troubleshooting/known-issues.md @@ -0,0 +1,39 @@ + +# Known issues in 2.13 + +Troubleshooting in Meteor 2.13 + +## Cannot extract version of meteor tool {#cannot-extract-meteor-tool} + + +For some users, the `meteor update` to version 2.13 command may fail with the following error or similar: + +```shell +Error: incorrect data check + at Zlib.zlibOnError [as onerror] (zlib.js:187:17) + => awaited here: + ... + at /tools/cli/main.js:1165:7 { + errno: -3, + code: 'Z_DATA_ERROR' + } + +``` + +## The issue {#the-issue} + +It seems related to [our first ESM version of Node.js v14.21.4](https://github.com/meteor/node-v14-esm) and the `zlib` package. +We have been able to reproduce this issue only in Mac Intel. + +You can follow along with the [GitHub issue](https://github.com/meteor/meteor/issues/12731) for updates. + +## Solution {#solution} + +The solution for this issue is running the following command in your terminal: + +```shell + +curl https://install.meteor.com/\?release\=2.13.3 | sh + +``` + diff --git a/v3-docs/docs/troubleshooting/windows.md b/v3-docs/docs/troubleshooting/windows.md new file mode 100644 index 0000000000..47dfa91c2d --- /dev/null +++ b/v3-docs/docs/troubleshooting/windows.md @@ -0,0 +1,25 @@ + +# Windows + +Trouble installing Meteor on Windows + +## Can't start Mongo server {#cant-start-mongo-server} + +If your embed MongoDB is not starting when you run `meteor` and you see messages like these: + +```shell script +C:\Users\user\app> meteor +=> Started proxy. +Unexpected mongo exit code 3221225781. Restarting. +Unexpected mongo exit code 3221225781. Restarting. +Unexpected mongo exit code 3221225781. Restarting. +Can't start Mongo server. +``` + +You [probably](https://github.com/meteor/meteor/issues/10036#issuecomment-416485306) need to install `Visual C++ Redistributable for Visual Studio`, depending on your Windows and Meteor embbeded version of MongoDB the version of Visual Studio could be different. You can check the version that we are using in our Windows test environment [here](https://github.com/meteor/meteor/blob/devel/appveyor.yml#L10) + +Starting from MongoDB 4.4.4 we started to use Visual Studio 2019. + +Until MongoDB 4.2 [this](https://www.microsoft.com/en-us/download/confirmation.aspx?id=48145) was the usually the right version to be installed. + +After installing `vc_redist.x64` you should be able to run Meteor and MongoDB server without problems. diff --git a/v3-docs/v3-migration-docs/.gitignore b/v3-docs/v3-migration-docs/.gitignore new file mode 100644 index 0000000000..a9038cf6ce --- /dev/null +++ b/v3-docs/v3-migration-docs/.gitignore @@ -0,0 +1,3 @@ +/node_modules +/.vitepress/cache +/.vitepress/dist \ No newline at end of file diff --git a/v3-docs/v3-migration-docs/.vitepress/config.mts b/v3-docs/v3-migration-docs/.vitepress/config.mts new file mode 100644 index 0000000000..23d2774857 --- /dev/null +++ b/v3-docs/v3-migration-docs/.vitepress/config.mts @@ -0,0 +1,52 @@ +import { defineConfig } from 'vitepress' + +// https://vitepress.dev/reference/site-config +export default defineConfig({ + description: "Guide for Meteor 3.0", + head: [ + ['link', { rel: 'icon', href: '../images/meteor-logo.webp' }], + ], + themeConfig: { + siteTitle: 'Meteor 3.0', + logo: { + dark: 'meteor-logo.webp', + light: 'meteor-logo.webp', + alt: 'Meteor 3.0 Logo', + }, + search: { + provider: 'local' + }, + + // https://vitepress.dev/reference/default-theme-config + nav: [ + { text: 'Home', link: '/', }, + ], + + sidebar: [ + { + text: 'Introduction', + items: [ + { text: 'What is Meteor 3.0', link: '/index' }, + { text: 'How to install', link: '/docs/introduction/how-to-install' }, + ] + }, + { + text: 'Collection and Schemas', + items: [ + { text: 'MongoDB collections in Meteor', link: '/docs/collections-schemas/mongo-db-collection-meteor' }, + ] + }, + { + text: 'Publications and Data Loading', + items: [ + { text: 'Publications and subscriptions', link: '/docs/collections-schemas/undefined' }, + ] + } + ], + + socialLinks: [ + { icon: 'github', link: 'https://github.com/meteor/meteor' }, + { icon: 'twitter', link: 'https://twitter.com/meteorjs' } + ] + } +}) diff --git a/v3-docs/v3-migration-docs/.vitepress/theme/custom.css b/v3-docs/v3-migration-docs/.vitepress/theme/custom.css new file mode 100644 index 0000000000..34cb0e1c5d --- /dev/null +++ b/v3-docs/v3-migration-docs/.vitepress/theme/custom.css @@ -0,0 +1,4 @@ +:root { + --vp-c-brand-1: #F87171; + --vp-c-brand-2: #F87171; + } \ No newline at end of file diff --git a/v3-docs/v3-migration-docs/.vitepress/theme/index.ts b/v3-docs/v3-migration-docs/.vitepress/theme/index.ts new file mode 100644 index 0000000000..508d8b4af1 --- /dev/null +++ b/v3-docs/v3-migration-docs/.vitepress/theme/index.ts @@ -0,0 +1,4 @@ +import DefaultTheme from 'vitepress/theme' +import './custom.css' + +export default DefaultTheme \ No newline at end of file diff --git a/v3-docs/v3-migration-docs/README.md b/v3-docs/v3-migration-docs/README.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/v3-docs/v3-migration-docs/api-examples.md b/v3-docs/v3-migration-docs/api-examples.md new file mode 100644 index 0000000000..6bd8bb5c17 --- /dev/null +++ b/v3-docs/v3-migration-docs/api-examples.md @@ -0,0 +1,49 @@ +--- +outline: deep +--- + +# Runtime API Examples + +This page demonstrates usage of some of the runtime APIs provided by VitePress. + +The main `useData()` API can be used to access site, theme, and page data for the current page. It works in both `.md` and `.vue` files: + +```md + + +## Results + +### Theme Data +
{{ theme }}
+ +### Page Data +
{{ page }}
+ +### Page Frontmatter +
{{ frontmatter }}
+``` + + + +## Results + +### Theme Data +
{{ theme }}
+ +### Page Data +
{{ page }}
+ +### Page Frontmatter +
{{ frontmatter }}
+ +## More + +Check out the documentation for the [full list of runtime APIs](https://vitepress.dev/reference/runtime-api#usedata). diff --git a/v3-docs/v3-migration-docs/docs/collections-schemas/mongo-db-collection-meteor.md b/v3-docs/v3-migration-docs/docs/collections-schemas/mongo-db-collection-meteor.md new file mode 100644 index 0000000000..5060d51598 --- /dev/null +++ b/v3-docs/v3-migration-docs/docs/collections-schemas/mongo-db-collection-meteor.md @@ -0,0 +1 @@ +Meteor \ No newline at end of file diff --git a/v3-docs/v3-migration-docs/docs/introduction/how-to-install.md b/v3-docs/v3-migration-docs/docs/introduction/how-to-install.md new file mode 100644 index 0000000000..da5b5bf33a --- /dev/null +++ b/v3-docs/v3-migration-docs/docs/introduction/how-to-install.md @@ -0,0 +1,29 @@ +# Install Meteor + +## Pre-requisites + +### Operating System + +### Mobile Development + +# Instalation + +```sh +npm install -g meteor +``` + + + +## Troubleshooting + +## PATH management + +## Run Meteor inside Docker + +## Note for Windows users + +## Note for fish shell users (Linux) + +## Uninstalling Meteor + + diff --git a/v3-docs/v3-migration-docs/index.md b/v3-docs/v3-migration-docs/index.md new file mode 100644 index 0000000000..e6828cd805 --- /dev/null +++ b/v3-docs/v3-migration-docs/index.md @@ -0,0 +1,14 @@ + + +# What is Meteor 3.0? + +Id officia culpa culpa commodo non enim mollit dolore culpa. Aliquip reprehenderit tempor et ipsum reprehenderit nisi voluptate quis pariatur irure. Quis Lorem irure aliquip adipisicing esse pariatur veniam minim anim nulla est consectetur. Lorem enim minim esse adipisicing quis eu incididunt amet et culpa ipsum. Consectetur incididunt in deserunt deserunt elit magna culpa Lorem sint. + +## Fibers + +## Syntax Highlighting + +```haskell +add :: Int -> Int -> Int +add x y = x + y +``` \ No newline at end of file diff --git a/v3-docs/v3-migration-docs/markdown-examples.md b/v3-docs/v3-migration-docs/markdown-examples.md new file mode 100644 index 0000000000..8e55eb8add --- /dev/null +++ b/v3-docs/v3-migration-docs/markdown-examples.md @@ -0,0 +1,85 @@ +# Markdown Extension Examples + +This page demonstrates some of the built-in markdown extensions provided by VitePress. + +## Syntax Highlighting + +VitePress provides Syntax Highlighting powered by [Shiki](https://github.com/shikijs/shiki), with additional features like line-highlighting: + +**Input** + +```` +```js{4} +export default { + data () { + return { + msg: 'Highlighted!' + } + } +} +``` +```` + +**Output** + +```js{4} +export default { + data () { + return { + msg: 'Highlighted!' + } + } +} +``` + +## Custom Containers + +**Input** + +```md +::: info +This is an info box. +::: + +::: tip +This is a tip. +::: + +::: warning +This is a warning. +::: + +::: danger +This is a dangerous warning. +::: + +::: details +This is a details block. +::: +``` + +**Output** + +::: info +This is an info box. +::: + +::: tip +This is a tip. +::: + +::: warning +This is a warning. +::: + +::: danger +This is a dangerous warning. +::: + +::: details +This is a details block. +::: + +## More + +Check out the documentation for the [full list of markdown extensions](https://vitepress.dev/guide/markdown). diff --git a/v3-docs/v3-migration-docs/package-lock.json b/v3-docs/v3-migration-docs/package-lock.json new file mode 100644 index 0000000000..8115549549 --- /dev/null +++ b/v3-docs/v3-migration-docs/package-lock.json @@ -0,0 +1,1481 @@ +{ + "name": "guide-3.0", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "guide-3.0", + "version": "1.0.0", + "license": "ISC", + "devDependencies": { + "vitepress": "^1.0.0-rc.27" + } + }, + "node_modules/@algolia/autocomplete-core": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/@algolia/autocomplete-core/-/autocomplete-core-1.9.3.tgz", + "integrity": "sha512-009HdfugtGCdC4JdXUbVJClA0q0zh24yyePn+KUGk3rP7j8FEe/m5Yo/z65gn6nP/cM39PxpzqKrL7A6fP6PPw==", + "dev": true, + "dependencies": { + "@algolia/autocomplete-plugin-algolia-insights": "1.9.3", + "@algolia/autocomplete-shared": "1.9.3" + } + }, + "node_modules/@algolia/autocomplete-plugin-algolia-insights": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/@algolia/autocomplete-plugin-algolia-insights/-/autocomplete-plugin-algolia-insights-1.9.3.tgz", + "integrity": "sha512-a/yTUkcO/Vyy+JffmAnTWbr4/90cLzw+CC3bRbhnULr/EM0fGNvM13oQQ14f2moLMcVDyAx/leczLlAOovhSZg==", + "dev": true, + "dependencies": { + "@algolia/autocomplete-shared": "1.9.3" + }, + "peerDependencies": { + "search-insights": ">= 1 < 3" + } + }, + "node_modules/@algolia/autocomplete-preset-algolia": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/@algolia/autocomplete-preset-algolia/-/autocomplete-preset-algolia-1.9.3.tgz", + "integrity": "sha512-d4qlt6YmrLMYy95n5TB52wtNDr6EgAIPH81dvvvW8UmuWRgxEtY0NJiPwl/h95JtG2vmRM804M0DSwMCNZlzRA==", + "dev": true, + "dependencies": { + "@algolia/autocomplete-shared": "1.9.3" + }, + "peerDependencies": { + "@algolia/client-search": ">= 4.9.1 < 6", + "algoliasearch": ">= 4.9.1 < 6" + } + }, + "node_modules/@algolia/autocomplete-shared": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/@algolia/autocomplete-shared/-/autocomplete-shared-1.9.3.tgz", + "integrity": "sha512-Wnm9E4Ye6Rl6sTTqjoymD+l8DjSTHsHboVRYrKgEt8Q7UHm9nYbqhN/i0fhUYA3OAEH7WA8x3jfpnmJm3rKvaQ==", + "dev": true, + "peerDependencies": { + "@algolia/client-search": ">= 4.9.1 < 6", + "algoliasearch": ">= 4.9.1 < 6" + } + }, + "node_modules/@algolia/cache-browser-local-storage": { + "version": "4.20.0", + "resolved": "https://registry.npmjs.org/@algolia/cache-browser-local-storage/-/cache-browser-local-storage-4.20.0.tgz", + "integrity": "sha512-uujahcBt4DxduBTvYdwO3sBfHuJvJokiC3BP1+O70fglmE1ShkH8lpXqZBac1rrU3FnNYSUs4pL9lBdTKeRPOQ==", + "dev": true, + "dependencies": { + "@algolia/cache-common": "4.20.0" + } + }, + "node_modules/@algolia/cache-common": { + "version": "4.20.0", + "resolved": "https://registry.npmjs.org/@algolia/cache-common/-/cache-common-4.20.0.tgz", + "integrity": "sha512-vCfxauaZutL3NImzB2G9LjLt36vKAckc6DhMp05An14kVo8F1Yofb6SIl6U3SaEz8pG2QOB9ptwM5c+zGevwIQ==", + "dev": true + }, + "node_modules/@algolia/cache-in-memory": { + "version": "4.20.0", + "resolved": "https://registry.npmjs.org/@algolia/cache-in-memory/-/cache-in-memory-4.20.0.tgz", + "integrity": "sha512-Wm9ak/IaacAZXS4mB3+qF/KCoVSBV6aLgIGFEtQtJwjv64g4ePMapORGmCyulCFwfePaRAtcaTbMcJF+voc/bg==", + "dev": true, + "dependencies": { + "@algolia/cache-common": "4.20.0" + } + }, + "node_modules/@algolia/client-account": { + "version": "4.20.0", + "resolved": "https://registry.npmjs.org/@algolia/client-account/-/client-account-4.20.0.tgz", + "integrity": "sha512-GGToLQvrwo7am4zVkZTnKa72pheQeez/16sURDWm7Seyz+HUxKi3BM6fthVVPUEBhtJ0reyVtuK9ArmnaKl10Q==", + "dev": true, + "dependencies": { + "@algolia/client-common": "4.20.0", + "@algolia/client-search": "4.20.0", + "@algolia/transporter": "4.20.0" + } + }, + "node_modules/@algolia/client-analytics": { + "version": "4.20.0", + "resolved": "https://registry.npmjs.org/@algolia/client-analytics/-/client-analytics-4.20.0.tgz", + "integrity": "sha512-EIr+PdFMOallRdBTHHdKI3CstslgLORQG7844Mq84ib5oVFRVASuuPmG4bXBgiDbcsMLUeOC6zRVJhv1KWI0ug==", + "dev": true, + "dependencies": { + "@algolia/client-common": "4.20.0", + "@algolia/client-search": "4.20.0", + "@algolia/requester-common": "4.20.0", + "@algolia/transporter": "4.20.0" + } + }, + "node_modules/@algolia/client-common": { + "version": "4.20.0", + "resolved": "https://registry.npmjs.org/@algolia/client-common/-/client-common-4.20.0.tgz", + "integrity": "sha512-P3WgMdEss915p+knMMSd/fwiHRHKvDu4DYRrCRaBrsfFw7EQHon+EbRSm4QisS9NYdxbS04kcvNoavVGthyfqQ==", + "dev": true, + "dependencies": { + "@algolia/requester-common": "4.20.0", + "@algolia/transporter": "4.20.0" + } + }, + "node_modules/@algolia/client-personalization": { + "version": "4.20.0", + "resolved": "https://registry.npmjs.org/@algolia/client-personalization/-/client-personalization-4.20.0.tgz", + "integrity": "sha512-N9+zx0tWOQsLc3K4PVRDV8GUeOLAY0i445En79Pr3zWB+m67V+n/8w4Kw1C5LlbHDDJcyhMMIlqezh6BEk7xAQ==", + "dev": true, + "dependencies": { + "@algolia/client-common": "4.20.0", + "@algolia/requester-common": "4.20.0", + "@algolia/transporter": "4.20.0" + } + }, + "node_modules/@algolia/client-search": { + "version": "4.20.0", + "resolved": "https://registry.npmjs.org/@algolia/client-search/-/client-search-4.20.0.tgz", + "integrity": "sha512-zgwqnMvhWLdpzKTpd3sGmMlr4c+iS7eyyLGiaO51zDZWGMkpgoNVmltkzdBwxOVXz0RsFMznIxB9zuarUv4TZg==", + "dev": true, + "dependencies": { + "@algolia/client-common": "4.20.0", + "@algolia/requester-common": "4.20.0", + "@algolia/transporter": "4.20.0" + } + }, + "node_modules/@algolia/logger-common": { + "version": "4.20.0", + "resolved": "https://registry.npmjs.org/@algolia/logger-common/-/logger-common-4.20.0.tgz", + "integrity": "sha512-xouigCMB5WJYEwvoWW5XDv7Z9f0A8VoXJc3VKwlHJw/je+3p2RcDXfksLI4G4lIVncFUYMZx30tP/rsdlvvzHQ==", + "dev": true + }, + "node_modules/@algolia/logger-console": { + "version": "4.20.0", + "resolved": "https://registry.npmjs.org/@algolia/logger-console/-/logger-console-4.20.0.tgz", + "integrity": "sha512-THlIGG1g/FS63z0StQqDhT6bprUczBI8wnLT3JWvfAQDZX5P6fCg7dG+pIrUBpDIHGszgkqYEqECaKKsdNKOUA==", + "dev": true, + "dependencies": { + "@algolia/logger-common": "4.20.0" + } + }, + "node_modules/@algolia/requester-browser-xhr": { + "version": "4.20.0", + "resolved": "https://registry.npmjs.org/@algolia/requester-browser-xhr/-/requester-browser-xhr-4.20.0.tgz", + "integrity": "sha512-HbzoSjcjuUmYOkcHECkVTwAelmvTlgs48N6Owt4FnTOQdwn0b8pdht9eMgishvk8+F8bal354nhx/xOoTfwiAw==", + "dev": true, + "dependencies": { + "@algolia/requester-common": "4.20.0" + } + }, + "node_modules/@algolia/requester-common": { + "version": "4.20.0", + "resolved": "https://registry.npmjs.org/@algolia/requester-common/-/requester-common-4.20.0.tgz", + "integrity": "sha512-9h6ye6RY/BkfmeJp7Z8gyyeMrmmWsMOCRBXQDs4mZKKsyVlfIVICpcSibbeYcuUdurLhIlrOUkH3rQEgZzonng==", + "dev": true + }, + "node_modules/@algolia/requester-node-http": { + "version": "4.20.0", + "resolved": "https://registry.npmjs.org/@algolia/requester-node-http/-/requester-node-http-4.20.0.tgz", + "integrity": "sha512-ocJ66L60ABSSTRFnCHIEZpNHv6qTxsBwJEPfYaSBsLQodm0F9ptvalFkHMpvj5DfE22oZrcrLbOYM2bdPJRHng==", + "dev": true, + "dependencies": { + "@algolia/requester-common": "4.20.0" + } + }, + "node_modules/@algolia/transporter": { + "version": "4.20.0", + "resolved": "https://registry.npmjs.org/@algolia/transporter/-/transporter-4.20.0.tgz", + "integrity": "sha512-Lsii1pGWOAISbzeyuf+r/GPhvHMPHSPrTDWNcIzOE1SG1inlJHICaVe2ikuoRjcpgxZNU54Jl+if15SUCsaTUg==", + "dev": true, + "dependencies": { + "@algolia/cache-common": "4.20.0", + "@algolia/logger-common": "4.20.0", + "@algolia/requester-common": "4.20.0" + } + }, + "node_modules/@babel/parser": { + "version": "7.23.3", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.3.tgz", + "integrity": "sha512-uVsWNvlVsIninV2prNz/3lHCb+5CJ+e+IUBfbjToAHODtfGYLfCFuY4AU7TskI+dAKk+njsPiBjq1gKTvZOBaw==", + "dev": true, + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@docsearch/css": { + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/@docsearch/css/-/css-3.5.2.tgz", + "integrity": "sha512-SPiDHaWKQZpwR2siD0KQUwlStvIAnEyK6tAE2h2Wuoq8ue9skzhlyVQ1ddzOxX6khULnAALDiR/isSF3bnuciA==", + "dev": true + }, + "node_modules/@docsearch/js": { + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/@docsearch/js/-/js-3.5.2.tgz", + "integrity": "sha512-p1YFTCDflk8ieHgFJYfmyHBki1D61+U9idwrLh+GQQMrBSP3DLGKpy0XUJtPjAOPltcVbqsTjiPFfH7JImjUNg==", + "dev": true, + "dependencies": { + "@docsearch/react": "3.5.2", + "preact": "^10.0.0" + } + }, + "node_modules/@docsearch/react": { + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/@docsearch/react/-/react-3.5.2.tgz", + "integrity": "sha512-9Ahcrs5z2jq/DcAvYtvlqEBHImbm4YJI8M9y0x6Tqg598P40HTEkX7hsMcIuThI+hTFxRGZ9hll0Wygm2yEjng==", + "dev": true, + "dependencies": { + "@algolia/autocomplete-core": "1.9.3", + "@algolia/autocomplete-preset-algolia": "1.9.3", + "@docsearch/css": "3.5.2", + "algoliasearch": "^4.19.1" + }, + "peerDependencies": { + "@types/react": ">= 16.8.0 < 19.0.0", + "react": ">= 16.8.0 < 19.0.0", + "react-dom": ">= 16.8.0 < 19.0.0", + "search-insights": ">= 1 < 3" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "react": { + "optional": true + }, + "react-dom": { + "optional": true + }, + "search-insights": { + "optional": true + } + } + }, + "node_modules/@esbuild/android-arm": { + "version": "0.19.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.19.5.tgz", + "integrity": "sha512-bhvbzWFF3CwMs5tbjf3ObfGqbl/17ict2/uwOSfr3wmxDE6VdS2GqY/FuzIPe0q0bdhj65zQsvqfArI9MY6+AA==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-arm64": { + "version": "0.19.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.19.5.tgz", + "integrity": "sha512-5d1OkoJxnYQfmC+Zd8NBFjkhyCNYwM4n9ODrycTFY6Jk1IGiZ+tjVJDDSwDt77nK+tfpGP4T50iMtVi4dEGzhQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-x64": { + "version": "0.19.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.19.5.tgz", + "integrity": "sha512-9t+28jHGL7uBdkBjL90QFxe7DVA+KGqWlHCF8ChTKyaKO//VLuoBricQCgwhOjA1/qOczsw843Fy4cbs4H3DVA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.19.5", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.19.5.tgz", + "integrity": "sha512-mvXGcKqqIqyKoxq26qEDPHJuBYUA5KizJncKOAf9eJQez+L9O+KfvNFu6nl7SCZ/gFb2QPaRqqmG0doSWlgkqw==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/darwin-x64": { + "version": "0.19.5", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.19.5.tgz", + "integrity": "sha512-Ly8cn6fGLNet19s0X4unjcniX24I0RqjPv+kurpXabZYSXGM4Pwpmf85WHJN3lAgB8GSth7s5A0r856S+4DyiA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.19.5", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.19.5.tgz", + "integrity": "sha512-GGDNnPWTmWE+DMchq1W8Sd0mUkL+APvJg3b11klSGUDvRXh70JqLAO56tubmq1s2cgpVCSKYywEiKBfju8JztQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.19.5", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.19.5.tgz", + "integrity": "sha512-1CCwDHnSSoA0HNwdfoNY0jLfJpd7ygaLAp5EHFos3VWJCRX9DMwWODf96s9TSse39Br7oOTLryRVmBoFwXbuuQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.19.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.19.5.tgz", + "integrity": "sha512-lrWXLY/vJBzCPC51QN0HM71uWgIEpGSjSZZADQhq7DKhPcI6NH1IdzjfHkDQws2oNpJKpR13kv7/pFHBbDQDwQ==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.19.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.19.5.tgz", + "integrity": "sha512-o3vYippBmSrjjQUCEEiTZ2l+4yC0pVJD/Dl57WfPwwlvFkrxoSO7rmBZFii6kQB3Wrn/6GwJUPLU5t52eq2meA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.19.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.19.5.tgz", + "integrity": "sha512-MkjHXS03AXAkNp1KKkhSKPOCYztRtK+KXDNkBa6P78F8Bw0ynknCSClO/ztGszILZtyO/lVKpa7MolbBZ6oJtQ==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.19.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.19.5.tgz", + "integrity": "sha512-42GwZMm5oYOD/JHqHska3Jg0r+XFb/fdZRX+WjADm3nLWLcIsN27YKtqxzQmGNJgu0AyXg4HtcSK9HuOk3v1Dw==", + "cpu": [ + "loong64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.19.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.19.5.tgz", + "integrity": "sha512-kcjndCSMitUuPJobWCnwQ9lLjiLZUR3QLQmlgaBfMX23UEa7ZOrtufnRds+6WZtIS9HdTXqND4yH8NLoVVIkcg==", + "cpu": [ + "mips64el" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.19.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.19.5.tgz", + "integrity": "sha512-yJAxJfHVm0ZbsiljbtFFP1BQKLc8kUF6+17tjQ78QjqjAQDnhULWiTA6u0FCDmYT1oOKS9PzZ2z0aBI+Mcyj7Q==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.19.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.19.5.tgz", + "integrity": "sha512-5u8cIR/t3gaD6ad3wNt1MNRstAZO+aNyBxu2We8X31bA8XUNyamTVQwLDA1SLoPCUehNCymhBhK3Qim1433Zag==", + "cpu": [ + "riscv64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.19.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.19.5.tgz", + "integrity": "sha512-Z6JrMyEw/EmZBD/OFEFpb+gao9xJ59ATsoTNlj39jVBbXqoZm4Xntu6wVmGPB/OATi1uk/DB+yeDPv2E8PqZGw==", + "cpu": [ + "s390x" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.19.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.19.5.tgz", + "integrity": "sha512-psagl+2RlK1z8zWZOmVdImisMtrUxvwereIdyJTmtmHahJTKb64pAcqoPlx6CewPdvGvUKe2Jw+0Z/0qhSbG1A==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.19.5", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.19.5.tgz", + "integrity": "sha512-kL2l+xScnAy/E/3119OggX8SrWyBEcqAh8aOY1gr4gPvw76la2GlD4Ymf832UCVbmuWeTf2adkZDK+h0Z/fB4g==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.19.5", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.19.5.tgz", + "integrity": "sha512-sPOfhtzFufQfTBgRnE1DIJjzsXukKSvZxloZbkJDG383q0awVAq600pc1nfqBcl0ice/WN9p4qLc39WhBShRTA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.19.5", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.19.5.tgz", + "integrity": "sha512-dGZkBXaafuKLpDSjKcB0ax0FL36YXCvJNnztjKV+6CO82tTYVDSH2lifitJ29jxRMoUhgkg9a+VA/B03WK5lcg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.19.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.19.5.tgz", + "integrity": "sha512-dWVjD9y03ilhdRQ6Xig1NWNgfLtf2o/STKTS+eZuF90fI2BhbwD6WlaiCGKptlqXlURVB5AUOxUj09LuwKGDTg==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.19.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.19.5.tgz", + "integrity": "sha512-4liggWIA4oDgUxqpZwrDhmEfAH4d0iljanDOK7AnVU89T6CzHon/ony8C5LeOdfgx60x5cnQJFZwEydVlYx4iw==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.19.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.19.5.tgz", + "integrity": "sha512-czTrygUsB/jlM8qEW5MD8bgYU2Xg14lo6kBDXW6HdxKjh8M5PzETGiSHaz9MtbXBYDloHNUAUW2tMiKW4KM9Mw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.4.15", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", + "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", + "dev": true + }, + "node_modules/@rollup/rollup-android-arm-eabi": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.4.1.tgz", + "integrity": "sha512-Ss4suS/sd+6xLRu+MLCkED2mUrAyqHmmvZB+zpzZ9Znn9S8wCkTQCJaQ8P8aHofnvG5L16u9MVnJjCqioPErwQ==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-android-arm64": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.4.1.tgz", + "integrity": "sha512-sRSkGTvGsARwWd7TzC8LKRf8FiPn7257vd/edzmvG4RIr9x68KBN0/Ek48CkuUJ5Pj/Dp9vKWv6PEupjKWjTYA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-darwin-arm64": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.4.1.tgz", + "integrity": "sha512-nz0AiGrrXyaWpsmBXUGOBiRDU0wyfSXbFuF98pPvIO8O6auQsPG6riWsfQqmCCC5FNd8zKQ4JhgugRNAkBJ8mQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-darwin-x64": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.4.1.tgz", + "integrity": "sha512-Ogqvf4/Ve/faMaiPRvzsJEqajbqs00LO+8vtrPBVvLgdw4wBg6ZDXdkDAZO+4MLnrc8mhGV6VJAzYScZdPLtJg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-linux-arm-gnueabihf": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.4.1.tgz", + "integrity": "sha512-9zc2tqlr6HfO+hx9+wktUlWTRdje7Ub15iJqKcqg5uJZ+iKqmd2CMxlgPpXi7+bU7bjfDIuvCvnGk7wewFEhCg==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-gnu": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.4.1.tgz", + "integrity": "sha512-phLb1fN3rq2o1j1v+nKxXUTSJnAhzhU0hLrl7Qzb0fLpwkGMHDem+o6d+ZI8+/BlTXfMU4kVWGvy6g9k/B8L6Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-musl": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.4.1.tgz", + "integrity": "sha512-M2sDtw4tf57VPSjbTAN/lz1doWUqO2CbQuX3L9K6GWIR5uw9j+ROKCvvUNBY8WUbMxwaoc8mH9HmmBKsLht7+w==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-gnu": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.4.1.tgz", + "integrity": "sha512-mHIlRLX+hx+30cD6c4BaBOsSqdnCE4ok7/KDvjHYAHoSuveoMMxIisZFvcLhUnyZcPBXDGZTuBoalcuh43UfQQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-musl": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.4.1.tgz", + "integrity": "sha512-tB+RZuDi3zxFx7vDrjTNGVLu2KNyzYv+UY8jz7e4TMEoAj7iEt8Qk6xVu6mo3pgjnsHj6jnq3uuRsHp97DLwOA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-win32-arm64-msvc": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.4.1.tgz", + "integrity": "sha512-Hdn39PzOQowK/HZzYpCuZdJC91PE6EaGbTe2VCA9oq2u18evkisQfws0Smh9QQGNNRa/T7MOuGNQoLeXhhE3PQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-ia32-msvc": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.4.1.tgz", + "integrity": "sha512-tLpKb1Elm9fM8c5w3nl4N1eLTP4bCqTYw9tqUBxX8/hsxqHO3dxc2qPbZ9PNkdK4tg4iLEYn0pOUnVByRd2CbA==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-x64-msvc": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.4.1.tgz", + "integrity": "sha512-eAhItDX9yQtZVM3yvXS/VR3qPqcnXvnLyx1pLXl4JzyNMBNO3KC986t/iAg2zcMzpAp9JSvxB5VZGnBiNoA98w==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@types/linkify-it": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/@types/linkify-it/-/linkify-it-3.0.5.tgz", + "integrity": "sha512-yg6E+u0/+Zjva+buc3EIb+29XEg4wltq7cSmd4Uc2EE/1nUVmxyzpX6gUXD0V8jIrG0r7YeOGVIbYRkxeooCtw==", + "dev": true + }, + "node_modules/@types/markdown-it": { + "version": "13.0.6", + "resolved": "https://registry.npmjs.org/@types/markdown-it/-/markdown-it-13.0.6.tgz", + "integrity": "sha512-0VqpvusJn1/lwRegCxcHVdmLfF+wIsprsKMC9xW8UPcTxhFcQtoN/fBU1zMe8pH7D/RuueMh2CaBaNv+GrLqTw==", + "dev": true, + "dependencies": { + "@types/linkify-it": "*", + "@types/mdurl": "*" + } + }, + "node_modules/@types/mdurl": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@types/mdurl/-/mdurl-1.0.5.tgz", + "integrity": "sha512-6L6VymKTzYSrEf4Nev4Xa1LCHKrlTlYCBMTlQKFuddo1CvQcE52I0mwfOJayueUC7MJuXOeHTcIU683lzd0cUA==", + "dev": true + }, + "node_modules/@types/web-bluetooth": { + "version": "0.0.20", + "resolved": "https://registry.npmjs.org/@types/web-bluetooth/-/web-bluetooth-0.0.20.tgz", + "integrity": "sha512-g9gZnnXVq7gM7v3tJCWV/qw7w+KeOlSHAhgF9RytFyifW6AF61hdT2ucrYhPq9hLs5JIryeupHV3qGk95dH9ow==", + "dev": true + }, + "node_modules/@vitejs/plugin-vue": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/@vitejs/plugin-vue/-/plugin-vue-4.5.0.tgz", + "integrity": "sha512-a2WSpP8X8HTEww/U00bU4mX1QpLINNuz/2KMNpLsdu3BzOpak3AGI1CJYBTXcc4SPhaD0eNRUp7IyQK405L5dQ==", + "dev": true, + "engines": { + "node": "^14.18.0 || >=16.0.0" + }, + "peerDependencies": { + "vite": "^4.0.0 || ^5.0.0", + "vue": "^3.2.25" + } + }, + "node_modules/@vue/compiler-core": { + "version": "3.3.8", + "resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.3.8.tgz", + "integrity": "sha512-hN/NNBUECw8SusQvDSqqcVv6gWq8L6iAktUR0UF3vGu2OhzRqcOiAno0FmBJWwxhYEXRlQJT5XnoKsVq1WZx4g==", + "dev": true, + "dependencies": { + "@babel/parser": "^7.23.0", + "@vue/shared": "3.3.8", + "estree-walker": "^2.0.2", + "source-map-js": "^1.0.2" + } + }, + "node_modules/@vue/compiler-dom": { + "version": "3.3.8", + "resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.3.8.tgz", + "integrity": "sha512-+PPtv+p/nWDd0AvJu3w8HS0RIm/C6VGBIRe24b9hSyNWOAPEUosFZ5diwawwP8ip5sJ8n0Pe87TNNNHnvjs0FQ==", + "dev": true, + "dependencies": { + "@vue/compiler-core": "3.3.8", + "@vue/shared": "3.3.8" + } + }, + "node_modules/@vue/compiler-sfc": { + "version": "3.3.8", + "resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.3.8.tgz", + "integrity": "sha512-WMzbUrlTjfYF8joyT84HfwwXo+8WPALuPxhy+BZ6R4Aafls+jDBnSz8PDz60uFhuqFbl3HxRfxvDzrUf3THwpA==", + "dev": true, + "dependencies": { + "@babel/parser": "^7.23.0", + "@vue/compiler-core": "3.3.8", + "@vue/compiler-dom": "3.3.8", + "@vue/compiler-ssr": "3.3.8", + "@vue/reactivity-transform": "3.3.8", + "@vue/shared": "3.3.8", + "estree-walker": "^2.0.2", + "magic-string": "^0.30.5", + "postcss": "^8.4.31", + "source-map-js": "^1.0.2" + } + }, + "node_modules/@vue/compiler-ssr": { + "version": "3.3.8", + "resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.3.8.tgz", + "integrity": "sha512-hXCqQL/15kMVDBuoBYpUnSYT8doDNwsjvm3jTefnXr+ytn294ySnT8NlsFHmTgKNjwpuFy7XVV8yTeLtNl/P6w==", + "dev": true, + "dependencies": { + "@vue/compiler-dom": "3.3.8", + "@vue/shared": "3.3.8" + } + }, + "node_modules/@vue/devtools-api": { + "version": "6.5.1", + "resolved": "https://registry.npmjs.org/@vue/devtools-api/-/devtools-api-6.5.1.tgz", + "integrity": "sha512-+KpckaAQyfbvshdDW5xQylLni1asvNSGme1JFs8I1+/H5pHEhqUKMEQD/qn3Nx5+/nycBq11qAEi8lk+LXI2dA==", + "dev": true + }, + "node_modules/@vue/reactivity": { + "version": "3.3.8", + "resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.3.8.tgz", + "integrity": "sha512-ctLWitmFBu6mtddPyOKpHg8+5ahouoTCRtmAHZAXmolDtuZXfjL2T3OJ6DL6ezBPQB1SmMnpzjiWjCiMYmpIuw==", + "dev": true, + "dependencies": { + "@vue/shared": "3.3.8" + } + }, + "node_modules/@vue/reactivity-transform": { + "version": "3.3.8", + "resolved": "https://registry.npmjs.org/@vue/reactivity-transform/-/reactivity-transform-3.3.8.tgz", + "integrity": "sha512-49CvBzmZNtcHua0XJ7GdGifM8GOXoUMOX4dD40Y5DxI3R8OUhMlvf2nvgUAcPxaXiV5MQQ1Nwy09ADpnLQUqRw==", + "dev": true, + "dependencies": { + "@babel/parser": "^7.23.0", + "@vue/compiler-core": "3.3.8", + "@vue/shared": "3.3.8", + "estree-walker": "^2.0.2", + "magic-string": "^0.30.5" + } + }, + "node_modules/@vue/runtime-core": { + "version": "3.3.8", + "resolved": "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.3.8.tgz", + "integrity": "sha512-qurzOlb6q26KWQ/8IShHkMDOuJkQnQcTIp1sdP4I9MbCf9FJeGVRXJFr2mF+6bXh/3Zjr9TDgURXrsCr9bfjUw==", + "dev": true, + "dependencies": { + "@vue/reactivity": "3.3.8", + "@vue/shared": "3.3.8" + } + }, + "node_modules/@vue/runtime-dom": { + "version": "3.3.8", + "resolved": "https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.3.8.tgz", + "integrity": "sha512-Noy5yM5UIf9UeFoowBVgghyGGPIDPy1Qlqt0yVsUdAVbqI8eeMSsTqBtauaEoT2UFXUk5S64aWVNJN4MJ2vRdA==", + "dev": true, + "dependencies": { + "@vue/runtime-core": "3.3.8", + "@vue/shared": "3.3.8", + "csstype": "^3.1.2" + } + }, + "node_modules/@vue/server-renderer": { + "version": "3.3.8", + "resolved": "https://registry.npmjs.org/@vue/server-renderer/-/server-renderer-3.3.8.tgz", + "integrity": "sha512-zVCUw7RFskvPuNlPn/8xISbrf0zTWsTSdYTsUTN1ERGGZGVnRxM2QZ3x1OR32+vwkkCm0IW6HmJ49IsPm7ilLg==", + "dev": true, + "dependencies": { + "@vue/compiler-ssr": "3.3.8", + "@vue/shared": "3.3.8" + }, + "peerDependencies": { + "vue": "3.3.8" + } + }, + "node_modules/@vue/shared": { + "version": "3.3.8", + "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.3.8.tgz", + "integrity": "sha512-8PGwybFwM4x8pcfgqEQFy70NaQxASvOC5DJwLQfpArw1UDfUXrJkdxD3BhVTMS+0Lef/TU7YO0Jvr0jJY8T+mw==", + "dev": true + }, + "node_modules/@vueuse/core": { + "version": "10.6.1", + "resolved": "https://registry.npmjs.org/@vueuse/core/-/core-10.6.1.tgz", + "integrity": "sha512-Pc26IJbqgC9VG1u6VY/xrXXfxD33hnvxBnKrLlA2LJlyHII+BSrRoTPJgGYq7qZOu61itITFUnm6QbacwZ4H8Q==", + "dev": true, + "dependencies": { + "@types/web-bluetooth": "^0.0.20", + "@vueuse/metadata": "10.6.1", + "@vueuse/shared": "10.6.1", + "vue-demi": ">=0.14.6" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + } + }, + "node_modules/@vueuse/core/node_modules/vue-demi": { + "version": "0.14.6", + "resolved": "https://registry.npmjs.org/vue-demi/-/vue-demi-0.14.6.tgz", + "integrity": "sha512-8QA7wrYSHKaYgUxDA5ZC24w+eHm3sYCbp0EzcDwKqN3p6HqtTCGR/GVsPyZW92unff4UlcSh++lmqDWN3ZIq4w==", + "dev": true, + "hasInstallScript": true, + "bin": { + "vue-demi-fix": "bin/vue-demi-fix.js", + "vue-demi-switch": "bin/vue-demi-switch.js" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + }, + "peerDependencies": { + "@vue/composition-api": "^1.0.0-rc.1", + "vue": "^3.0.0-0 || ^2.6.0" + }, + "peerDependenciesMeta": { + "@vue/composition-api": { + "optional": true + } + } + }, + "node_modules/@vueuse/integrations": { + "version": "10.6.1", + "resolved": "https://registry.npmjs.org/@vueuse/integrations/-/integrations-10.6.1.tgz", + "integrity": "sha512-mPDupuofMJ4DPmtX/FfP1MajmWRzYDv8WSaTCo8LQ5kFznjWgmUQ16ApjYqgMquqffNY6+IRMdMgosLDRZOSZA==", + "dev": true, + "dependencies": { + "@vueuse/core": "10.6.1", + "@vueuse/shared": "10.6.1", + "vue-demi": ">=0.14.6" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + }, + "peerDependencies": { + "async-validator": "*", + "axios": "*", + "change-case": "*", + "drauu": "*", + "focus-trap": "*", + "fuse.js": "*", + "idb-keyval": "*", + "jwt-decode": "*", + "nprogress": "*", + "qrcode": "*", + "sortablejs": "*", + "universal-cookie": "*" + }, + "peerDependenciesMeta": { + "async-validator": { + "optional": true + }, + "axios": { + "optional": true + }, + "change-case": { + "optional": true + }, + "drauu": { + "optional": true + }, + "focus-trap": { + "optional": true + }, + "fuse.js": { + "optional": true + }, + "idb-keyval": { + "optional": true + }, + "jwt-decode": { + "optional": true + }, + "nprogress": { + "optional": true + }, + "qrcode": { + "optional": true + }, + "sortablejs": { + "optional": true + }, + "universal-cookie": { + "optional": true + } + } + }, + "node_modules/@vueuse/integrations/node_modules/vue-demi": { + "version": "0.14.6", + "resolved": "https://registry.npmjs.org/vue-demi/-/vue-demi-0.14.6.tgz", + "integrity": "sha512-8QA7wrYSHKaYgUxDA5ZC24w+eHm3sYCbp0EzcDwKqN3p6HqtTCGR/GVsPyZW92unff4UlcSh++lmqDWN3ZIq4w==", + "dev": true, + "hasInstallScript": true, + "bin": { + "vue-demi-fix": "bin/vue-demi-fix.js", + "vue-demi-switch": "bin/vue-demi-switch.js" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + }, + "peerDependencies": { + "@vue/composition-api": "^1.0.0-rc.1", + "vue": "^3.0.0-0 || ^2.6.0" + }, + "peerDependenciesMeta": { + "@vue/composition-api": { + "optional": true + } + } + }, + "node_modules/@vueuse/metadata": { + "version": "10.6.1", + "resolved": "https://registry.npmjs.org/@vueuse/metadata/-/metadata-10.6.1.tgz", + "integrity": "sha512-qhdwPI65Bgcj23e5lpGfQsxcy0bMjCAsUGoXkJ7DsoeDUdasbZ2DBa4dinFCOER3lF4gwUv+UD2AlA11zdzMFw==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/antfu" + } + }, + "node_modules/@vueuse/shared": { + "version": "10.6.1", + "resolved": "https://registry.npmjs.org/@vueuse/shared/-/shared-10.6.1.tgz", + "integrity": "sha512-TECVDTIedFlL0NUfHWncf3zF9Gc4VfdxfQc8JFwoVZQmxpONhLxFrlm0eHQeidHj4rdTPL3KXJa0TZCk1wnc5Q==", + "dev": true, + "dependencies": { + "vue-demi": ">=0.14.6" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + } + }, + "node_modules/@vueuse/shared/node_modules/vue-demi": { + "version": "0.14.6", + "resolved": "https://registry.npmjs.org/vue-demi/-/vue-demi-0.14.6.tgz", + "integrity": "sha512-8QA7wrYSHKaYgUxDA5ZC24w+eHm3sYCbp0EzcDwKqN3p6HqtTCGR/GVsPyZW92unff4UlcSh++lmqDWN3ZIq4w==", + "dev": true, + "hasInstallScript": true, + "bin": { + "vue-demi-fix": "bin/vue-demi-fix.js", + "vue-demi-switch": "bin/vue-demi-switch.js" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + }, + "peerDependencies": { + "@vue/composition-api": "^1.0.0-rc.1", + "vue": "^3.0.0-0 || ^2.6.0" + }, + "peerDependenciesMeta": { + "@vue/composition-api": { + "optional": true + } + } + }, + "node_modules/algoliasearch": { + "version": "4.20.0", + "resolved": "https://registry.npmjs.org/algoliasearch/-/algoliasearch-4.20.0.tgz", + "integrity": "sha512-y+UHEjnOItoNy0bYO+WWmLWBlPwDjKHW6mNHrPi0NkuhpQOOEbrkwQH/wgKFDLh7qlKjzoKeiRtlpewDPDG23g==", + "dev": true, + "dependencies": { + "@algolia/cache-browser-local-storage": "4.20.0", + "@algolia/cache-common": "4.20.0", + "@algolia/cache-in-memory": "4.20.0", + "@algolia/client-account": "4.20.0", + "@algolia/client-analytics": "4.20.0", + "@algolia/client-common": "4.20.0", + "@algolia/client-personalization": "4.20.0", + "@algolia/client-search": "4.20.0", + "@algolia/logger-common": "4.20.0", + "@algolia/logger-console": "4.20.0", + "@algolia/requester-browser-xhr": "4.20.0", + "@algolia/requester-common": "4.20.0", + "@algolia/requester-node-http": "4.20.0", + "@algolia/transporter": "4.20.0" + } + }, + "node_modules/ansi-sequence-parser": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ansi-sequence-parser/-/ansi-sequence-parser-1.1.1.tgz", + "integrity": "sha512-vJXt3yiaUL4UU546s3rPXlsry/RnM730G1+HkpKE012AN0sx1eOrxSu95oKDIonskeLTijMgqWZ3uDEe3NFvyg==", + "dev": true + }, + "node_modules/csstype": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.2.tgz", + "integrity": "sha512-I7K1Uu0MBPzaFKg4nI5Q7Vs2t+3gWWW648spaF+Rg7pI9ds18Ugn+lvg4SHczUdKlHI5LWBXyqfS8+DufyBsgQ==", + "dev": true + }, + "node_modules/esbuild": { + "version": "0.19.5", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.19.5.tgz", + "integrity": "sha512-bUxalY7b1g8vNhQKdB24QDmHeY4V4tw/s6Ak5z+jJX9laP5MoQseTOMemAr0gxssjNcH0MCViG8ONI2kksvfFQ==", + "dev": true, + "hasInstallScript": true, + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=12" + }, + "optionalDependencies": { + "@esbuild/android-arm": "0.19.5", + "@esbuild/android-arm64": "0.19.5", + "@esbuild/android-x64": "0.19.5", + "@esbuild/darwin-arm64": "0.19.5", + "@esbuild/darwin-x64": "0.19.5", + "@esbuild/freebsd-arm64": "0.19.5", + "@esbuild/freebsd-x64": "0.19.5", + "@esbuild/linux-arm": "0.19.5", + "@esbuild/linux-arm64": "0.19.5", + "@esbuild/linux-ia32": "0.19.5", + "@esbuild/linux-loong64": "0.19.5", + "@esbuild/linux-mips64el": "0.19.5", + "@esbuild/linux-ppc64": "0.19.5", + "@esbuild/linux-riscv64": "0.19.5", + "@esbuild/linux-s390x": "0.19.5", + "@esbuild/linux-x64": "0.19.5", + "@esbuild/netbsd-x64": "0.19.5", + "@esbuild/openbsd-x64": "0.19.5", + "@esbuild/sunos-x64": "0.19.5", + "@esbuild/win32-arm64": "0.19.5", + "@esbuild/win32-ia32": "0.19.5", + "@esbuild/win32-x64": "0.19.5" + } + }, + "node_modules/estree-walker": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", + "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==", + "dev": true + }, + "node_modules/focus-trap": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/focus-trap/-/focus-trap-7.5.4.tgz", + "integrity": "sha512-N7kHdlgsO/v+iD/dMoJKtsSqs5Dz/dXZVebRgJw23LDk+jMi/974zyiOYDziY2JPp8xivq9BmUGwIJMiuSBi7w==", + "dev": true, + "dependencies": { + "tabbable": "^6.2.0" + } + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/jsonc-parser": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.2.0.tgz", + "integrity": "sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==", + "dev": true + }, + "node_modules/magic-string": { + "version": "0.30.5", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.5.tgz", + "integrity": "sha512-7xlpfBaQaP/T6Vh8MO/EqXSW5En6INHEvEXQiuff7Gku0PWjU3uf6w/j9o7O+SpB5fOAkrI5HeoNgwjEO0pFsA==", + "dev": true, + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.4.15" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/mark.js": { + "version": "8.11.1", + "resolved": "https://registry.npmjs.org/mark.js/-/mark.js-8.11.1.tgz", + "integrity": "sha512-1I+1qpDt4idfgLQG+BNWmrqku+7/2bi5nLf4YwF8y8zXvmfiTBY3PV3ZibfrjBueCByROpuBjLLFCajqkgYoLQ==", + "dev": true + }, + "node_modules/minisearch": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/minisearch/-/minisearch-6.2.0.tgz", + "integrity": "sha512-BECkorDF1TY2rGKt9XHdSeP9TP29yUbrAaCh/C03wpyf1vx3uYcP/+8XlMcpTkgoU0rBVnHMAOaP83Rc9Tm+TQ==", + "dev": true + }, + "node_modules/nanoid": { + "version": "3.3.7", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz", + "integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "node_modules/picocolors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", + "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", + "dev": true + }, + "node_modules/postcss": { + "version": "8.4.31", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.31.tgz", + "integrity": "sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "dependencies": { + "nanoid": "^3.3.6", + "picocolors": "^1.0.0", + "source-map-js": "^1.0.2" + }, + "engines": { + "node": "^10 || ^12 || >=14" + } + }, + "node_modules/preact": { + "version": "10.19.2", + "resolved": "https://registry.npmjs.org/preact/-/preact-10.19.2.tgz", + "integrity": "sha512-UA9DX/OJwv6YwP9Vn7Ti/vF80XL+YA5H2l7BpCtUr3ya8LWHFzpiO5R+N7dN16ujpIxhekRFuOOF82bXX7K/lg==", + "dev": true, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/preact" + } + }, + "node_modules/rollup": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.4.1.tgz", + "integrity": "sha512-idZzrUpWSblPJX66i+GzrpjKE3vbYrlWirUHteoAbjKReZwa0cohAErOYA5efoMmNCdvG9yrJS+w9Kl6csaH4w==", + "dev": true, + "bin": { + "rollup": "dist/bin/rollup" + }, + "engines": { + "node": ">=18.0.0", + "npm": ">=8.0.0" + }, + "optionalDependencies": { + "@rollup/rollup-android-arm-eabi": "4.4.1", + "@rollup/rollup-android-arm64": "4.4.1", + "@rollup/rollup-darwin-arm64": "4.4.1", + "@rollup/rollup-darwin-x64": "4.4.1", + "@rollup/rollup-linux-arm-gnueabihf": "4.4.1", + "@rollup/rollup-linux-arm64-gnu": "4.4.1", + "@rollup/rollup-linux-arm64-musl": "4.4.1", + "@rollup/rollup-linux-x64-gnu": "4.4.1", + "@rollup/rollup-linux-x64-musl": "4.4.1", + "@rollup/rollup-win32-arm64-msvc": "4.4.1", + "@rollup/rollup-win32-ia32-msvc": "4.4.1", + "@rollup/rollup-win32-x64-msvc": "4.4.1", + "fsevents": "~2.3.2" + } + }, + "node_modules/search-insights": { + "version": "2.11.0", + "resolved": "https://registry.npmjs.org/search-insights/-/search-insights-2.11.0.tgz", + "integrity": "sha512-Uin2J8Bpm3xaZi9Y8QibSys6uJOFZ+REMrf42v20AA3FUDUrshKkMEP6liJbMAHCm71wO6ls4mwAf7a3gFVxLw==", + "dev": true, + "peer": true + }, + "node_modules/shiki": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/shiki/-/shiki-0.14.5.tgz", + "integrity": "sha512-1gCAYOcmCFONmErGTrS1fjzJLA7MGZmKzrBNX7apqSwhyITJg2O102uFzXUeBxNnEkDA9vHIKLyeKq0V083vIw==", + "dev": true, + "dependencies": { + "ansi-sequence-parser": "^1.1.0", + "jsonc-parser": "^3.2.0", + "vscode-oniguruma": "^1.7.0", + "vscode-textmate": "^8.0.0" + } + }, + "node_modules/source-map-js": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz", + "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/tabbable": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/tabbable/-/tabbable-6.2.0.tgz", + "integrity": "sha512-Cat63mxsVJlzYvN51JmVXIgNoUokrIaT2zLclCXjRd8boZ0004U4KCs/sToJ75C6sdlByWxpYnb5Boif1VSFew==", + "dev": true + }, + "node_modules/vite": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/vite/-/vite-5.0.0.tgz", + "integrity": "sha512-ESJVM59mdyGpsiNAeHQOR/0fqNoOyWPYesFto8FFZugfmhdHx8Fzd8sF3Q/xkVhZsyOxHfdM7ieiVAorI9RjFw==", + "dev": true, + "dependencies": { + "esbuild": "^0.19.3", + "postcss": "^8.4.31", + "rollup": "^4.2.0" + }, + "bin": { + "vite": "bin/vite.js" + }, + "engines": { + "node": "^18.0.0 || >=20.0.0" + }, + "funding": { + "url": "https://github.com/vitejs/vite?sponsor=1" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + }, + "peerDependencies": { + "@types/node": "^18.0.0 || >=20.0.0", + "less": "*", + "lightningcss": "^1.21.0", + "sass": "*", + "stylus": "*", + "sugarss": "*", + "terser": "^5.4.0" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "less": { + "optional": true + }, + "lightningcss": { + "optional": true + }, + "sass": { + "optional": true + }, + "stylus": { + "optional": true + }, + "sugarss": { + "optional": true + }, + "terser": { + "optional": true + } + } + }, + "node_modules/vitepress": { + "version": "1.0.0-rc.27", + "resolved": "https://registry.npmjs.org/vitepress/-/vitepress-1.0.0-rc.27.tgz", + "integrity": "sha512-1qs1a5qPQxNOJN451HmNtKewxSIOk52qv1EdWtsO6V6kvrNxF2FFR3Inhj0W56Jcs8AKIdzKDKHNYIJhcyz3AA==", + "dev": true, + "dependencies": { + "@docsearch/css": "^3.5.2", + "@docsearch/js": "^3.5.2", + "@types/markdown-it": "^13.0.6", + "@vitejs/plugin-vue": "^4.5.0", + "@vue/devtools-api": "^6.5.1", + "@vueuse/core": "^10.6.1", + "@vueuse/integrations": "^10.6.1", + "focus-trap": "^7.5.4", + "mark.js": "8.11.1", + "minisearch": "^6.2.0", + "shiki": "^0.14.5", + "vite": "^5.0.0", + "vue": "^3.3.8" + }, + "bin": { + "vitepress": "bin/vitepress.js" + }, + "peerDependencies": { + "markdown-it-mathjax3": "^4.3.2", + "postcss": "^8.4.31" + }, + "peerDependenciesMeta": { + "markdown-it-mathjax3": { + "optional": true + }, + "postcss": { + "optional": true + } + } + }, + "node_modules/vscode-oniguruma": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/vscode-oniguruma/-/vscode-oniguruma-1.7.0.tgz", + "integrity": "sha512-L9WMGRfrjOhgHSdOYgCt/yRMsXzLDJSL7BPrOZt73gU0iWO4mpqzqQzOz5srxqTvMBaR0XZTSrVWo4j55Rc6cA==", + "dev": true + }, + "node_modules/vscode-textmate": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/vscode-textmate/-/vscode-textmate-8.0.0.tgz", + "integrity": "sha512-AFbieoL7a5LMqcnOF04ji+rpXadgOXnZsxQr//r83kLPr7biP7am3g9zbaZIaBGwBRWeSvoMD4mgPdX3e4NWBg==", + "dev": true + }, + "node_modules/vue": { + "version": "3.3.8", + "resolved": "https://registry.npmjs.org/vue/-/vue-3.3.8.tgz", + "integrity": "sha512-5VSX/3DabBikOXMsxzlW8JyfeLKlG9mzqnWgLQLty88vdZL7ZJgrdgBOmrArwxiLtmS+lNNpPcBYqrhE6TQW5w==", + "dev": true, + "dependencies": { + "@vue/compiler-dom": "3.3.8", + "@vue/compiler-sfc": "3.3.8", + "@vue/runtime-dom": "3.3.8", + "@vue/server-renderer": "3.3.8", + "@vue/shared": "3.3.8" + }, + "peerDependencies": { + "typescript": "*" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + } + } +} diff --git a/v3-docs/v3-migration-docs/package.json b/v3-docs/v3-migration-docs/package.json new file mode 100644 index 0000000000..ed39753286 --- /dev/null +++ b/v3-docs/v3-migration-docs/package.json @@ -0,0 +1,25 @@ +{ + "name": "guide-3.0", + "version": "1.0.0", + "description": "Meteor 3.0 guide", + "main": "index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1", + "docs:dev": "vitepress dev", + "docs:build": "vitepress build", + "docs:preview": "vitepress preview" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/meteor/meteor.git" + }, + "author": "Vitor S. Almeida", + "license": "ISC", + "bugs": { + "url": "https://github.com/meteor/meteor/issues" + }, + "homepage": "https://github.com/meteor/meteor#readme", + "devDependencies": { + "vitepress": "^1.0.0-rc.27" + } +} \ No newline at end of file diff --git a/v3-docs/v3-migration-docs/public/meteor-logo.webp b/v3-docs/v3-migration-docs/public/meteor-logo.webp new file mode 100644 index 0000000000..603f19e675 Binary files /dev/null and b/v3-docs/v3-migration-docs/public/meteor-logo.webp differ