Merge branch 'devel' into feature/static-html-tools

This commit is contained in:
Jan Dvorak
2023-06-28 12:17:11 +02:00
554 changed files with 27288 additions and 7176 deletions

View File

@@ -1,4 +1,4 @@
version: 2
version: 2.1
# A reusable "run" snippet which is ran before each test to setup the
# environment for user-limits, core-dumps, etc.
@@ -62,6 +62,7 @@ build_machine_environment: &build_machine_environment
# Specify that we want an actual machine (ala Circle 1.0), not a Docker image.
docker:
- image: meteor/circleci:android-30-node-14
resource_class: large
environment:
# This multiplier scales the waitSecs for selftests.
TIMEOUT_SCALE_FACTOR: 8
@@ -96,6 +97,30 @@ build_machine_environment: &build_machine_environment
NUM_GROUPS: 12
RUNNING_AVG_LENGTH: 6
can_disable_fibers: &can_disable_fibers
parameters:
fibers:
type: boolean
default: true
set_fibers_env: &set_fibers_env
name: "Disable Fibers"
command: |
if [ "<< parameters.fibers >>" == "false" ]; then
echo "Disabling Fibers"
echo 'export DISABLE_FIBERS=1' >> "$BASH_ENV"
source "$BASH_ENV"
fi
# Run tests with Fibers and then without.
matrix_for_fibers: &matrix_for_fibers
matrix:
parameters:
# If we want to run with Fibers and without, just append false here.
fibers: [true]
jobs:
Get Ready:
<<: *build_machine_environment
@@ -167,6 +192,7 @@ jobs:
path: /tmp/memuse.txt
Isolated Tests:
<<: *can_disable_fibers
<<: *build_machine_environment
steps:
- run:
@@ -175,6 +201,7 @@ jobs:
<<: *run_env_change
- attach_workspace:
at: .
- run: *set_fibers_env
- run:
name: "Print environment"
command: printenv
@@ -209,6 +236,7 @@ jobs:
path: /tmp/memuse.txt
Test Group 0:
<<: *can_disable_fibers
<<: *build_machine_environment
steps:
- run:
@@ -217,6 +245,7 @@ jobs:
<<: *run_env_change
- attach_workspace:
at: .
- run: *set_fibers_env
- run:
name: "Print environment"
command: printenv
@@ -233,7 +262,7 @@ jobs:
--headless \
--junit ./tmp/results/junit/0.xml \
--without-tag "custom-warehouse"
no_output_timeout: 20m
no_output_timeout: 30m
- run:
<<: *run_save_node_bin
- store_test_results:
@@ -249,6 +278,7 @@ jobs:
path: /tmp/memuse.txt
Test Group 1:
<<: *can_disable_fibers
<<: *build_machine_environment
steps:
- run:
@@ -257,6 +287,7 @@ jobs:
<<: *run_env_change
- attach_workspace:
at: .
- run: *set_fibers_env
- run:
name: "Print environment"
command: printenv
@@ -289,6 +320,7 @@ jobs:
path: /tmp/memuse.txt
Test Group 2:
<<: *can_disable_fibers
<<: *build_machine_environment
steps:
- run:
@@ -297,6 +329,7 @@ jobs:
<<: *run_env_change
- attach_workspace:
at: .
- run: *set_fibers_env
- run:
name: "Print environment"
command: printenv
@@ -329,6 +362,7 @@ jobs:
path: /tmp/memuse.txt
Test Group 3:
<<: *can_disable_fibers
<<: *build_machine_environment
steps:
- run:
@@ -337,13 +371,14 @@ jobs:
<<: *run_env_change
- attach_workspace:
at: .
- run: *set_fibers_env
- run:
name: "Print environment"
command: printenv
- run:
name: "Running self-test (Test Group 3)"
command: |
if [ -f ./tmp/test-groups/3.txt ]; then TEST_GROUP=$(<./tmp/test-groups/3.txt); elif [ -f ./tmp/test-groups/0.txt ]; then TEST_GROUP=XXXXX; else TEST_GROUP='^c[p-z]|^[d-g]|^h[a-e]'; fi
if [ -f ./tmp/test-groups/3.txt ]; then TEST_GROUP=$(<./tmp/test-groups/3.txt); elif [ -f ./tmp/test-groups/0.txt ]; then TEST_GROUP=XXXXX; else TEST_GROUP='^c[p-z]|^h[a-e]'; fi
echo $TEST_GROUP;
eval $PRE_TEST_COMMANDS;
./meteor self-test \
@@ -353,7 +388,7 @@ jobs:
--headless \
--junit ./tmp/results/junit/3.xml \
--without-tag "custom-warehouse"
no_output_timeout: 20m
no_output_timeout: 30m
- run:
<<: *run_save_node_bin
- store_test_results:
@@ -369,6 +404,7 @@ jobs:
path: /tmp/memuse.txt
Test Group 4:
<<: *can_disable_fibers
<<: *build_machine_environment
steps:
- run:
@@ -377,6 +413,7 @@ jobs:
<<: *run_env_change
- attach_workspace:
at: .
- run: *set_fibers_env
- run:
name: "Print environment"
command: printenv
@@ -409,6 +446,7 @@ jobs:
path: /tmp/memuse.txt
Test Group 5:
<<: *can_disable_fibers
<<: *build_machine_environment
steps:
- run:
@@ -417,6 +455,7 @@ jobs:
<<: *run_env_change
- attach_workspace:
at: .
- run: *set_fibers_env
- run:
name: "Print environment"
command: printenv
@@ -449,6 +488,7 @@ jobs:
path: /tmp/memuse.txt
Test Group 6:
<<: *can_disable_fibers
<<: *build_machine_environment
steps:
- run:
@@ -457,6 +497,7 @@ jobs:
<<: *run_env_change
- attach_workspace:
at: .
- run: *set_fibers_env
- run:
name: "Print environment"
command: printenv
@@ -489,6 +530,7 @@ jobs:
path: /tmp/memuse.txt
Test Group 7:
<<: *can_disable_fibers
<<: *build_machine_environment
steps:
- run:
@@ -497,6 +539,7 @@ jobs:
<<: *run_env_change
- attach_workspace:
at: .
- run: *set_fibers_env
- run:
name: "Print environment"
command: printenv
@@ -529,6 +572,7 @@ jobs:
path: /tmp/memuse.txt
Test Group 8:
<<: *can_disable_fibers
<<: *build_machine_environment
steps:
- run:
@@ -537,6 +581,7 @@ jobs:
<<: *run_env_change
- attach_workspace:
at: .
- run: *set_fibers_env
- run:
name: "Print environment"
command: printenv
@@ -569,6 +614,7 @@ jobs:
path: /tmp/memuse.txt
Test Group 9:
<<: *can_disable_fibers
<<: *build_machine_environment
steps:
- run:
@@ -577,6 +623,7 @@ jobs:
<<: *run_env_change
- attach_workspace:
at: .
- run: *set_fibers_env
- run:
name: "Print environment"
command: printenv
@@ -609,6 +656,7 @@ jobs:
path: /tmp/memuse.txt
Test Group 10:
<<: *can_disable_fibers
<<: *build_machine_environment
steps:
- run:
@@ -617,6 +665,7 @@ jobs:
<<: *run_env_change
- attach_workspace:
at: .
- run: *set_fibers_env
- run:
name: "Print environment"
command: printenv
@@ -648,6 +697,46 @@ jobs:
- store_artifacts:
path: /tmp/memuse.txt
Test Group 11:
<<: *build_machine_environment
steps:
- run:
<<: *run_log_mem_use
- run:
<<: *run_env_change
- attach_workspace:
at: .
- run:
name: "Print environment"
command: printenv
- run:
name: "Running self-test (Test Group 11)"
command: |
if [ -f ./tmp/test-groups/11.txt ]; then TEST_GROUP=$(<./tmp/test-groups/11.txt); elif [ -f ./tmp/test-groups/0.txt ]; then TEST_GROUP=XXXXX; else TEST_GROUP='^[d-g]'; fi
echo $TEST_GROUP;
eval $PRE_TEST_COMMANDS;
./meteor self-test \
"$TEST_GROUP" \
--retries ${METEOR_SELF_TEST_RETRIES} \
--exclude "${SELF_TEST_EXCLUDE}" \
--headless \
--junit ./tmp/results/junit/11.xml \
--without-tag "custom-warehouse"
no_output_timeout: 30m
- run:
<<: *run_save_node_bin
- store_test_results:
path: ./tmp/results
- persist_to_workspace:
root: .
paths: ./tmp/results/junit
- store_artifacts:
path: ./tmp/results
- store_artifacts:
path: /tmp/core_dumps
- store_artifacts:
path: /tmp/memuse.txt
# Test the JSDoc declarations which live within this codebase against the
# Meteor Docs (https://github.com/meteor/docs) repository, where they'll
# eventually be consumed. This test aims to provide an early warning of
@@ -658,6 +747,7 @@ jobs:
docker:
# This Node version should match that in the meteor/docs CircleCI config.
- image: meteor/circleci:android-28-node-12
resource_class: large
environment:
CHECKOUT_METEOR_DOCS: /home/circleci/test_docs
steps:
@@ -687,6 +777,7 @@ jobs:
npm test
Clean Up:
<<: *can_disable_fibers
<<: *build_machine_environment
steps:
- attach_workspace:
@@ -769,42 +860,58 @@ workflows:
- Docs
- Get Ready
- Isolated Tests:
<<: *matrix_for_fibers
requires:
- Get Ready
- Test Group 0:
<<: *matrix_for_fibers
requires:
- Get Ready
- Test Group 1:
<<: *matrix_for_fibers
requires:
- Get Ready
- Test Group 2:
<<: *matrix_for_fibers
requires:
- Get Ready
- Test Group 3:
<<: *matrix_for_fibers
requires:
- Get Ready
- Test Group 4:
<<: *matrix_for_fibers
requires:
- Get Ready
- Test Group 5:
<<: *matrix_for_fibers
requires:
- Get Ready
- Test Group 6:
<<: *matrix_for_fibers
requires:
- Get Ready
- Test Group 7:
<<: *matrix_for_fibers
requires:
- Get Ready
- Test Group 8:
<<: *matrix_for_fibers
requires:
- Get Ready
- Test Group 9:
<<: *matrix_for_fibers
requires:
- Get Ready
- Test Group 10:
<<: *matrix_for_fibers
requires:
- Get Ready
- Test Group 11:
requires:
- Get Ready
- Clean Up:
<<: *matrix_for_fibers
requires:
- Isolated Tests
- Test Group 0
@@ -818,3 +925,4 @@ workflows:
- Test Group 8
- Test Group 9
- Test Group 10
- Test Group 11

View File

@@ -67,7 +67,6 @@ tools/runners/run-app.js
tools/runners/run-mongo.js
tools/runners/run-proxy.js
tools/runners/run-selenium.js
tools/runners/run-updater.js
tools/packaging/package-client.js
tools/packaging/package-map.js

19
.github/workflows/check-code-style.yml vendored Normal file
View File

@@ -0,0 +1,19 @@
name: Check code-style
on:
push:
paths:
- 'npm-packages/meteor-installer/**'
pull_request:
paths:
- 'npm-packages/meteor-installer/**'
jobs:
check-code-style:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 14.x
- run: npm ci
- name: Run ESLint@8
run: npx eslint@8 "./npm-packages/meteor-installer/**/*.js"

15
.github/workflows/check-syntax.yml vendored Normal file
View File

@@ -0,0 +1,15 @@
name: Check legacy syntax
on:
- push
- pull_request
jobs:
check-code-style:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18.x
- run: cd scripts/admin/check-legacy-syntax && npm ci
- name: Check syntax
run: cd scripts/admin/check-legacy-syntax && node check-syntax.js

View File

@@ -10,14 +10,14 @@ jobs:
run:
working-directory: docs/
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 12.x
- name: Build the Docs
run: npm ci && npm run build
- name: Deploy to Netlify for preview
uses: nwtgck/actions-netlify@v1.2.2
uses: nwtgck/actions-netlify@v1.2.4
with:
publish-dir: './docs/public/'
production-branch: devel

View File

@@ -10,14 +10,14 @@ jobs:
run:
working-directory: guide/
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 12.x
- name: Build the Guide
run: npm ci && npm run build
- name: Deploy to Netlify for preview
uses: nwtgck/actions-netlify@v1.2.2
uses: nwtgck/actions-netlify@v1.2.4
with:
publish-dir: './guide/public'
production-branch: devel

View File

@@ -9,10 +9,14 @@ name: Labeler
on:
- pull_request_target
permissions:
contents: read # to determine modified files (actions/labeler)
pull-requests: write # to add labels to PRs (actions/labeler)
jobs:
label:
runs-on: ubuntu-latest
steps:
- uses: actions/labeler@v3
- uses: actions/labeler@v4
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"

View File

@@ -6,6 +6,10 @@ on:
pull_request:
paths:
- "npm-packages/eslint-plugin-meteor/**"
permissions:
contents: read # to fetch code (actions/checkout)
jobs:
test:
runs-on: ubuntu-latest
@@ -16,9 +20,9 @@ jobs:
matrix:
node-version: [12.x, 14.x]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: npm

View File

@@ -6,6 +6,10 @@ on:
pull_request:
paths:
- "npm-packages/meteor-babel/**"
permissions:
contents: read # to fetch code (actions/checkout)
jobs:
test:
runs-on: ubuntu-latest
@@ -16,9 +20,9 @@ jobs:
matrix:
node-version: [12.x, 14.x]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: npm

View File

@@ -6,6 +6,10 @@ on:
pull_request:
paths:
- "npm-packages/meteor-promise/**"
permissions:
contents: read # to fetch code (actions/checkout)
jobs:
test:
runs-on: ubuntu-latest
@@ -16,9 +20,9 @@ jobs:
matrix:
node-version: [12.x, 14.x]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: npm

3
.gitignore vendored
View File

@@ -29,6 +29,3 @@ mongo-test-output
# core packages shouldn't have .versions files
packages/*/.versions
# packages shouldn't have .npm on Git
packages/**/.npm

View File

@@ -8,13 +8,17 @@ cache:
- ".meteor"
- ".babel-cache"
script:
- export phantom=false
# to skip Downloading Chromium on every run
# https://github.com/dfernandez79/puppeteer/blob/main/README.md#q-chromium-gets-downloaded-on-every-npm-ci-run-how-can-i-cache-the-download
- export PUPPETEER_DOWNLOAD_PATH=~/.npm/chromium
- travis_retry ./packages/test-in-console/run.sh
env:
- CXX=g++-4.8
global:
- CXX=g++-4.8
- phantom=false
- PUPPETEER_DOWNLOAD_PATH=~/.npm/chromium
jobs:
# We don't want to run the tests without fibers anymore.
# - DISABLE_FIBERS=1
# Use a different flag, since node would use false as a string.
- FIBERS_ENABLED=1
addons:
apt:
sources:

View File

@@ -8,9 +8,9 @@
<div align="center">
[![TravisCI Status](https://travis-ci.org/meteor/meteor.svg?branch=devel)](https://travis-ci.org/meteor/meteor)
[![CircleCI Status](https://circleci.com/gh/meteor/meteor/tree/devel.svg?style=shield&circle-token=c2d3c041506bd493ef3795ffa4448684cfce97b8)](https://circleci.com/gh/meteor/meteor/tree/devel)
[![built with Meteor](https://img.shields.io/badge/Meteor-2.7.4-green?logo=meteor&logoColor=white)](https://meteor.com)
[![Travis CI Status](https://api.travis-ci.com/meteor/meteor.svg?branch=devel)](https://app.travis-ci.com/github/meteor/meteor)
[![CircleCI Status](https://circleci.com/gh/meteor/meteor.svg?style=svg)](https://app.circleci.com/pipelines/github/meteor/meteor?branch=devel)
[![built with Meteor](https://img.shields.io/badge/Meteor-2.12-green?logo=meteor&logoColor=white)](https://meteor.com)
</div>
@@ -28,7 +28,7 @@ Meteor is an **ultra-simple** environment for building **modern** web applicatio
### 📚 **Create your applications using modern JavaScript**
Benefit from the latest technology updates to fastly prototype and develop your applications.
Benefit from the latest technology updates to rapidly prototype and develop your applications.
<hr>
@@ -46,7 +46,7 @@ Use the same code whether youre developing for web, iOS, Android, or desktop
# 🔥 Getting Started
What about to try a getting started tutorial in your favorite technology?
How about trying a getting started tutorial in your favorite technology?
| [<img align="left" width="25" src="https://www.quantumversity.com/wp-content/uploads/2020/11/Adding-Authentication-to-React-with-Auth0-Login-and-Profile.png"> React](https://react-tutorial.meteor.com/) |
| - |

View File

@@ -1,6 +1,11 @@
title: Meteor API Docs
subtitle: API Docs
versions:
- '2.12'
- '2.11'
- '2.10'
- '2.9'
- '2.8'
- '2.7'
- '2.6'
- '2.5'
@@ -85,6 +90,7 @@ sidebar_categories:
Command Line:
- commandline
- environment-variables
- using-core-types
Troubleshooting:
- expired-certificate
- windows

View File

@@ -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!

View File

@@ -0,0 +1,29 @@
## 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:<release-branch-name> is:merged
```
or in GH Cli:
```bash
gh pr list --state merged --base <release-branch-name>
```
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.

View File

@@ -0,0 +1,109 @@
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 'ERR_NO_VERSION';
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);
}
}
const main = 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<string>}
*/
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);
}
}
main().then(_ => _);

File diff suppressed because it is too large Load Diff

View File

@@ -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!

View File

@@ -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!

View File

@@ -0,0 +1,151 @@
## 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@get-version`:
- Added `es5` compatible syntax.
* `browser-policy-content@get-version`:
- Added `es5` compatible syntax.
* `browser-policy-framing@get-version`:
- Added `es5` compatible syntax.
* `browser-policy@get-version`:
- Updated test name.
* `callback-hook@get-version`:
- Added async hooks possibility to make async migrations easier.
* `context@get-version`:
- 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@get-version`:
- Added `es5` compatible syntax by adding the `ecmascript` package.
* `dynamic-import@get-version`:
- Added `es5` compatible syntax.
* `ecmascript@get-version`:
- Updated tests location.
* `ecmascript-runtime@get-version`:
- Updated npm dependencies.
* `email@2.2.5`:
- Updated type `CustomEmailOptions` to be a type instead of an interface.
* `hot-module-replacement@get-version`:
- 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@get-version`:
- Updated to be able to track old api usage.
* `modules-runtime-hot@get-version`:
- 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@get-version`:
- 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@get-version`:
- Updated types and updated JSDocs for `Tracker.withComputation`.
* `underscore@get-version`:
- 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).

View File

@@ -0,0 +1,12 @@
[//]: # (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)

File diff suppressed because it is too large Load Diff

View File

@@ -23,7 +23,8 @@
"underscore": "1.13.1"
},
"scripts": {
"build": "jsdoc/jsdoc.sh && chexo meteor-hexo-config -- generate",
"generate-history": "node ./generators/changelog/script.js",
"build": "npm run generate-history && jsdoc/jsdoc.sh && chexo meteor-hexo-config -- generate",
"clean": "hexo clean; rm data/data.js data/names.json",
"test": "npm run clean; npm run build",
"predeploy": "npm run build",

View File

@@ -69,6 +69,11 @@ client, no arguments are passed.
The `connection` object the request came in on. See
[`Meteor.onConnection`](#meteor_onconnection) for details.
{% enddtdd %}
{% dtdd name:"collection" type:"Object" %}
The `collection` The name of the Mongo.Collection
or the Mongo.Collection object to hold the users.
{% enddtdd %}
</dl>
{% apibox "AccountsClient" %}
@@ -212,6 +217,11 @@ are called with a single argument, the attempt info object:
[`Meteor.onConnection`](#meteor_onconnection) for details.
{% enddtdd %}
{% dtdd name:"collection" type:"Object" %}
The `collection` The name of the Mongo.Collection
or the Mongo.Collection object to hold the users.
{% enddtdd %}
{% dtdd name:"methodName" type:"String" %}
The name of the Meteor method being used to login.
{% enddtdd %}
@@ -315,6 +325,15 @@ Accounts.setAdditionalFindUserOnExternalLogin(({serviceName, serviceData}) => {
}
})
```
{% apibox "AccountsServer#registerLoginHandler" %}
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: <username> }, password: <password> }`,or `{ user: { email: <email> }, password: <password> }`.
The login handler should return `undefined` if it's not going to handle the login request or else the login result object.
<h2 id="accounts_rate_limit">Rate Limiting</h2>

View File

@@ -216,6 +216,14 @@ collections will be empty.
Equivalent to [`find`](#find)`(selector, options).`[`fetch`](#fetch)`()[0]` with
`options.limit = 1`.
{% apibox "Mongo.Collection#countDocuments" %}
Similar to `count`, but returns a `Promise`. For a faster version, see `estimatedDocumentCount`.
{% apibox "Mongo.Collection#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.
{% apibox "Mongo.Collection#insert" %}
Add a document to the collection. A document is just an object, and

View File

@@ -54,3 +54,13 @@ if (Meteor.isServer) {
{% apibox "Meteor.settings" %}
{% apibox "Meteor.release" %}
{% apibox "Meteor.isModern" %}
{% apibox "Meteor.gitCommitHash" %}
{% apibox "Meteor.isTest" %}
{% apibox "Meteor.isAppTest" %}
{% apibox "Meteor.isPackageTest" %}

View File

@@ -23,8 +23,7 @@ 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://nodemailer.com/smtp/well-known/#supported-services)
you can setup the sending options in your app settings like this:
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
{
@@ -83,6 +82,28 @@ Meteor.call(
'This is a test of Email.send.'
);
```
{% apibox "Email.sendAsync" %}
`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]);
// Let other method calls from the same client start running, without
// waiting for the email sending to complete.
this.unblock();
return Email.sendAsync({ to, from, subject, text }).catch(err => {
//
});
}
});
```
{% apibox "Email.hookSend" %}

View File

@@ -130,7 +130,7 @@ sanitized version is available, the client gets
{% apibox "Meteor.call" %}
This is how to invoke a method. It will run the method on the server. If a
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
@@ -186,12 +186,22 @@ 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).
{% apibox "Meteor.callAsync" %}
`Meteor.callAsync` is just like `Meteor.call`, except that it'll return a promise that you need to solve to get the result.
> Be aware that you should never call a method (async or not) after calling `Meteor.callAsync` without waiting for the promise to solve. To understand why, please read this part of our [migration guide](https://guide.meteor.com/2.8-migration.html#the-limitations).
{% apibox "Meteor.apply" %}
`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.
{% apibox "Meteor.applyAsync" %}
`Meteor.applyAsync` is just like `Meteor.apply`, except it is an async function, and it will consider that the stub is async.
<h2 id="ddpratelimiter"><span>DDPRateLimiter</span></h2>
Customize rate limiting for methods and subscriptions to avoid a high load of WebSocket messages in your app.
@@ -239,3 +249,35 @@ DDPRateLimiter.addRule(loginRule, 5, 1000);
```
{% apibox "DDPRateLimiter.removeRule" nested:true instanceDelimiter:. %}
{% apibox "DDPRateLimiter.setErrorMessage" nested:true instanceDelimiter:. %}
{% apibox "DDPRateLimiter.setErrorMessageOnRule" nested:true instanceDelimiter:. %}
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');
```

View File

@@ -59,6 +59,10 @@ email with a link the user can use to verify their email address.
{% apibox "Accounts.verifyEmail" %}
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).
@@ -89,6 +93,9 @@ 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.
{% apibox "Accounts.setPassword" %}
{% apibox "Accounts.sendResetPasswordEmail" %}

View File

@@ -303,7 +303,7 @@ You can use the following methods to set or get the publication strategy for pub
{% apibox "setPublicationStrategy" %}
For publication `foo`, you can set `NO_MERGE` strategy as shown:
For the `foo` collection, you can set the `NO_MERGE` strategy as shown:
```js
import { DDPServer } from "meteor/ddp-server";

View File

@@ -91,6 +91,8 @@ Template.main.events({
// Clicking the button will change the page to say "We've always been at war with Eurasia"
```
{% apibox "ReactiveDict#delete" %}
{% apibox "ReactiveDict#equals" %}
If value is a scalar, then these two expressions do the same thing:

View File

@@ -80,12 +80,57 @@ 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. However, the async call back function will only be dependent on reactive functions called prior to any called functions that return a promise.
`Tracker.autorun` can accept an `async` callback function.
However, to make the async call reactive, you should wrap your async function in
a `Tracker.withComputation` call.
```javascript
Tracker.autorun(async function example1(computation) {
let asyncData = await asyncDataFunction();
let users =
await Tracker.withComputation(computation, () => Meteor.users.find({}).fetch());
});
```
> If you want to get computation in other way you can use `Tracker.currentComputation`
{% apibox "Tracker.withComputation" %}
In general, the rules to use `Tracker.withComputation` like this:
1. `async` function *before the first* `await` if just like a sync one.
2. `async` function *after the first* `await` looses the `Tracker.currentComputation`
but it can be restored using `Tracker.withComputation`, *but only within the callback*.
If you have for example:
```javascript
Tracker.autorun(async function (computation) {
let asyncData = await someAsyncCall();
let links = await LinksCollection.find({}).fetch();
// code above will not trigger reruns.
});
```
You can make this example reactive by wrapping the `Meteor.users.find` call in a `Tracker.withComputation` call:
```javascript
Tracker.autorun(async function (computation) {
let asyncData = await someAsyncCall();
let users =
await Tracker.withComputation(computation, () => Meteor.users.find({}).fetch());
// code above will trigger reruns.
});
```
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 asyncData = await asyncDataFunction();
let users = Meteor.users.find({}).fetch();
});
```
@@ -96,10 +141,9 @@ Example 2 - autorun `example2()` **is** dependent on reactive changes to the Me
```javascript
Tracker.autorun(async function example2() {
let users = Meteor.users.find({}).fetch();
let asyncData = await asyncDataFunction();
let asyncData = await asyncDataFunction();
});
```
{% apibox "Tracker.flush" %}
Normally, when you make changes (like writing to the database),

View File

@@ -91,6 +91,16 @@ You can pass an absolute or relative path.
**Flags for default packages**
`--prototype`
Creates a package with the prototype purpose packages(`autopublish` and `insecure`)
if you use them you can change your collections quickly,
but it is not supposed to be used in production.
For more information about security you can check
it [here](https://guide.meteor.com/security.html#checklist)
It can be used together with other flags that create apps such as `--react` or `--typescript`.
`--bare`
Creates a basic, blaze project.
@@ -129,7 +139,19 @@ Create a basic [Blaze](https://blazejs.org/) app.
`--vue`
Create a basic vue-based app. See the [Vue guide](https://guide.meteor.com/vue.html)
Create a basic [Vue 3](https://vuejs.org/) app.
`--react`
Create a basic react app. See the section on [React tutorial](https://guide.meteor.com/react.html#react-tutorial)
for more information. This is the default.
`--angular`
for more information.
`--vue-2`
Create a basic vue2-based app. See the [Vue guide](https://vue-tutorial.meteor.com/)
for more information.
`--svelte`
@@ -140,41 +162,360 @@ Create a basic [Svelte](https://svelte.dev/) app.
Create a basic [React](https://reactjs.org) + [Tailwind CSS](https://tailwindcss.com) app.
`--chakra-ui`
Create a basic [React](https://reactjs.org) + [Chakra-UI](https://chakra-ui.com/) app.
`--solid`
Create a basic [Solid](https://www.solidjs.com/) app.
**Packages**
| | Default (`--react`) | `--bare` | `--full` | `--minimal` | `--blaze`| `--apollo` | `--vue` | `--svelte` | `--tailwind` |
|------------------------------------------------------------------------------------------------------|:-------------------:|:---------:|:---------:|:-----------:|:--------:|:----------:|:-------:|:----------:|:------------:|
| [autopublish](https://atmospherejs.com/meteor/autopublish) |X| | | |X| | |X|X|
| [akryum:vue-component](https://atmospherejs.com/akryum/vue-component) | | | | | | |X| | |
| [apollo](https://atmospherejs.com/meteor/apollo) | | | | | |X| | | |
| [blaze-html-templates](https://atmospherejs.com/meteor/blaze-html-templates) | | |X| |X| | | | |
| [ecmascript](https://atmospherejs.com/meteor/ecmascript) |X|X|X|X|X|X|X|X|X|
| [es5-shim](https://atmospherejs.com/meteor/es5-shim) |X|X|X|X|X|X|X|X|X|
| [hot-module-replacement](https://atmospherejs.com/meteor/hot-module-replacement) |X| | | |X|X| | |X|
| [insecure](https://atmospherejs.com/meteor/insecure) |X| | | |X| | |X|X|
| [johanbrook:publication-collector](https://atmospherejs.com/meteor/johanbrook/publication-collector) | | |X| | |X| | |
| [jquery](https://atmospherejs.com/meteor/jquery) | | |X| |X| | | |
| [ostrio:flow-router-extra](https://atmospherejs.com/meteor/ostrio/flow-router-extra) | | |X|| | | | | |
| [less](https://atmospherejs.com/meteor/less) | | |X| | | | | | |
| [meteor](https://atmospherejs.com/meteor/meteor) | | | |X| | | | | |
| [meteor-base](https://atmospherejs.com/meteor/meteor-base) |X|X|X| |X|X|X|X|X|
| [mobile-experience](https://atmospherejs.com/meteor/mobile-experience) |X|X|X| |X|X|X|X|X|
| [mongo](https://atmospherejs.com/meteor/mongo) |X|X|X| |X|X|X|X|X|
| [meteortesting:mocha](https://atmospherejs.com/meteortesting/mocha) | | |X| | | |X| |
| [reactive-var](https://atmospherejs.com/meteor/reactive-var) |X|X|X| |X|X|X|X|X|
| [rdb:svelte-meteor-data](https://atmospherejs.com/rdb/svelte-meteor-data) | | | | | | | |X| |
| [server-render](https://atmospherejs.com/meteor/server-render) | | | |X| |X|X| | |
| [shell-server](https://atmospherejs.com/meteor/shell-server) | |X| |X|X|X|X|X |
| [standard-minifier-css](https://atmospherejs.com/meteor/standard-minifier-css) |X|X|X|X|X|X|X|X|X|
| [standard-minifier-js](https://atmospherejs.com/meteor/standard-minifier-js) |X|X|X|X|X|X|X|X|X|
| [static-html](https://atmospherejs.com/meteor/static-html) | |X| |X| |X|X|X| |
| [svelte:compiler](https://atmospherejs.com/svelte/compiler) | | | | | | | |X| |
| [swydo:graphql](https://atmospherejs.com/swydo/graphql) | | | | | |X| | | |
| [tailwindcss](https://tailwindcss.com) | |X|X| |X| |X| |X|
| [tracker](https://atmospherejs.com/meteor/tracker) | |X|X| |X| |X| | |
| [typescript](https://atmospherejs.com/meteor/typescript) |X|X|X|X|X|X|X|X|X|
| [webapp](https://atmospherejs.com/meteor/webapp) | | | |X| | | | | |
| [react-meteor-data](https://atmospherejs.com/meteor/react-meteor-data) |X| | | | | | | |X|
| | Default (`--react`) | `--bare` | `--full` | `--minimal` | `--blaze` | `--apollo` | `--vue-2` | `--svelte` | `--tailwind` | `--chakra-ui` | `--solid` | `--vue` |
|------------------------------------------------------------------------------------------------------|:-------------------:|:--------:|:--------:|:-----------:|:---------:|:----------:|:---------:|:----------:|:------------:|:-------------:|:---------:|:-------:|
| [autopublish](https://atmospherejs.com/meteor/autopublish) | X | | | | X | | | | X | X | X | |
| [akryum:vue-component](https://atmospherejs.com/akryum/vue-component) | | | | | | | X | | | | | |
| [apollo](https://atmospherejs.com/meteor/apollo) | | | | | | X | | | | | | |
| [blaze-html-templates](https://atmospherejs.com/meteor/blaze-html-templates) | | | X | | X | | | | | | | |
| [ecmascript](https://atmospherejs.com/meteor/ecmascript) | X | X | X | X | X | X | X | X | X | X | X | X |
| [es5-shim](https://atmospherejs.com/meteor/es5-shim) | X | X | X | X | X | X | X | X | X | X | X | X |
| [hot-module-replacement](https://atmospherejs.com/meteor/hot-module-replacement) | X | | | | X | X | | X | X | X | X | X |
| [insecure](https://atmospherejs.com/meteor/insecure) | X | | | | X | | | | X | X | X | X |
| [johanbrook:publication-collector](https://atmospherejs.com/meteor/johanbrook/publication-collector) | | | X | | | X | | | | | | |
| [jquery](https://atmospherejs.com/meteor/jquery) | | | X | | X | | | | | | | |
| [less](https://atmospherejs.com/meteor/less) | | | X | | | | | | | | | |
| [meteor](https://atmospherejs.com/meteor/meteor) | | | | X | | | | | | | | |
| [meteor-base](https://atmospherejs.com/meteor/meteor-base) | X | X | X | | X | X | X | X | X | X | X | X |
| [mobile-experience](https://atmospherejs.com/meteor/mobile-experience) | X | X | X | | X | X | X | X | X | X | X | X |
| [mongo](https://atmospherejs.com/meteor/mongo) | X | X | X | | X | X | X | X | X | X | X | X |
| [meteortesting:mocha](https://atmospherejs.com/meteortesting/mocha) | | | X | | | | X | | | | | |
| [ostrio:flow-router-extra](https://atmospherejs.com/meteor/ostrio/flow-router-extra) | | | X | | | | | | | | | |
| [react-meteor-data](https://atmospherejs.com/meteor/react-meteor-data) | X | | | | | | | | X | X | | |
| [reactive-var](https://atmospherejs.com/meteor/reactive-var) | X | X | X | | X | X | X | | X | X | X | X |
| [server-render](https://atmospherejs.com/meteor/server-render) | | | | X | | X | X | | | | | |
| [shell-server](https://atmospherejs.com/meteor/shell-server) | | X | | X | X | X | X | X | X | X | X | X |
| [standard-minifier-css](https://atmospherejs.com/meteor/standard-minifier-css) | X | X | X | X | X | X | X | X | X | X | X | X |
| [standard-minifier-js](https://atmospherejs.com/meteor/standard-minifier-js) | X | X | X | X | X | X | X | X | X | X | X | X |
| [static-html](https://atmospherejs.com/meteor/static-html) | | X | | X | | X | X | X | | | | |
| [swydo:graphql](https://atmospherejs.com/swydo/graphql) | | | | | | X | | | | | | |
| [tailwindcss](https://tailwindcss.com) | | X | X | | X | | X | | X | | | |
| [tracker](https://atmospherejs.com/meteor/tracker) | | X | X | | X | | X | | | | | |
| [typescript](https://atmospherejs.com/meteor/typescript) | X | X | X | X | X | X | X | X | X | X | X | |
| [vite:bundler](https://atmospherejs.com/vite/bundler) | | | | | | | | | | | X | X |
| [webapp](https://atmospherejs.com/meteor/webapp) | | | | X | | | | | | | | |
| [zodern:melte](https://atmospherejs.com/zodern/melte) | | | | | | | | X | | | | |
| [zodern:types](https://atmospherejs.com/zodern/types) | | | | | | | | X | | | | |
<h2 id="meteorgenerate"> meteor generate </h2>
``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:
<h3 id="meteorgenerate-collection.js">collection.js</h3>
```js
import { Mongo } from 'meteor/mongo';
export const CustomerCollection = new Mongo.Collection('customer');
```
<h3 id="meteorgenerate-methods.js">methods.js</h3>
```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
});
```
<h3 id="meteorgenerate-publication.js">publication.js</h3>
```js
import { Meteor } from 'meteor/meteor';
import { CustomerCollection } from './collection';
Meteor.publish('allCustomers', function publishCustomers() {
return CustomerCollection.find({});
});
```
<h3 id="meteorgenerate-index.js">index.js</h3>
```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.
<h3 id="meteorgenerate-path">path option</h3>
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)
<h3 id="meteorgenerate-collection.ts">collection.ts</h3>
```typescript
import { Mongo } from 'meteor/mongo';
export type AnotherCustomer = {
_id?: string;
name: string;
createdAt: Date;
}
export const AnotherCustomerCollection = new Mongo.Collection<AnotherCustomer, AnotherCustomer>('another-customer');
```
<h3 id="meteorgenerate-methods.ts">methods.ts</h3>
```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<AnotherCustomer>) {
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
});
```
<h3 id="meteorgenerate-publications.ts">publications.ts</h3>
```typescript
import { Meteor } from 'meteor/meteor';
import { AnotherCustomerCollection } from './collection';
Meteor.publish('allAnotherCustomers', function publishAnotherCustomers() {
return AnotherCustomerCollection.find({});
});
```
<h3 id="meteorgenerate-index.ts">index.ts</h3>
```typescript
export * from './collection';
export * from './methods';
export * from './publications';
```
---
<h3 id="meteorgenerate-wizard"> Using the Wizard </h3>
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)
---
<h3 id="meteorgenerate-templating"> Using your own template </h3>
`--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.
<h3 id="meteorgenerate-template-rename"> How to rename things?</h3>
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);
})
}
```
<h3 id="meteorgenerate-template-faq"> How to bring your own templates? </h3>
`--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);
}
```
<h2 id="meteorloginlogout">meteor login / logout</h2>
@@ -258,7 +599,7 @@ Your project should be a git repository as the commit hash is going to be used t
The `cache-build` option is available since Meteor 1.11.
{% endpullquote %}
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`. To see more about the difference and prices of each one you can check it [here](https://www.meteor.com/cloud#pricing-section).
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).
{% pullquote warning %}
The `--container-size` option is available since Meteor 2.4.1.
@@ -459,6 +800,16 @@ regular expression.
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:
```
meteor show METEOR
```
Get information on all meteor releases (including intermediate releases)"
```
meteor show --show-all METEOR
```
<h2 id="meteorpublish">meteor publish</h2>
@@ -575,7 +926,7 @@ from npm to your `node_modules` directory and save its usage in your
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 libaries.
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.
@@ -586,8 +937,8 @@ The `meteor node` command calls the
[`node`](https://nodejs.org) version bundled with Meteor itself.
> This is not to be confused with [`meteor shell`](#meteorshell), 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.
> 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)

View File

@@ -1,35 +1,48 @@
---
title: Install
title: Install Meteor.js
---
Meteor currently supports **OS X, Windows, and Linux**. Only 64-bit is supported.
Apple M1 is natively supported from Meteor 2.5.1 onward (for older versions, you will need to run with a [rosetta terminal](https://osxdaily.com/2020/11/18/how-run-homebrew-x86-terminal-apple-silicon-mac/)).
<h2 id="prereqs">Prerequisites and useful information</h2>
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.
- 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/)
- Meteor works with Node.js version >= 10 and <= 14, for Windows you need to have Node.js installed for running the npm installer (tip: you can use [nvm](https://github.com/nvm-sh/nvm) for managing node versions).
- Meteor supports Windows 7/Windows Server 2008 R2 and up.
<h2 id="prereqs">Prerequisites</h2>
<h3 id="prereqs-node">Node.js version</h3>
- 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.
<h3 id="prereqs-os">Operating System (OS)</h3>
- 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.
<h3 id="prereqs-mobile">Mobile Development</h3>
- iOS development requires the latest Xcode.
- **Do not install meteor npm in your project's package.json by any means, the npm library is only an installer.**
<h2 id="installation">Installation</h2>
Install the latest official Meteor release from your terminal running one of the commands below.
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.
For Linux and OS X:
> Run `node -v` to ensure you are using Node.js 14.
```bash
curl https://install.meteor.com/ | sh
```
For Windows (Node.js is required):
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
```
> Do not install the npm Meteor Tool in your project's package.json. This library is just an installer.
<h2 id="troubleshooting">Troubleshooting</h2>

View File

@@ -3,6 +3,8 @@ title: appcache
description: Documentation of Meteor's `appcache` package.
---
> 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

View File

@@ -50,3 +50,19 @@ module.exports = {
### Tailwind CSS
Tailwind CSS is fully supported. Since HMR applies updates to js files earlier than the css is updated, there can be a delay when using a Tailwind CSS class the first time before the styles are applied.
### Debbuging
_Since Meteor.js 2.11.0 in this [PR](https://github.com/meteor/meteor/pull/12478) we have a debbug mode for the minifier_
#### How standard-minifier-css becomes verbose
- Either of the common debugging commandline arguments
- `--verbose`
- `--debug`
- Environment variable
- `DEBUG_CSS`
Side notes:
`DEBUG_CSS=false` or `DEBUG_CSS=0` will prevent it from being verbose regardless of `--verbose` or `--debug` commandline arguments, because `DEBUG_CSS` is specific.

View File

@@ -160,3 +160,4 @@ WebApp.addUpdatedNotifyHook(({arch, manifest, runtimeConfig}) => {
{% apibox "WebApp.addUpdatedNotifyHook" %}
{% apibox "addUpdatedNotifyHookCallback(options)" %}
{% apibox "main" %}

View File

@@ -5,7 +5,9 @@ description: Describes the high-level features and actions for the Meteor projec
## Introduction
Last update: Setember 14, 2022.
**Quick update moving items to Finished: June 1, 2023**
**Last new items added: September 14, 2022.**
This document describes the high-level features and actions for the Meteor project in the near-to-medium term future.
The description of many items include sentences and ideas from Meteor community members.
@@ -17,14 +19,7 @@ Contributors are encouraged to focus their efforts on work that aligns with the
> If you have new feature requests or ideas you should open a new [discussion](https://github.com/meteor/meteor/discussions/new).
### Priorities for 2022
- Change how Meteor executes Async code or Fibers migration.
- Improve MongoDB stability and support new async API.
- Improve TypeScript support.
----
### Next releases
### 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;
@@ -32,79 +27,59 @@ Contributors are encouraged to focus their efforts on work that aligns with the
- 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))
- Updated MongoDB driver to 4.8; ([PR](https://github.com/meteor/meteor/pull/12097))
- Make MongoDB integration stable by fixing critical issues;
- Typescript integration for Meteor packages; ([Discussion](https://github.com/meteor/meteor/discussions/12080))
- 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))
- Evaluate and improve support for Meteor in VSCode; ([Repository](https://github.com/matheusccastroo/vscode-meteor-toolbox))
- New skeleton for creating Meteor apps with Chakra UI;
- Support Top-Level Await (TLA) on Reify;
- Improve support for Windows 11;
- Remove Fibers dependency from Meteor Public APIs;
- Remove Fibers entirely;
### Community items
- Release Blaze 2.6.2; ([Milestone](https://github.com/meteor/blaze/milestone/9))
- 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;
### Next educational items
- Create a new Meteor Guide; ([Current Guide](https://guide.meteor.com/))
- Login and Accounts course; ([Meteor University](https://university.meteor.com/))
- Scaling Meteor Apps course; ([Meteor University](https://university.meteor.com/))
### Future items
We plan to implement these items in the near future. Community help would be greatly appreciated.
- Support package.json exports fields; ([Discussion](https://github.com/meteor/meteor/discussions/11727))
- MongoDB 6.0 Support; ([Discussion](https://github.com/meteor/meteor/discussions/12092))
- 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; ([Repository](https://github.com/Urigo/meteor-client-bundler))
- 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
- Release Blaze 2.6.1; ([Changelog](https://www.blazejs.org/changelog.html))
- Ambassadors Program; ([Website](https://ambassador.meteor.com/))
- Demo app: SimpleTasks (Meteor + Chakra UI); ([Repository](https://github.com/fredmaiaarantes/simpletasks))
- Demo app: NFT Marketplace (Meteor + React); ([Repository](https://github.com/meteor/examples/tree/main/nft-marketplace) / [Blog post](https://blog.meteor.com/meteor-web3-building-an-nft-marketplace-9484b321e426))
- New Meteor DevTools Evolved; ([Forums](https://forums.meteor.com/t/meteor-devtools-evolved-v1-2/52710))
- Meteor Toolbox - VS Code Extension; ([Forums](https://forums.meteor.com/t/meteor-toolbox-vs-code-extension/58044))
- New router for React and Meteor; ([Forums](https://forums.meteor.com/t/new-router-for-react-and-meteor/58346))
- Meteor Desktop 3.0; ([Forums](https://forums.meteor.com/t/meteor-desktop-3-0/57863))
- New Skeleton for Tailwind CSS 3; ([Blog post](https://blog.meteor.com/meteor-2-7-2-and-the-new-tailwind-skeleton-68ccde68af42))
- Review/Update React, Vue, Blaze tutorials; ([Tutorials](https://www.meteor.com/developers/tutorials))
- Video course: "MongoDB Collections and Schemas"; ([Meteor University](https://university.meteor.com/))
- Video course: "Starting with Meteor"; ([Meteor University](https://university.meteor.com/))
- Accounts 2FA package; ([Blog post](https://blog.meteor.com/meteor-2-7-and-the-new-2fa-package-5fc53e5027e0))
- TailwindCSS 3.0 JIT Support; ([Blog post](https://blog.meteor.com/meteor-2-7-and-the-new-2fa-package-5fc53e5027e0))
- node: Protocol Import Support;
- Release Blaze 2.6; ([Changelog](https://www.blazejs.org/changelog.html))
- Support to MongoDB 5.0; ([Migration Guide](https://guide.meteor.com/2.6-migration.html))
- Add missing binaries to Fibers fork; ([Issue](https://github.com/meteor/meteor/issues/11791))
- 2FA OTP support in Meteor Accounts; ([Forums](https://forums.meteor.com/t/2fa-otp-support-in-meteor-accounts-meteor-cloud/57248))
- Meteor + SolidJS demo; ([Repository](https://github.com/edemaine/solid-meteor-demo))
- TypeScript update to v4.4.1;
- Mac M1 Support;
- HMR now works on all architectures and legacy browsers;
- New core package: accounts-passwordless;
- New Meteor NPM installer;
- Apollo skeleton upgraded to Apollo server v3;
- Node.js update to v14 from 12.22.1; ([Changelog](https://docs.meteor.com/changelog.html#v2320210624))
- Cordova update to version 10;
- New Skeleton for Svelte;
- Repository with [Meteor Examples](https://github.com/meteor/examples);
- 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))
-----------

View File

@@ -0,0 +1,39 @@
---
title: Using Core Types
description: 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).

View File

@@ -5,6 +5,11 @@ edit_branch: 'devel'
edit_path: 'guide'
content_root: 'content'
versions:
- '2.12'
- '2.11'
- '2.10'
- '2.9'
- '2.8'
- '2.7'
- '2.6'
- '2.5'
@@ -36,7 +41,7 @@ sidebar_categories:
- index
- code-style
- structure
- 2.7-migration
- 2.12-migration
Data:
- collections
- data-loading

View File

@@ -23,4 +23,4 @@
"test": "npm run clean; npm run build",
"start": "npm run build && chexo meteor-hexo-config -- server"
}
}
}

View File

@@ -0,0 +1,76 @@
---
title: Migrating to Meteor 2.10
description: How to migrate your application to Meteor 2.10.
---
Most of the new features in Meteor 2.10 are either applied directly behind the scenes (in a backwards compatible manner) or are opt-in. For a complete breakdown of the changes, please refer to the [changelog](http://docs.meteor.com/changelog.html).
The above being said, there are a few items that you should implement to have easier time in the future.
<h3 id="async-tracker">Async Tracker</h3>
Wrapping your async calls in a ```Tracker.withComputation``` method will make sure that even async calls are reactive.
before if you used a code like the one below it would only run once and would not be reactive
```javascript
Tracker.autorun(async function example1() {
let asyncData = await asyncDataFunction();
let users = Meteor.users.find({}).fetch();
});
```
To be reactive before 2.10 you would need to call the reactive data sources before the async call
```javascript
Tracker.autorun(async function example2() {
let users = Meteor.users.find({}).fetch();
let asyncData = await asyncDataFunction();
});
```
Now you can have both examples reactive by wrapping the async call in a ```Tracker.withComputation``` method
```javascript
Tracker.autorun(async function example1(computation) {
let asyncData = await Tracker.withComputation(computation, () => asyncDataFunction());
let users = Meteor.users.find({}).fetch();
});
Tracker.autorun(async function example2(computation) {
let users = await Tracker.withComputation(computation, () => Meteor.users.find({}).fetch());
let asyncData = await Tracker.withComputation(computation, () => asyncDataFunction());
});
// using async mongo api
Tracker.autorun(async function example2(computation) {
let asyncData = await Tracker.withComputation(computation, () => asyncDataFunction());
let users = await Tracker.withComputation(computation, () => Meteor.users.find({}).fetchAsync());
});
```
<h2 id="older-versions">Migrating from a version older than 2.9?</h2>
If you're migrating from a version of Meteor older than Meteor 2.9, there may be important considerations not listed in this guide. Please review the older migration guides for details:
* [Migrating to Meteor 2.9](2.9-migration.html) (from 2.8)
* [Migrating to Meteor 2.8](2.8-migration.html) (from 2.7)
* [Migrating to Meteor 2.7](2.7-migration.html) (from 2.6)
* [Migrating to Meteor 2.6](2.6-migration.html) (from 2.5)
* [Migrating to Meteor 2.5](2.5-migration.html) (from 2.4)
* [Migrating to Meteor 2.4](2.4-migration.html) (from 2.3)
* [Migrating to Meteor 2.3](2.3-migration.html) (from 2.2)
* [Migrating to Meteor 2.2](2.2-migration.html) (from 2.0)
* [Migrating to Meteor 2.0](2.0-migration.html) (from 1.12)
* [Migrating to Meteor 1.12](1.12-migration.html) (from 1.11)
* [Migrating to Meteor 1.11](1.11-migration.html) (from 1.10.2)
* [Migrating to Meteor 1.10.2](1.10.2-migration.html) (from 1.10)
* [Migrating to Meteor 1.10](1.10-migration.html) (from 1.9.3)
* [Migrating to Meteor 1.9.3](1.9.3-migration.html) (from 1.9)
* [Migrating to Meteor 1.9](1.9-migration.html) (from 1.8.3)
* [Migrating to Meteor 1.8.3](1.8.3-migration.html) (from 1.8.2)
* [Migrating to Meteor 1.8.2](1.8.2-migration.html) (from 1.8)
* [Migrating to Meteor 1.8](1.8-migration.html) (from 1.7)
* [Migrating to Meteor 1.7](1.7-migration.html) (from 1.6)
* [Migrating to Meteor 1.6](1.6-migration.html) (from 1.5)
* [Migrating to Meteor 1.5](1.5-migration.html) (from 1.4)
* [Migrating to Meteor 1.4](1.4-migration.html) (from 1.3)
* [Migrating to Meteor 1.3](1.3-migration.html) (from 1.2)

View File

@@ -0,0 +1,161 @@
---
title: Migrating to Meteor 2.11
description: How to migrate your application to Meteor 2.11.
---
Most of the new features in Meteor 2.11 are either applied directly behind the scenes (in a backwards compatible manner)
or are opt-in. For a complete breakdown of the changes, please refer to
the [changelog](http://docs.meteor.com/changelog.html).
The above being said, there are a few items that you should implement to have easier time in the future.
<h3 id="mongo-5">MongoDB 6.0.3</h3>
#### Introduction
> This migration is recommended but not required. Since Meteor v2.2.0 we support
> MongoDB v6.x (not with its full
> features), [You can check the compatibility table](https://www.mongodb.com/docs/drivers/node/current/compatibility/)
> but we encourage everybody to run the
> the latest version of Meteor as soon as possible as you can benefit from a new
> MongoDB driver and also other features that we are always adding to Meteor.
Meteor before 2.11 was supporting MongoDB Server 5.x, starting from this version we've upgraded to MongoDB Node.js
driver from version 4.12.1 to 4.14
This change was necessary at the time of writing this guide (January 2023) as MongoDB Atlas is going to migrate
automatically all the clusters in the plans Atlas M0 (Free Cluster), M2, and M5 to MongoDB 6.0 in February 2022, but
this change would be necessary anyway as this is now the latest version of MongoDB Server. The migration in the M0, M2
and M5 is just a sign from MongoDB that they believe MongoDB 6.0 should be the version used by everybody as soon as
possible.
An important note is that we have migrated everything supported by Meteor to be compatible with MongoDB 6.x and also
MongoDB Node.js Driver 4.x but this doesn't include, as you should expect, what you do in your code or package
using `rawCollection`. `rawCollection` is a way for Meteor to provide you the freedom to interact with MongoDB driver
but that also comes with the responsibility to keep your code up-to-date with the version of the driver used by Meteor.
That said, we encourage everybody to run the latest version of Meteor as soon as possible as you can benefit from a new
MongoDB driver and also other features that we are always adding to Meteor.
This version of Meteor is also compatible with previous version of MongoDB server, so you can continue using the latest
Meteor without any issues even if you are not running MongoDB 6.x yet. You can
check [here](https://docs.mongodb.com/drivers/node/current/compatibility/) which versions of MongoDB server the Node.js
driver in the version 4.13.0 supports and as a consequence these are the versions of MongoDB server supported by Meteor
2.11 as well. In short, Meteor 2.11 supports these versions of MongoDB server:6.1, 6.0, 5.0, 4.4, 4.2, 4.0, 3.6.
#### Embedded MongoDB
If you are using Embedded MongoDB in your local environment you should run `meteor reset` in order to have your database
working properly after this upgrade. `meteor reset` is going to remove all the data in your local database.
#### ```meteor mongo```
From MongoDB version 6.X, the `mongo` shell is not available anymore. It can be
seen [here](https://www.mongodb.com/docs/manual/release-notes/6.0-compatibility/#legacy-mongo-shell-removed) for more
info.
For this reason the `meteor mongo` command is not going to work anymore. If you are using this command, you should use
the `mongosh` command instead.
We will be working for a future version of Meteor to have `meteor mongo` working again with `mongosh` but for now you
can use `mongosh` directly.
#### Removed Operators
The following operators have been removed from MongoDB 6.0.3 retrieved from
the [MongoDB 6.0.3 Release Notes](https://www.mongodb.com/docs/manual/release-notes/6.0-compatibility/#removed-operators):
- $comment:
Use [cursor.comment()](https://www.mongodb.com/docs/manual/reference/method/cursor.comment/#mongodb-method-cursor.comment)
- $explain:
Use [cursor.explain()](https://www.mongodb.com/docs/manual/reference/method/cursor.explain/#mongodb-method-cursor.explain)
- $hint:
Use [cursor.hint()](https://www.mongodb.com/docs/manual/reference/method/cursor.hint/#mongodb-method-cursor.hint))
- $max: Use [cursor.max()](https://www.mongodb.com/docs/manual/reference/method/cursor.max/#mongodb-method-cursor.max)
- $maxTimeMS:
Use [cursor.maxTimeMS()](https://www.mongodb.com/docs/manual/reference/method/cursor.maxTimeMS/#mongodb-method-cursor.maxTimeMS)
- $min: Use [cursor.min()](https://www.mongodb.com/docs/manual/reference/method/cursor.min/#mongodb-method-cursor.min)
- $orderby:
Use [cursor.sort()](https://www.mongodb.com/docs/manual/reference/method/cursor.sort/#mongodb-method-cursor.sort)
- $query:
See [Cursor Methods](https://www.mongodb.com/docs/manual/reference/method/js-cursor/#std-label-doc-cursor-methods)
- $returnKey:
Use [cursor.returnKey()](https://www.mongodb.com/docs/manual/reference/method/cursor.returnKey/#mongodb-method-cursor.returnKey)
- $showDiskLoc: Use
[cursor.showRecordId](https://www.mongodb.com/docs/manual/reference/method/cursor.returnKey/#mongodb-method-cursor.showRecordId)
- db.getLastError():
See [Legacy Opcodes Removed](https://www.mongodb.com/docs/manual/release-notes/6.0-compatibility/#std-label-legacy-op-codes-removed)
- db.getLastErrorObj():
See [Legacy Opcodes Removed](https://www.mongodb.com/docs/manual/release-notes/6.0-compatibility/#std-label-legacy-op-codes-removed)
- getLastError:
See [Legacy Opcodes Removed](https://www.mongodb.com/docs/manual/release-notes/6.0-compatibility/#std-label-legacy-op-codes-removed)
#### Changes
Nothing has changed in the Meteor API. You may face issues if you are using any
of the features that have been mentioned above
Below we describe a few common cases in this migration:
#### 1) Same version of MongoDB server
If you are not changing your MongoDB server version you don't need to change anything in your code, but as we did many
changes on how Meteor interact with MongoDB in order to be compatible with the new driver we recommend that you test
your application carefully before releasing to production with this Meteor version.
We've made many tests in real applications and also in our automatic tests suite, we believe we've fixed all the issues
that we found along the way but Meteor interaction with MongoDB is so broad and open that maybe you have different use
cases that could lead to different issues.
Again, we are not aware of any issues that were introduced by these changes, but it's important that you check your app
behavior, especially if you have places where you believe you are not using MongoDB in a traditional way.
#### 2) Migrating from MongoDB 5.x to MongoDB 6.x
As we have made many changes to Meteor core packages in this version we recommend the following steps to migrate:
- Upgrade your app to use Meteor 2.11 (meteor update --release 2.11) in a branch;
- Create a staging environment with MongoDB 6.x and your app environment using the branch created in the previous step;
- If you are using MongoDB Atlas, in MongoDB Atlas we were not able to migrate to a free MongoDB 6.x instance, so we
had to migrate to a paid cluster in order to test the app properly, maybe this will change after February 2023;
- Set up your staging database with MongoDB 6.x and restore your production data there, or populate this database in a
way that you can reproduce the same cases as if you were in production;
- Run your app pointing your MONGO_URL to this new database, that is running MongoDB 6.x;
- Run your end-to-end tests in this environment. If you don't have a robust end-to-end test we recommend that you test
your app manually to make sure everything is working properly.
- Once you have a stable end-to-end test (or manual test), you can consider that you are ready to run using MongoDB 6.x,
so you can consider it as any other database version migration.
We are not aware of any issues that were introduced by the necessary changes to support MongoDB, but it's important that
you check your app behavior, especially if you have places where you believe you are not using MongoDB in a traditional
way.
<h2 id="older-versions">Migrating from a version older than 2.10?</h2>
If you're migrating from a version of Meteor older than Meteor 2.10, there may be important considerations not listed in
this guide. Please review the older migration guides for details:
* [Migrating to Meteor 2.10](2.10-migration.html) (from 2.9)
* [Migrating to Meteor 2.9](2.9-migration.html) (from 2.8)
* [Migrating to Meteor 2.8](2.8-migration.html) (from 2.7)
* [Migrating to Meteor 2.7](2.7-migration.html) (from 2.6)
* [Migrating to Meteor 2.6](2.6-migration.html) (from 2.5)
* [Migrating to Meteor 2.5](2.5-migration.html) (from 2.4)
* [Migrating to Meteor 2.4](2.4-migration.html) (from 2.3)
* [Migrating to Meteor 2.3](2.3-migration.html) (from 2.2)
* [Migrating to Meteor 2.2](2.2-migration.html) (from 2.0)
* [Migrating to Meteor 2.0](2.0-migration.html) (from 1.12)
* [Migrating to Meteor 1.12](1.12-migration.html) (from 1.11)
* [Migrating to Meteor 1.11](1.11-migration.html) (from 1.10.2)
* [Migrating to Meteor 1.10.2](1.10.2-migration.html) (from 1.10)
* [Migrating to Meteor 1.10](1.10-migration.html) (from 1.9.3)
* [Migrating to Meteor 1.9.3](1.9.3-migration.html) (from 1.9)
* [Migrating to Meteor 1.9](1.9-migration.html) (from 1.8.3)
* [Migrating to Meteor 1.8.3](1.8.3-migration.html) (from 1.8.2)
* [Migrating to Meteor 1.8.2](1.8.2-migration.html) (from 1.8)
* [Migrating to Meteor 1.8](1.8-migration.html) (from 1.7)
* [Migrating to Meteor 1.7](1.7-migration.html) (from 1.6)
* [Migrating to Meteor 1.6](1.6-migration.html) (from 1.5)
* [Migrating to Meteor 1.5](1.5-migration.html) (from 1.4)
* [Migrating to Meteor 1.4](1.4-migration.html) (from 1.3)
* [Migrating to Meteor 1.3](1.3-migration.html) (from 1.2)

View File

@@ -0,0 +1,61 @@
---
title: Migrating to Meteor 2.12
description: How to migrate your application to Meteor 2.12.
---
Most of the new features in Meteor 2.12 are either applied directly behind the
scenes (in a backwards compatible manner) or are opt-in. For a complete
breakdown of the changes, please refer to the [changelog](http://docs.meteor.com/changelog.html).
The above being said, there are a few items that you should implement to
have easier time in the future.
<h3 id="old-api-warning">Old API Warning</h3>
With our migration to the new async/await API, we have added a warning to the
old API. In order to use it, before running your application, set the
environment variable `WARN_WHEN_USING_OLD_API` to `true`. For example, you can
run the folling command in your application directory:
```bash
WARN_WHEN_USING_OLD_API=true meteor
```
It will run your app and every time you use the old API, you will see a warning
in your console. This will help you find the places in your code that need to
be updated.
If you are in doubt whether a particular API is old or new, you can check our [v2.8 migration](https://guide.meteor.com/v2.10/2.8-migration.html) guide
that lists all the changes in the new API.
<h2 id="older-versions">Migrating from a version older than 2.11?</h2>
If you're migrating from a version of Meteor older than Meteor 2.11, there may
be important considerations not listed in this guide.
Please review the older migration guides for details:
* [Migrating to Meteor 2.11](2.11-migration.html) (from 2.10)
* [Migrating to Meteor 2.10](2.10-migration.html) (from 2.9)
* [Migrating to Meteor 2.9](2.9-migration.html) (from 2.8)
* [Migrating to Meteor 2.8](2.8-migration.html) (from 2.7)
* [Migrating to Meteor 2.7](2.7-migration.html) (from 2.6)
* [Migrating to Meteor 2.6](2.6-migration.html) (from 2.5)
* [Migrating to Meteor 2.5](2.5-migration.html) (from 2.4)
* [Migrating to Meteor 2.4](2.4-migration.html) (from 2.3)
* [Migrating to Meteor 2.3](2.3-migration.html) (from 2.2)
* [Migrating to Meteor 2.2](2.2-migration.html) (from 2.0)
* [Migrating to Meteor 2.0](2.0-migration.html) (from 1.12)
* [Migrating to Meteor 1.12](1.12-migration.html) (from 1.11)
* [Migrating to Meteor 1.11](1.11-migration.html) (from 1.10.2)
* [Migrating to Meteor 1.10.2](1.10.2-migration.html) (from 1.10)
* [Migrating to Meteor 1.10](1.10-migration.html) (from 1.9.3)
* [Migrating to Meteor 1.9.3](1.9.3-migration.html) (from 1.9)
* [Migrating to Meteor 1.9](1.9-migration.html) (from 1.8.3)
* [Migrating to Meteor 1.8.3](1.8.3-migration.html) (from 1.8.2)
* [Migrating to Meteor 1.8.2](1.8.2-migration.html) (from 1.8)
* [Migrating to Meteor 1.8](1.8-migration.html) (from 1.7)
* [Migrating to Meteor 1.7](1.7-migration.html) (from 1.6)
* [Migrating to Meteor 1.6](1.6-migration.html) (from 1.5)
* [Migrating to Meteor 1.5](1.5-migration.html) (from 1.4)
* [Migrating to Meteor 1.4](1.4-migration.html) (from 1.3)
* [Migrating to Meteor 1.3](1.3-migration.html) (from 1.2)

View File

@@ -0,0 +1,246 @@
---
title: Migrating to Meteor 2.8
description: How to migrate your application to Meteor 2.8.
---
Meteor `2.8` introduce the new MongoDB Package Async API. For a complete breakdown of the changes, please refer to the [changelog](http://docs.meteor.com/changelog.html).
For this new async API, we have new methods like `findOneAsync`, which behaves exactly like the `findOne` method, but now returns a promise that needs to be resolved to get the data.
<h3 id="why-like-this">Why is this new API important?</h3>
You may know that on Meteor we use a package called [Fibers](https://github.com/laverdet/node-fibers). This package is what makes it possible to call an async function, like `db.findOne()`, inside Meteor in a sync way (without having to wait for the promise to resolve).
But starting from Node 16, Fibers will stop working, so Meteor needs to move away from Fibers, otherwise, we'll be stuck on Node 14.
If you want to know more about the plan, you can check this [discussion](https://github.com/meteor/meteor/discussions/11505).
<h3 id="why-now">Why doing this change now?</h3>
This will be a considerable change for older Meteor applications, and some parts of the code of any Meteor app will have to be adjusted eventually. So it's important to start the migration process now.
With this version, you'll be able to start preparing your app for the future by replacing your current MongoDB methods with the new async ones.
<h3 id="should-i-update">Can I update to this version without changing my app?</h3>
Yes. You can update to this version without changing your app.
<h3 id="what-is-new">What's new?</h3>
Here are the newly added methods (you can see this description and the code [here](https://github.com/meteor/meteor/pull/12028)):
**Added async methods on collections.**
- All async methods have an Async suffix to their names. These are: `createCappedCollectionAsync`, `createIndexAsync`, `dropCollectionAsync`, `dropIndexAsync`, `findOneAsync`, `insertAsync`, `removeAsync`, `updateAsync`, and `upsertAsync`.
**Added async methods on cursors.**
- All async methods have an Async suffix to their names. These are: `countAsync`, `fetchAsync`, `forEachAsync`, and `mapAsync`.
- There's also `[Symbol.asyncIterator]`, so this code should work:
```js
for await (const document of collection.find(query, options)) /* ... */
```
There is also a new Meteor method called `callAsync`. It should be used to call async methods.
<h3 id="how-do-i-update">How can I start using these new features?</h3>
We got a few examples to make these new features easier to use, you can see the code snippet below:
```js
// SERVER
// Before 2.8, we would use something like this
export const removeByID = ({ id }) => {
SomeCollection.remove({ _id: id });
};
// Now we can also do like this
export const removeByIDAsync = async ({ id }) => {
await SomeCollection.removeAsync({ _id: id });
};
Meteor.methods({
//...
removeByID,
removeByIDAsync,
});
// CLIENT
const result = Meteor.call('removeByID', { id });
// For the async, you call it like this:
const result = await Meteor.callAsync('removeByIDAsync', { id });
// or even like this:
Meteor.callAsync('removeByIDAsync', { id }).then(result => {
console.log(result);
});
```
<h2 id="callasync">The new callAsync </h2>
As said before, the `callAsync` should be used to call async methods.
We do not consider this version of the `callAsync` as the final product. It has its limitations when your methods have a [stub](https://docs.meteor.com/api/methods.html#:~:text=was%20received%20on.-,Calling,and%20you%E2%80%99ll%20have%20to%20wait%20for%20the%20results%20from%20the%20server.,-If%20you%20do), and it should be used where you know it won't affect other parts of your application.
> We will revisit these limitations soon and try to find a solution where these limitations do not exist.
<h3 id="the-limitations">The callAsync limitations</h3>
If you have two methods with a [stub](https://docs.meteor.com/api/methods.html#:~:text=was%20received%20on.-,Calling,and%20you%E2%80%99ll%20have%20to%20wait%20for%20the%20results%20from%20the%20server.,-If%20you%20do), you should never call the second method if the stub of the first one is still running. You need to be sure that only one stub is running each time. So, for example:
```js
// This is ok, because methodWithoutStubAsync and methodWithoutStub
// does not have a stub inside them:
Meteor.callAsync('methodWithoutStubAsync', { id }).then(result => {
// do something
});
Meteor.call('methodWithoutStub', { id }, (error, result) => {
// do something
})
// This is ok as well, because even though removeByIDAsync has a stub,
// methodWithoutStub does not have one, so both methods can run
// at the same time:
Meteor.callAsync('removeByIDAsync', { id }).then(result => {
// do something
});
Meteor.call('methodWithoutStub', { id }, (error, result) => {
// do something
})
// This is also ok, because even though removeByID has a stub
// (SomeCollection.remove({ _id: id })), it is a sync method,
// so by the time removeByIDAsync runs, no stub will be running:
Meteor.call('removeByID', { id }, (error, result) => {
// do something
});
Meteor.callAsync('removeByIDAsync', { id }).then(result => {
// do something
});
// But, this is NOT ok, because you would have 2 stubs running at the same time:
Meteor.callAsync('removeByIDAsync', { id }).then(result => {
// do something
});
Meteor.call('removeByID', { id }, (error, result) => {
// do something
});
// instead, do it like this:
await Meteor.callAsync('removeByIDAsync', { id });
Meteor.call('removeByID', { id }, (error, result) => {
// do something
});
// or this
Meteor.callAsync('removeByIDAsync', { id }).then(result => {
// do something
Meteor.call('removeByID', { id }, (error, result) => {
// do something
});
});
```
As `callAsync` returns a promise, it'll be solved in the future. So you need to wait until it finishes before calling another method (async or not), if the other method has a stub.
> If you wish to understand why this limitation exist, you can read [this comment](https://github.com/meteor/meteor/pull/12196#issue-1386273927) in the PR that created the `callAsync`.
<h3 id="async-method-call">Calling an async method with Meteor.call and vice versa</h3>
It's also important to understand what will happen if you call an async method with `Meteor.call`, and vice versa.
If you call an async method with `Meteor.call` in the client, and you don't have the package `insecure` on your project, an error like this will be thrown:
<img src="images/live-data-error.png">
This error is thrown because when `Meteor.call` execute your async method, the method will return a promise. Then, when your method run in the future, it won't have the [global contexts](https://github.com/meteor/meteor/blob/662eee3bf9635b135e81b672d1415f1ae673053b/packages/meteor/dynamics_browser.js#L24-L33) anymore. Meaning that if you have some MongoDB method, for example, inside your async method, it will run outside a stub.
It would the equivalent of running something like this directly on the client: `SomeCollection.remove({ _id: id })`. Hence, the error. If you have the `insecure` package on your project, this error won't show up because `insecure` allows your app to run write methods from the client.
In the server it's fine to call an async method using `Meteor.call()`.
About `Meteor.callAsync()`, it is fine to call it with a sync method either from the client or server.
<h3 id="different-components">Methods in different components</h3>
It can be hard to narrow down where in your app two methods could be called at the same time in an app. Meteor can be used in many ways. But one case we can see will be pretty common, it's when you have two different components that call two methods, like so:
```jsx
// this is a React example
const MyComponent1 = () => {
...
// If the user do not type anything in 5 seconds
// set its status to offile
useEffect(() => {
const interval = setInterval(() => {
const now = new Date();
const timeWithoutTexting = now.getTime() - lastType.getTime();
if (isUserOn && timeWithoutTexting >= 5000) {
Meteor.callAsync("changeUserStatus", 'OFFLINE');
}
}, 1000);
return () => clearInterval(interval);
}, [isUserOn, lastTyped]);
return <div>
<input onChange={async ({ target: { value }}) => {
// Every time the use type something, save the value in database,
// change the user status to online, and set a new lastTyped:
await Meteor.callAsync("updateText", value);
if (userStatus === 'OFFLINE') {
Meteor.callAsync("changeUserStatus", 'ONLINE');
}
setLastTyped(new Date());
}}/>
</div>
}
```
To summarize this example, every time the user types something, a method is called to save the new value in the database, and change another one to change their status if they were offline. A job will also check every second if the user didn't type anything in the last 5 seconds.
In this example, depending on how fast the user types, you could end up calling both methods at the same time or calling one of them while the stub of another is still alive. Meaning that your code won't work property.
One strategy here to avoid this could be to change the user status to ONLINE inside the method `updateText`, instead of calling a method to do it.
The same goes for the job that updates the user status to OFFLINE. You could create this job in the server side, leaving on the client just the call for the method `updateText`.
<h3 id="recommendation-for-future">Our recommendation for the future</h3>
We recommend that you start to write new methods and publications using async from this version forward, forcing internal APIs to also be async with time. And, of course, also updating your current ones. As soon you start, the better.
But do it with caution, and keeping in mind the cases mentioned above.
<h2 id="older-versions">Migrating from a version older than 2.8?</h2>
If you're migrating from a version of Meteor older than Meteor 2.8, there may be important considerations not listed in this guide. Please review the older migration guides for details:
* [Migrating to Meteor 2.7](2.7-migration.html) (from 2.6)
* [Migrating to Meteor 2.6](2.6-migration.html) (from 2.5)
* [Migrating to Meteor 2.5](2.5-migration.html) (from 2.4)
* [Migrating to Meteor 2.4](2.4-migration.html) (from 2.3)
* [Migrating to Meteor 2.3](2.3-migration.html) (from 2.2)
* [Migrating to Meteor 2.2](2.2-migration.html) (from 2.0)
* [Migrating to Meteor 2.0](2.0-migration.html) (from 1.12)
* [Migrating to Meteor 1.12](1.12-migration.html) (from 1.11)
* [Migrating to Meteor 1.11](1.11-migration.html) (from 1.10.2)
* [Migrating to Meteor 1.10.2](1.10.2-migration.html) (from 1.10)
* [Migrating to Meteor 1.10](1.10-migration.html) (from 1.9.3)
* [Migrating to Meteor 1.9.3](1.9.3-migration.html) (from 1.9)
* [Migrating to Meteor 1.9](1.9-migration.html) (from 1.8.3)
* [Migrating to Meteor 1.8.3](1.8.3-migration.html) (from 1.8.2)
* [Migrating to Meteor 1.8.2](1.8.2-migration.html) (from 1.8)
* [Migrating to Meteor 1.8](1.8-migration.html) (from 1.7)
* [Migrating to Meteor 1.7](1.7-migration.html) (from 1.6)
* [Migrating to Meteor 1.6](1.6-migration.html) (from 1.5)
* [Migrating to Meteor 1.5](1.5-migration.html) (from 1.4)
* [Migrating to Meteor 1.4](1.4-migration.html) (from 1.3)
* [Migrating to Meteor 1.3](1.3-migration.html) (from 1.2)

View File

@@ -0,0 +1,139 @@
---
title: Migrating to Meteor 2.9
description: How to migrate your application to Meteor 2.9.
---
Meteor `2.9` introduces some changes in the `accounts` packages, the new method `Email.sendAsync`, the new method `Meteor.userAsync`, and more. For a complete breakdown of the changes, please refer to the [changelog](http://docs.meteor.com/changelog.html).
<h3 id="why-like-this">Why is this new API important?</h3>
You may know that on Meteor we use a package called [Fibers](https://github.com/laverdet/node-fibers). This package is what makes it possible to call an async function inside Meteor in a sync way (without having to wait for the promise to resolve).
But starting from Node 16, Fibers will stop working, so Meteor needs to move away from Fibers, otherwise, we'll be stuck on Node 14.
If you want to know more about the plan, you can check this [discussion](https://github.com/meteor/meteor/discussions/11505).
<h3 id="why-now">Why doing this change now?</h3>
This will be a considerable change for older Meteor applications, and some parts of the code of any Meteor app will have to be adjusted eventually. So it's important to start the migration process as soon as possible.
The migration process started in version 2.8. We recommend you [check that out](2.8-migration.htm) first in case you skipped.
<h3 id="should-i-update">Can I update to this version without changing my app?</h3>
Yes. You can update to this version without changing your app.
<h2 id="what-is-new">What's new?</h2>
Let's start with the accounts and OAuth packages. Some methods had to be restructured to work without Fibers in the future. The current methods will continue working as of today, but if you use some of the methods we'll mention below in custom login packages, we recommend you adapt them.
Internal methods that are now async:
- **_attemptLogin**
- **_loginMethod**
- **_runLoginHandlers**
- **Accounts._checkPassword**: still works as always, but now has a new version called `Accounts._checkPasswordAsync`.
We also have changes to asynchronous context in the registry of handlers for OAuth services.
Now, the OAuth.Register method accepts an async handler, and it is possible to use the await option internally, avoiding to use methods that run on Fibers, such as **HTTP** (deprecated Meteor package), `Meteor.wrapAsync` and `Promise.await`.
Before the changes you would have something like:
```js
OAuth.registerService('github', 2, null, (query) => {
const accessTokenCall = Meteor.wrapAsync(getAccessToken);
const accessToken = accessTokenCall(query);
const identityCall = Meteor.wrapAsync(getIdentity);
});
```
Now you have:
```js
OAuth.registerService('github', 2, null, async (query) => {
const accessToken = await getAccessToken(query);
const identity = await getIdentity(accessToken);
const emails = await getEmails(accessToken);
});
```
<h3 id="new-async-methods">New async methods</h3>
We now have async version of methods that you already use. They are:
- [Email.sendAsync()](https://github.com/meteor/meteor/pull/12101/files#diff-b2453acdfd34fb563a1e258956d2733ab06a2aa77c87e402cfa53a86a48133a8R86-R107)
- [Meteor.userAsync()](https://github.com/meteor/meteor/pull/12274)
- [CssTools.minifyCssAsync()](https://github.com/meteor/meteor/pull/12105)
<h3 id="breaking-async">Breaking async</h3>
`Accounts.createUserVerifyingEmail` is now completely async:
- [Accounts.createUserVerifyingEmail](https://github.com/meteor/meteor/issues/12398)
To upgrade change from
```js
Meteor.methods({
createUserAccount (user) {
/**
* This seems to be the issue.
* Using the other method `createUser` works as expected.
*/
Accounts.createUserVerifyingEmail({
username: user.username,
email: user.email,
password: user.password,
});
}
});
```
to
```js
Meteor.methods({
async createUserAccount (user) {
await Accounts.createUserVerifyingEmail({
username: user.username,
email: user.email,
password: user.password,
});
}
});
```
<h3 id="accounts-base">Accounts-base without service-configuration</h3>
Now `accounts-base` is [no longer tied up](https://github.com/meteor/meteor/pull/12202) with `service-configuration`. So, if you don't use third-party login on your project, you don't need to add the package `service-configuration` anymore.
<h2 id="older-versions">Migrating from a version older than 2.8?</h2>
If you're migrating from a version of Meteor older than Meteor 2.8, there may be important considerations not listed in this guide. Please review the older migration guides for details:
* [Migrating to Meteor 2.8](2.8-migration.html) (from 2.7)
* [Migrating to Meteor 2.7](2.7-migration.html) (from 2.6)
* [Migrating to Meteor 2.6](2.6-migration.html) (from 2.5)
* [Migrating to Meteor 2.5](2.5-migration.html) (from 2.4)
* [Migrating to Meteor 2.4](2.4-migration.html) (from 2.3)
* [Migrating to Meteor 2.3](2.3-migration.html) (from 2.2)
* [Migrating to Meteor 2.2](2.2-migration.html) (from 2.0)
* [Migrating to Meteor 2.0](2.0-migration.html) (from 1.12)
* [Migrating to Meteor 1.12](1.12-migration.html) (from 1.11)
* [Migrating to Meteor 1.11](1.11-migration.html) (from 1.10.2)
* [Migrating to Meteor 1.10.2](1.10.2-migration.html) (from 1.10)
* [Migrating to Meteor 1.10](1.10-migration.html) (from 1.9.3)
* [Migrating to Meteor 1.9.3](1.9.3-migration.html) (from 1.9)
* [Migrating to Meteor 1.9](1.9-migration.html) (from 1.8.3)
* [Migrating to Meteor 1.8.3](1.8.3-migration.html) (from 1.8.2)
* [Migrating to Meteor 1.8.2](1.8.2-migration.html) (from 1.8)
* [Migrating to Meteor 1.8](1.8-migration.html) (from 1.7)
* [Migrating to Meteor 1.7](1.7-migration.html) (from 1.6)
* [Migrating to Meteor 1.6](1.6-migration.html) (from 1.5)
* [Migrating to Meteor 1.5](1.5-migration.html) (from 1.4)
* [Migrating to Meteor 1.4](1.4-migration.html) (from 1.3)
* [Migrating to Meteor 1.3](1.3-migration.html) (from 1.2)

View File

@@ -100,6 +100,7 @@ After installing Xcode from the Mac App Store, it is still necessary to enable t
{% youtube vhlNO0dVvjE %}
> For Mac OSX Intel and Linux architectures, follow the following instructions. Mac M1 users, keep scrolling to the next section.
> Note: if you want to target the SDK 31 of Android, you will need to use Java 11 or higher and also have the latest cmdline-tools installed.
In order to build and run Android apps, you will need to:

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

View File

@@ -365,7 +365,7 @@ Meteor.users.methods.updateMMR = new ValidatedMethod({
});
```
Note that while the Method is defined on the client, the actual secret logic is only accessible from the server. Keep in mind that code inside `if (Meteor.isServer)` blocks is still sent to the client, it is just not executed. So don't put any secret code in there.
Note that while the Method is defined on the client, the actual secret logic is only accessible from the server and the code will **not** be included in the client bundle. Keep in mind that code inside `if (Meteor.isServer)` and `if (!this.isSimulation)` blocks is still sent to the client, it is just not executed. So don't put any secret code in there.
Secret API keys should never be stored in your source code at all, the next section will talk about how to handle them.

3
meteor
View File

@@ -1,6 +1,7 @@
#!/usr/bin/env bash
BUNDLE_VERSION=14.19.3.0
BUNDLE_VERSION=14.21.3.2
# OS Check. Put here because here is where we download the precompiled
# bundles that are arch specific.

View File

@@ -1,6 +1,6 @@
{
"name": "cordova-plugin-meteor-webapp",
"version": "1.9.1",
"version": "2.0.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
@@ -379,8 +379,7 @@
"big-integer": {
"version": "1.6.36",
"resolved": "https://registry.npmjs.org/big-integer/-/big-integer-1.6.36.tgz",
"integrity": "sha512-t70bfa7HYEA1D9idDbmuv7YbsbVkQ+Hp+8KFSul4aE5e/i1bjCNIRYJZlA8Q8p0r9T8cF/RVvwUgRA//FydEyg==",
"dev": true
"integrity": "sha512-t70bfa7HYEA1D9idDbmuv7YbsbVkQ+Hp+8KFSul4aE5e/i1bjCNIRYJZlA8Q8p0r9T8cF/RVvwUgRA//FydEyg=="
},
"bl": {
"version": "1.2.3",
@@ -407,14 +406,6 @@
"hoek": "4.x.x"
}
},
"bplist-creator": {
"version": "0.0.8",
"resolved": "https://registry.npmjs.org/bplist-creator/-/bplist-creator-0.0.8.tgz",
"integrity": "sha512-Za9JKzD6fjLC16oX2wsXfc+qBEhJBJB1YPInoAQpMLhDuj5aVOv1baGeIQSq1Fr3OCqzvsoQcSBSwGId/Ja2PA==",
"requires": {
"stream-buffers": "~2.2.0"
}
},
"bplist-parser": {
"version": "0.1.1",
"resolved": "https://registry.npmjs.org/bplist-parser/-/bplist-parser-0.1.1.tgz",
@@ -971,7 +962,8 @@
"big-integer": {
"version": "1.6.36",
"resolved": "https://registry.npmjs.org/big-integer/-/big-integer-1.6.36.tgz",
"integrity": "sha512-t70bfa7HYEA1D9idDbmuv7YbsbVkQ+Hp+8KFSul4aE5e/i1bjCNIRYJZlA8Q8p0r9T8cF/RVvwUgRA//FydEyg=="
"integrity": "sha512-t70bfa7HYEA1D9idDbmuv7YbsbVkQ+Hp+8KFSul4aE5e/i1bjCNIRYJZlA8Q8p0r9T8cF/RVvwUgRA//FydEyg==",
"dev": true
},
"block-stream": {
"version": "0.0.9",
@@ -1061,6 +1053,7 @@
"version": "0.1.1",
"resolved": "https://registry.npmjs.org/bplist-parser/-/bplist-parser-0.1.1.tgz",
"integrity": "sha1-1g1dzCDLptx+HymbNdPh+V2vuuY=",
"dev": true,
"requires": {
"big-integer": "^1.6.7"
}
@@ -4916,32 +4909,6 @@
"resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.0.tgz",
"integrity": "sha1-c0TLuLbib7J9ZrL8hvn21Zl1IcY="
},
"simple-plist": {
"version": "0.2.1",
"resolved": "https://registry.npmjs.org/simple-plist/-/simple-plist-0.2.1.tgz",
"integrity": "sha1-cXZts1IyaSjPOoByQrp2IyJjZyM=",
"requires": {
"bplist-creator": "0.0.7",
"bplist-parser": "0.1.1",
"plist": "2.0.1"
},
"dependencies": {
"base64-js": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.1.2.tgz",
"integrity": "sha1-1kAMrBxMZgl22Q0HoENR2JOV9eg="
},
"plist": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/plist/-/plist-2.0.1.tgz",
"integrity": "sha1-CjLKlIGxw2TpLhjcVch23p0B2os=",
"requires": {
"base64-js": "1.1.2",
"xmldom": "0.1.x"
}
}
}
},
"slash": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz",
@@ -5590,7 +5557,6 @@
"integrity": "sha1-4fWxRDJF3tOMGAeW3xoQ/e2ghOw=",
"requires": {
"pegjs": "^0.10.0",
"simple-plist": "^0.2.1",
"uuid": "3.0.1"
},
"dependencies": {
@@ -5616,7 +5582,8 @@
"xmldom": {
"version": "0.1.27",
"resolved": "https://registry.npmjs.org/xmldom/-/xmldom-0.1.27.tgz",
"integrity": "sha1-1QH5ezvbQDr4757MIFcxh6rawOk="
"integrity": "sha1-1QH5ezvbQDr4757MIFcxh6rawOk=",
"dev": true
},
"xtend": {
"version": "4.0.1",
@@ -7878,47 +7845,49 @@
}
},
"simple-plist": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/simple-plist/-/simple-plist-1.1.0.tgz",
"integrity": "sha512-2i5Tc0BYAqppM7jVzmNrI+aEUntPolIq4fDgji6WuNNn1D/qYdn2KwoLhZdzQkE04lu9L5tUoeJsjuJAvd+lFg==",
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/simple-plist/-/simple-plist-1.3.1.tgz",
"integrity": "sha512-iMSw5i0XseMnrhtIzRb7XpQEXepa9xhWxGUojHBL43SIpQuDQkh3Wpy67ZbDzZVr6EKxvwVChnVpdl8hEVLDiw==",
"requires": {
"bplist-creator": "0.0.8",
"bplist-parser": "0.2.0",
"plist": "^3.0.1"
"bplist-creator": "0.1.0",
"bplist-parser": "0.3.1",
"plist": "^3.0.5"
},
"dependencies": {
"base64-js": {
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.1.tgz",
"integrity": "sha512-mLQ4i2QO1ytvGWFWmcngKO//JXAQueZvwEKtjgQFM4jIK0kU+ytMfplL8j+n5mspOfjHwoAg+9yhb7BwAHm36g=="
"version": "1.5.1",
"resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz",
"integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA=="
},
"big-integer": {
"version": "1.6.48",
"resolved": "https://registry.npmjs.org/big-integer/-/big-integer-1.6.48.tgz",
"integrity": "sha512-j51egjPa7/i+RdiRuJbPdJ2FIUYYPhvYLjzoYbcMMm62ooO6F94fETG4MTs46zPAF9Brs04OajboA/qTGuz78w=="
"bplist-creator": {
"version": "0.1.0",
"resolved": "https://registry.npmjs.org/bplist-creator/-/bplist-creator-0.1.0.tgz",
"integrity": "sha512-sXaHZicyEEmY86WyueLTQesbeoH/mquvarJaQNbjuOQO+7gbFcDEWqKmcWA4cOTLzFlfgvkiVxolk1k5bBIpmg==",
"requires": {
"stream-buffers": "2.2.x"
}
},
"bplist-parser": {
"version": "0.2.0",
"resolved": "https://registry.npmjs.org/bplist-parser/-/bplist-parser-0.2.0.tgz",
"integrity": "sha512-z0M+byMThzQmD9NILRniCUXYsYpjwnlO8N5uCFaCqIOpqRsJCrQL9NK3JsD67CN5a08nF5oIL2bD6loTdHOuKw==",
"version": "0.3.1",
"resolved": "https://registry.npmjs.org/bplist-parser/-/bplist-parser-0.3.1.tgz",
"integrity": "sha512-PyJxiNtA5T2PlLIeBot4lbp7rj4OadzjnMZD/G5zuBNt8ei/yCU7+wW0h2bag9vr8c+/WuRWmSxbqAl9hL1rBA==",
"requires": {
"big-integer": "^1.6.44"
"big-integer": "1.6.x"
}
},
"plist": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/plist/-/plist-3.0.1.tgz",
"integrity": "sha512-GpgvHHocGRyQm74b6FWEZZVRroHKE1I0/BTjAmySaohK+cUn+hZpbqXkc3KWgW3gQYkqcQej35FohcT0FRlkRQ==",
"version": "3.0.6",
"resolved": "https://registry.npmjs.org/plist/-/plist-3.0.6.tgz",
"integrity": "sha512-WiIVYyrp8TD4w8yCvyeIr+lkmrGRd5u0VbRnU+tP/aRLxP/YadJUYOMZJ/6hIa3oUyVCsycXvtNRgd5XBJIbiA==",
"requires": {
"base64-js": "^1.2.3",
"xmlbuilder": "^9.0.7",
"xmldom": "0.1.x"
"base64-js": "^1.5.1",
"xmlbuilder": "^15.1.1"
}
},
"xmlbuilder": {
"version": "9.0.7",
"resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-9.0.7.tgz",
"integrity": "sha1-Ey7mPS7FVlxVfiD0wi35rKaGsQ0="
"version": "15.1.1",
"resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-15.1.1.tgz",
"integrity": "sha512-yMqGBqtXyeN1e3TGYvgNgDVZ3j84W4cwkOXQswghol6APgZWaff9lnbvN7MHYJOiXsvGPXtjTYJEiC9J2wv9Eg=="
}
}
},
@@ -8790,7 +8759,8 @@
"xmldom": {
"version": "0.1.27",
"resolved": "https://registry.npmjs.org/xmldom/-/xmldom-0.1.27.tgz",
"integrity": "sha1-1QH5ezvbQDr4757MIFcxh6rawOk="
"integrity": "sha1-1QH5ezvbQDr4757MIFcxh6rawOk=",
"dev": true
},
"xmlhttprequest-ssl": {
"version": "1.5.3",

View File

@@ -1,4 +1,4 @@
# eslint-config-meteor
# @meteorjs/eslint-config-meteor
This is an [ESLint](https://eslint.org) configuration for [Meteor](https://www.meteor.com) apps which implements the recommendations from the [Meteor Guide](https://guide.meteor.com/)'s section on [Code style](https://guide.meteor.com/code-style.html#eslint).

View File

@@ -1,21 +1,16 @@
module.exports = {
parser: 'babel-eslint',
parserOptions: {
allowImportExportEverywhere: true
allowImportExportEverywhere: true,
},
env: {
node: true,
browser: true
browser: true,
},
plugins: [
'meteor'
],
extends: [
'airbnb',
'plugin:meteor/recommended'
],
plugins: ['meteor'],
extends: ['airbnb', 'plugin:meteor/recommended'],
settings: {
'import/resolver': 'meteor'
'import/resolver': 'meteor',
},
rules: {
'react/jsx-filename-extension': 0,
@@ -30,24 +25,21 @@ module.exports = {
'no-underscore-dangle': [
'error',
{
allow: [
'_id',
'_ensureIndex'
]
}
allow: ['_id', '_ensureIndex'],
},
],
'object-shorthand': [
'error',
'always',
{
avoidQuotes: false
}
avoidQuotes: false,
},
],
'space-before-function-paren': 0,
// for Meteor API's that rely on `this` context, e.g. Template.onCreated and publications
'func-names': 0,
'prefer-arrow-callback': 0
}
'prefer-arrow-callback': 0,
},
};

View File

@@ -8,14 +8,14 @@
},
"repository": {
"type": "git",
"url": "git+https://github.com/meteor/eslint-config-meteor.git"
"url": "git+https://github.com/meteor/meteor.git"
},
"author": "David Burles",
"license": "MIT",
"bugs": {
"url": "https://github.com/meteor/eslint-config-meteor/issues"
"url": "https://github.com/meteor/meteor/issues"
},
"homepage": "https://github.com/meteor/eslint-config-meteor#readme",
"homepage": "https://github.com/meteor/meteor/tree/devel/npm-packages/eslint-config-meteor#readme",
"peerDependencies": {
"babel-eslint": ">= 7",
"eslint": ">= 3",

View File

@@ -67,7 +67,6 @@ tools/runners/run-app.js
tools/runners/run-mongo.js
tools/runners/run-proxy.js
tools/runners/run-selenium.js
tools/runners/run-updater.js
tools/packaging/package-client.js
tools/packaging/package-map.js

View File

@@ -1,6 +1,6 @@
{
"name": "eslint-plugin-meteor",
"version": "7.3.0",
"version": "7.4.0",
"author": "Dominik Ferber <dominik.ferber+npm@gmail.com>",
"description": "Meteor specific linting rules for ESLint",
"main": "lib/index.js",

View File

@@ -13,7 +13,7 @@ var packageJson = {
fibers: "https://github.com/meteor/node-fibers/archive/refs/tags/5.0.0.tar.gz",
"meteor-promise": "0.9.0",
promise: "8.1.0",
"@meteorjs/reify": "0.23.0",
"@meteorjs/reify": "0.24.0",
"@babel/parser": "7.15.3",
"@types/underscore": "1.11.2",
underscore: "1.13.1",

View File

@@ -14,13 +14,13 @@ var packageJson = {
pacote: "https://github.com/meteor/pacote/tarball/a81b0324686e85d22c7688c47629d4009000e8b8",
"node-gyp": "8.0.0",
"node-pre-gyp": "0.15.0",
typescript: "4.5.4",
"@meteorjs/babel": "7.16.0-beta.1",
typescript: "4.9.4",
"@meteorjs/babel": "7.18.0-beta.6",
// Keep the versions of these packages consistent with the versions
// found in dev-bundle-server-package.js.
"meteor-promise": "0.9.0",
fibers: "https://github.com/meteor/node-fibers/archive/refs/tags/5.0.0.tar.gz",
"@meteorjs/reify": "0.23.0",
"@meteorjs/reify": "0.24.0",
// So that Babel can emit require("@babel/runtime/helpers/...") calls.
"@babel/runtime": "7.15.3",
// For backwards compatibility with isopackets that still depend on

View File

@@ -185,12 +185,16 @@ function getDefaultsForNode8(features) {
// Ensure that async functions run in a Fiber, while also taking
// full advantage of native async/await support in Node 8.
combined.plugins.push([require("./plugins/async-await.js"), {
// Do not transform `await x` to `Promise.await(x)`, since Node
// 8 has native support for await expressions.
useNativeAsyncAwait: false
}]);
const isFiberDisabled = process.env.DISABLE_FIBERS === '1';
const ignoreAsyncPlugin = process.env.IGNORE_ASYNC_PLUGIN === '1';
if (!ignoreAsyncPlugin) {
combined.plugins.push([require("./plugins/async-await.js"), {
// Do not transform `await x` to `Promise.await(x)`, since Node
// 8 has native support for await expressions.
useNativeAsyncAwait: isFiberDisabled,
}]);
}
// Enable async generator functions proposal.
combined.plugins.push(require("@babel/plugin-proposal-async-generator-functions"));
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,7 +1,7 @@
{
"name": "@meteorjs/babel",
"author": "Meteor <dev@meteor.com>",
"version": "7.16.0-beta.1",
"version": "7.18.0-beta.6",
"license": "MIT",
"description": "Babel wrapper package for use with Meteor",
"keywords": [
@@ -37,7 +37,7 @@
"@babel/plugin-transform-modules-commonjs": "^7.16.8",
"@babel/plugin-transform-runtime": "^7.17.0",
"@babel/preset-react": "^7.16.7",
"@babel/runtime": "^7.17.2",
"@babel/runtime": "7.17.2",
"@babel/template": "^7.16.7",
"@babel/traverse": "^7.17.0",
"@babel/types": "^7.17.0",
@@ -47,7 +47,7 @@
"convert-source-map": "^1.6.0",
"lodash": "^4.17.21",
"meteor-babel-helpers": "0.0.3",
"typescript": "^4.5.4"
"typescript": "~4.9.4"
},
"devDependencies": {
"@babel/plugin-proposal-decorators": "7.14.5",

View File

@@ -9,7 +9,7 @@ module.exports = function (babel) {
Function: {
exit: function (path) {
const node = path.node;
if (! node.async) {
if (!node.async) {
return;
}

View File

@@ -11,19 +11,21 @@ Module.prototype.resolve = function (id) {
require("@meteorjs/reify/lib/runtime").enable(Module.prototype);
require("meteor-promise").makeCompatible(
global.Promise = global.Promise ||
require("promise/lib/es6-extensions"),
require("fibers")
);
if (!process.env.DISABLE_FIBERS) {
require("meteor-promise").makeCompatible(
global.Promise = global.Promise ||
require("promise/lib/es6-extensions"),
require("fibers")
);
// If Promise.asyncApply is defined, use it to wrap calls to
// regeneratorRuntime.async so that the entire async function will run in
// its own Fiber, not just the code that comes after the first await.
if (typeof Promise.asyncApply === "function") {
var regeneratorRuntime = require("@babel/runtime/regenerator");
var realAsync = regeneratorRuntime.async;
regeneratorRuntime.async = function (innerFn) {
return Promise.asyncApply(realAsync, regeneratorRuntime, arguments);
};
if (typeof Promise.asyncApply === "function") {
var regeneratorRuntime = require("@babel/runtime/regenerator");
var realAsync = regeneratorRuntime.async;
regeneratorRuntime.async = function (innerFn) {
return Promise.asyncApply(realAsync, regeneratorRuntime, arguments);
};
}
}

View File

@@ -1,5 +1,7 @@
## Meteor Installer
Node.js <=14.x and npm <=6.x is recommended.
Install Meteor by running:
```bash
@@ -12,6 +14,16 @@ npm install -g meteor
| NPM Package | Meteor Official Release |
|-------------|-------------------------|
| 2.12.1 | 2.12.0 |
| 2.12.0 | 2.12.0 |
| 2.11.0 | 2.11.0 |
| 2.10.0 | 2.10.0 |
| 2.9.1 | 2.9.1 |
| 2.9.0 | 2.9.0 |
| 2.8.2 | 2.8.1 |
| 2.8.1 | 2.8.1 |
| 2.8.0 | 2.8.0 |
| 2.7.5 | 2.7.3 |
| 2.7.4 | 2.7.3 |
| 2.7.3 | 2.7.2 |
| 2.7.2 | 2.7.1 |
@@ -20,6 +32,7 @@ npm install -g meteor
| 2.6.2 | 2.6.1 |
| 2.6.1 | 2.6 |
| 2.6.0 | 2.6 |
| 2.5.9 | 2.5.8 |
| 2.5.8 | 2.5.7 |
| 2.5.7 | 2.5.6 |
| 2.5.6 | 2.5.5 |
@@ -41,7 +54,7 @@ npm install -g meteor
### Important note
This npm package is not Meteor itself, this npm package is just an installer. You should not include it as a dependency in your project. If you do your deploy is going to be broken.
This npm package is not Meteor itself, it is just an installer. You should not include it as a dependency in your project. If you do, your deployment is going to be broken.
### Path management
@@ -52,3 +65,8 @@ npm install -g meteor --ignore-meteor-setup-exec-path
```
(or by setting the environment variable `npm_config_ignore_meteor_setup_exec_path=true`)
### Proxy configuration
Setting the `https_proxy` or `HTTPS_PROXY` environment variable to a valid proxy URL will cause the
downloader to use the configured proxy to retrieve the Meteor files.

View File

@@ -14,7 +14,7 @@ if (!command) {
}
if (command === 'install') {
require('./install.js');
require('./install');
} else if (command === 'uninstall') {
const { uninstall } = require('./uninstall');
uninstall();

View File

@@ -1,7 +1,7 @@
const path = require('path');
const os = require('os');
const METEOR_LATEST_VERSION = '2.7.3';
const METEOR_LATEST_VERSION = '2.12';
const sudoUser = process.env.SUDO_USER || '';
function isRoot() {
return process.getuid && process.getuid() === 0;
@@ -31,9 +31,8 @@ if (isWindows() && !localAppData) {
throw new Error('LOCALAPPDATA env var is not set.');
}
const shouldSetupExecPath = () => {
return !process.env.npm_config_ignore_meteor_setup_exec_path;
}
const shouldSetupExecPath = () =>
!process.env.npm_config_ignore_meteor_setup_exec_path;
const meteorLocalFolder = '.meteor';
const meteorPath = path.resolve(rootPath, meteorLocalFolder);

View File

@@ -4,7 +4,7 @@ const Seven = require('node-7z');
const fs = require('fs');
const { resolve, dirname } = require('path');
const child_process = require('child_process');
const { isMac } = require('./config.js')
const { isMac } = require('./config.js');
function extractWith7Zip(tarPath, destination, onProgress) {
return new Promise((resolve, reject) => {
@@ -29,7 +29,7 @@ function extractWith7Zip(tarPath, destination, onProgress) {
function createSymlinks(symlinks, baseDir) {
symlinks.forEach(({ path, linkPath }) => {
try {
let resolveBase = resolve(baseDir, dirname(path));
const resolveBase = resolve(baseDir, dirname(path));
const result = fs.statSync(resolve(resolveBase, linkPath));
if (result.isDirectory()) {
@@ -45,7 +45,7 @@ function createSymlinks(symlinks, baseDir) {
});
}
function extractWithNativeTar(tarPath, destination, onProgress) {
function extractWithNativeTar(tarPath, destination) {
child_process.execSync(
`tar -xf "${tarPath}" ${
!isMac() ? `--checkpoint-action=ttyout="#%u: %T \r"` : ``
@@ -60,7 +60,7 @@ function extractWithNativeTar(tarPath, destination, onProgress) {
}
function extractWithTar(tarPath, destination, onProgress) {
let symlinks = [];
const symlinks = [];
let total = 0;
// This takes a few seconds, but lets us show the progress

View File

@@ -3,11 +3,14 @@ const cliProgress = require('cli-progress');
const Seven = require('node-7z');
const path = require('path');
const sevenBin = require('7zip-bin');
const fs = require('fs');
const semver = require('semver');
const child_process = require('child_process');
const fsPromises = fs.promises;
const tmp = require('tmp');
const os = require('os');
const fs = require('fs');
const fsPromises = fs.promises;
const {
meteorPath,
release,
@@ -20,14 +23,28 @@ const {
isMac,
METEOR_LATEST_VERSION,
shouldSetupExecPath,
} = require('./config.js');
} = require('./config');
const { uninstall } = require('./uninstall');
const {
extractWithTar,
extractWith7Zip,
extractWithNativeTar,
} = require('./extract.js');
const semver = require('semver');
} = require('./extract');
const { engines } = require('./package.json');
const nodeVersion = engines.node;
const npmVersion = engines.npm;
// Compare installed NodeJs version with required NodeJs version
if (!semver.satisfies(process.version, nodeVersion)) {
console.warn(
`WARNING: Recommended versions are Node.js ${nodeVersion} and npm ${npmVersion}.`
);
console.warn(
`We recommend using a Node version manager like NVM or Volta to install Node.js and npm.\n`
);
}
const isInstalledGlobally = process.env.npm_config_global === 'true';
if (!isInstalledGlobally) {
@@ -36,7 +53,7 @@ if (!isInstalledGlobally) {
'You are not using a global npm context to install, you should never add meteor to your package.json.'
);
console.error('Make sure you pass -g to npm install.');
console.error('Aborting');
console.error('Aborting...');
console.error('******************************************');
process.exit(1);
}
@@ -44,7 +61,10 @@ process.on('unhandledRejection', err => {
throw err;
});
if (os.arch() !== 'x64') {
const isValidM1Version = semver.gte(semver.coerce(METEOR_LATEST_VERSION), '2.5.1-beta.3');
const isValidM1Version = semver.gte(
semver.coerce(METEOR_LATEST_VERSION),
'2.5.1-beta.3'
);
if (os.arch() !== 'arm64' || !isMac() || !isValidM1Version) {
console.error(
'The current architecture is not supported in this version: ',
@@ -133,6 +153,17 @@ try {
download();
function generateProxyAgent() {
const proxyUrl = process.env.https_proxy || process.env.HTTPS_PROXY;
if (!proxyUrl) {
return undefined;
}
const HttpsProxyAgent = require('https-proxy-agent');
return new HttpsProxyAgent(proxyUrl);
}
function download() {
const start = Date.now();
const downloadProgress = new cliProgress.SingleBar(
@@ -148,6 +179,9 @@ function download() {
retry: { maxRetries: 5, delay: 5000 },
override: true,
fileName: tarGzName,
httpsRequestOptions: {
agent: generateProxyAgent(),
},
});
dl.on('progress', ({ progress }) => {
@@ -226,7 +260,7 @@ async function extract() {
fileCount: 0,
});
let tarPath = path.resolve(tempPath, tarName);
const tarPath = path.resolve(tempPath, tarName);
// 7Zip is ~15% faster, but doesn't work when the user doesn't have permission to create symlinks
// TODO: we could always use 7zip if we have it ignore the symlinks, and then manually create them as
// is done in extractWithTar
@@ -255,15 +289,14 @@ async function setup() {
}
async function setupExecPath() {
if (isWindows()) {
//set for the current session and beyond
// set for the current session and beyond
child_process.execSync(`setx path "${meteorPath}/;%path%`);
return;
}
const exportCommand = `export PATH=${meteorPath}:$PATH`;
const appendPathToFile = async file => {
return fsPromises.appendFile(`${rootPath}/${file}`, `${exportCommand}\n`);
};
const appendPathToFile = async file =>
fsPromises.appendFile(`${rootPath}/${file}`, `${exportCommand}\n`);
if (process.env.SHELL && process.env.SHELL.includes('zsh')) {
await appendPathToFile('.zshrc');

View File

@@ -1,6 +1,6 @@
{
"name": "meteor",
"version": "2.7.4",
"version": "2.12.1",
"description": "Install Meteor",
"main": "install.js",
"scripts": {
@@ -9,16 +9,21 @@
"author": "zodern",
"license": "MIT",
"dependencies": {
"7zip-bin": "^5.0.3",
"cli-progress": "^3.5.0",
"node-7z": "^2.0.5",
"node-downloader-helper": "^1.0.11",
"7zip-bin": "^5.2.0",
"cli-progress": "^3.11.1",
"https-proxy-agent": "^5.0.1",
"node-7z": "^2.1.2",
"node-downloader-helper": "^1.0.19",
"rimraf": "^3.0.2",
"semver": "^7.3.5",
"tar": "^6.1.0",
"tmp": "^0.1.0"
"semver": "^7.3.7",
"tar": "^6.1.11",
"tmp": "^0.2.1"
},
"bin": {
"meteor-installer": "cli.js"
},
"engines": {
"node": "<=14.x",
"npm": "<=6.x"
}
}

View File

@@ -1,20 +1,20 @@
const { meteorPath } = require('./config.js');
const { meteorPath } = require('./config');
const rimraf = require('rimraf');
function uninstall() {
console.log(`Uninstalling Meteor from ${meteorPath}`);
try {
rimraf.sync(meteorPath)
rimraf.sync(meteorPath);
} catch (err) {
console.log('Encountered error while uninstalling:');
console.error(err);
process.exit(1);
}
console.log('Successfully uninstalled Meteor');
}
module.exports = {
uninstall
}
uninstall,
};

View File

@@ -19,6 +19,21 @@
"eslintConfig": {
"extends": [
"@quave/quave"
]
],
"rules": {
"global-require": "off",
"no-console": "off",
"camelcase": "warn",
"consistent-return": "off",
"quotes": "warn",
"no-shadow": [
"error",
{
"allow": ["resolve"]
}
],
"no-use-before-define": "warn",
"import/no-unresolved": "warn"
}
}
}

View File

@@ -0,0 +1 @@
node_modules

View File

@@ -0,0 +1,7 @@
This directory and the files immediately inside it are automatically generated
when you change this package's NPM dependencies. Commit the files in this
directory (npm-shrinkwrap.json, .gitignore, and this README) to source control
so that others run the same versions of sub-dependencies.
You should NOT check in the node_modules directory that Meteor automatically
creates; if you are using git, the .gitignore file tells git to ignore it.

View File

@@ -0,0 +1,40 @@
{
"lockfileVersion": 1,
"dependencies": {
"@types/node": {
"version": "18.13.0",
"resolved": "https://registry.npmjs.org/@types/node/-/node-18.13.0.tgz",
"integrity": "sha512-gC3TazRzGoOnoKAhUx+Q0t8S9Tzs74z7m0ipwGpSqQrleP14hKxP4/JUeEQcD3W1/aIpnWl8pHowI7WokuZpXg=="
},
"@types/notp": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/@types/notp/-/notp-2.0.2.tgz",
"integrity": "sha512-JUcVYN9Tmw0AjoAfvjslS4hbv39fPBbZdftBK3b50g5z/DmhLsu6cd0UOEBiQuMwy2FirshF2Gk9gAvfWjshMw=="
},
"node-2fa": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/node-2fa/-/node-2fa-2.0.3.tgz",
"integrity": "sha512-PQldrOhjuoZyoydMvMSctllPN1ZPZ1/NwkEcgYwY9faVqE/OymxR+3awPpbWZxm6acLKqvmNqQmdqTsqYyflFw=="
},
"notp": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/notp/-/notp-2.0.3.tgz",
"integrity": "sha512-oBig/2uqkjQ5AkBuw4QJYwkEWa/q+zHxI5/I5z6IeP2NT0alpJFsP/trrfCC+9xOAgQSZXssNi962kp5KBmypQ=="
},
"qrcode-svg": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/qrcode-svg/-/qrcode-svg-1.1.0.tgz",
"integrity": "sha512-XyQCIXux1zEIA3NPb0AeR8UMYvXZzWEhgdBgBjH9gO7M48H9uoHzviNz8pXw3UzrAcxRRRn9gxHewAVK7bn9qw=="
},
"thirty-two": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/thirty-two/-/thirty-two-1.0.2.tgz",
"integrity": "sha512-OEI0IWCe+Dw46019YLl6V10Us5bi574EvlJEOcAkB29IzQ/mYD1A6RyNHLjZPiHCmuodxvgF6U+vZO1L15lxVA=="
},
"tslib": {
"version": "2.5.0",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.0.tgz",
"integrity": "sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg=="
}
}
}

View File

@@ -1,5 +1,5 @@
Package.describe({
version: '2.0.1',
version: '2.0.2',
summary:
'Package used to enable two factor authentication through OTP protocol',
});

View File

@@ -0,0 +1,363 @@
import { Mongo } from 'meteor/mongo';
import { Meteor } from 'meteor/meteor';
import { Configuration } from 'meteor/service-configuration';
export interface URLS {
resetPassword: (token: string) => string;
verifyEmail: (token: string) => string;
enrollAccount: (token: string) => string;
}
export interface EmailFields {
from?: ((user: Meteor.User) => string) | undefined;
subject?: ((user: Meteor.User) => string) | undefined;
text?: ((user: Meteor.User, url: string) => string) | undefined;
html?: ((user: Meteor.User, url: string) => string) | undefined;
}
export namespace Accounts {
var urls: URLS;
function user(options?: {
fields?: Mongo.FieldSpecifier | undefined;
}): Meteor.User | null;
function userAsync(options?: {
fields?: Mongo.FieldSpecifier | undefined;
}): Promise<Meteor.User | null>;
function userId(): string | null;
function createUser(
options: {
username?: string | undefined;
email?: string | undefined;
password?: string | undefined;
profile?: Meteor.UserProfile | undefined;
},
callback?: (error?: Error | Meteor.Error | Meteor.TypedError) => void
): string;
function createUserAsync(
options: {
username?: string | undefined;
email?: string | undefined;
password?: string | undefined;
profile?: Meteor.UserProfile | undefined;
},
callback?: (error?: Error | Meteor.Error | Meteor.TypedError) => void
): Promise<string>;
function config(options: {
sendVerificationEmail?: boolean | undefined;
forbidClientAccountCreation?: boolean | undefined;
restrictCreationByEmailDomain?: string | Function | undefined;
loginExpirationInDays?: number | undefined;
oauthSecretKey?: string | undefined;
passwordResetTokenExpirationInDays?: number | undefined;
passwordEnrollTokenExpirationInDays?: number | undefined;
ambiguousErrorMessages?: boolean | undefined;
defaultFieldSelector?: { [key: string]: 0 | 1 } | undefined;
}): void;
function onLogin(
func: Function
): {
stop: () => void;
};
function onLoginFailure(
func: Function
): {
stop: () => void;
};
var loginServiceConfiguration: Mongo.Collection<Configuration>
function loginServicesConfigured(): boolean;
function onPageLoadLogin(func: Function): void;
}
export namespace Accounts {
function changePassword(
oldPassword: string,
newPassword: string,
callback?: (error?: Error | Meteor.Error | Meteor.TypedError) => void
): void;
function forgotPassword(
options: { email?: string | undefined },
callback?: (error?: Error | Meteor.Error | Meteor.TypedError) => void
): void;
function resetPassword(
token: string,
newPassword: string,
callback?: (error?: Error | Meteor.Error | Meteor.TypedError) => void
): void;
function verifyEmail(
token: string,
callback?: (error?: Error | Meteor.Error | Meteor.TypedError) => void
): void;
function onEmailVerificationLink(callback: Function): void;
function onEnrollmentLink(callback: Function): void;
function onResetPasswordLink(callback: Function): void;
function loggingIn(): boolean;
function loggingOut(): boolean;
function logout(
callback?: (error?: Error | Meteor.Error | Meteor.TypedError) => void
): void;
function logoutOtherClients(
callback?: (error?: Error | Meteor.Error | Meteor.TypedError) => void
): void;
type PasswordSignupField = 'USERNAME_AND_EMAIL' | 'USERNAME_AND_OPTIONAL_EMAIL' | 'USERNAME_ONLY' | 'EMAIL_ONLY';
type PasswordlessSignupField = 'USERNAME_AND_EMAIL' | 'EMAIL_ONLY';
var ui: {
config(options: {
requestPermissions?: Record<string, string[]> | undefined;
requestOfflineToken?: Record<'google', boolean> | undefined;
forceApprovalPrompt?: Record<'google', boolean> | undefined;
passwordSignupFields?: PasswordSignupField | PasswordSignupField[] | undefined;
passwordlessSignupFields?: PasswordlessSignupField | PasswordlessSignupField[] | undefined;
}): void;
};
}
export interface Header {
[id: string]: string;
}
export interface EmailTemplates {
from: string;
siteName: string;
headers?: Header | undefined;
resetPassword: EmailFields;
enrollAccount: EmailFields;
verifyEmail: EmailFields;
}
export namespace Accounts {
var emailTemplates: EmailTemplates;
function addEmail(userId: string, newEmail: string, verified?: boolean): void;
function removeEmail(userId: string, email: string): void;
function onCreateUser(
func: (options: { profile?: {} | undefined }, user: Meteor.User) => void
): void;
function findUserByEmail(
email: string,
options?: { fields?: Mongo.FieldSpecifier | undefined }
): Meteor.User | null | undefined;
function findUserByUsername(
username: string,
options?: { fields?: Mongo.FieldSpecifier | undefined }
): Meteor.User | null | undefined;
function sendEnrollmentEmail(
userId: string,
email?: string,
extraTokenData?: Record<string, unknown>,
extraParams?: Record<string, unknown>
): void;
function sendResetPasswordEmail(
userId: string,
email?: string,
extraTokenData?: Record<string, unknown>,
extraParams?: Record<string, unknown>
): void;
function sendVerificationEmail(
userId: string,
email?: string,
extraTokenData?: Record<string, unknown>,
extraParams?: Record<string, unknown>
): void;
function setUsername(userId: string, newUsername: string): void;
function setPassword(
userId: string,
newPassword: string,
options?: { logout?: boolean | undefined }
): void;
function setPasswordAsync(
userId: string,
newPassword: string,
options?: { logout?: boolean | undefined }
): Promise<void>;
function validateNewUser(func: Function): boolean;
function validateLoginAttempt(
func: Function
): {
stop: () => void;
};
function _hashPassword(
password: string
): { digest: string; algorithm: string };
interface IValidateLoginAttemptCbOpts {
type: string;
allowed: boolean;
error: Meteor.Error;
user: Meteor.User;
connection: Meteor.Connection;
methodName: string;
methodArguments: any[];
}
}
export namespace Accounts {
function onLogout(func: Function): void;
}
export namespace Accounts {
function onLogout(
func: (options: {
user: Meteor.User;
connection: Meteor.Connection;
}) => void
): void;
}
export namespace Accounts {
interface LoginMethodOptions {
/**
* The method to call (default 'login')
*/
methodName?: string | undefined;
/**
* The arguments for the method
*/
methodArguments?: any[] | undefined;
/**
* If provided, will be called with the result of the
* method. If it throws, the client will not be logged in (and
* its error will be passed to the callback).
*/
validateResult?: Function | undefined;
/**
* Will be called with no arguments once the user is fully
* logged in, or with the error on error.
*/
userCallback?: ((err?: any) => void) | undefined;
}
/**
*
* Call a login method on the server.
*
* A login method is a method which on success calls `this.setUserId(id)` and
* `Accounts._setLoginToken` on the server and returns an object with fields
* 'id' (containing the user id), 'token' (containing a resume token), and
* optionally `tokenExpires`.
*
* This function takes care of:
* - Updating the Meteor.loggingIn() reactive data source
* - Calling the method in 'wait' mode
* - On success, saving the resume token to localStorage
* - On success, calling Accounts.connection.setUserId()
* - Setting up an onReconnect handler which logs in with
* the resume token
*
* Options:
* - methodName: The method to call (default 'login')
* - methodArguments: The arguments for the method
* - validateResult: If provided, will be called with the result of the
* method. If it throws, the client will not be logged in (and
* its error will be passed to the callback).
* - userCallback: Will be called with no arguments once the user is fully
* logged in, or with the error on error.
*
* */
function callLoginMethod(options: LoginMethodOptions): void;
type LoginMethodResult = { error: Error } | {
userId: string;
error?: Error;
stampedLoginToken?: StampedLoginToken;
options?: Record<string, any>;
};
/**
*
* The main entry point for auth packages to hook in to login.
*
* A login handler is a login method which can return `undefined` to
* indicate that the login request is not handled by this handler.
*
* @param name {String} Optional. The service name, used by default
* if a specific service name isn't returned in the result.
*
* @param handler {Function} A function that receives an options object
* (as passed as an argument to the `login` method) and returns one of:
* - `undefined`, meaning don't handle;
* - a login method result object
**/
function registerLoginHandler(
handler: (options: any) => undefined | LoginMethodResult
): void;
function registerLoginHandler(
name: string,
handler: (options: any) => undefined | LoginMethodResult
): void;
type Password =
| string
| {
digest: string;
algorithm: 'sha-256';
};
/**
*
* Check whether the provided password matches the bcrypt'ed password in
* the database user record. `password` can be a string (in which case
* it will be run through SHA256 before bcrypt) or an object with
* properties `digest` and `algorithm` (in which case we bcrypt
* `password.digest`).
*/
function _checkPassword(
user: Meteor.User,
password: Password
): { userId: string; error?: any };
}
export namespace Accounts {
type StampedLoginToken = {
token: string;
when: Date;
};
type HashedStampedLoginToken = {
hashedToken: string;
when: Date;
};
function _generateStampedLoginToken(): StampedLoginToken;
function _hashStampedToken(token: StampedLoginToken): HashedStampedLoginToken;
function _insertHashedLoginToken<T>(
userId: string,
token: HashedStampedLoginToken,
query?: Mongo.Selector<T> | Mongo.ObjectID | string
): void;
function _hashLoginToken(token: string): string;
}

View File

@@ -798,6 +798,11 @@ if (Package.blaze) {
*/
Template.registerHelper('currentUser', () => Meteor.user());
// TODO: the code above needs to be changed to Meteor.userAsync() when we have
// a way to make it reactive using async.
// Template.registerHelper('currentUserAsync',
// async () => await Meteor.userAsync());
/**
* @global
* @name loggingIn

View File

@@ -94,6 +94,20 @@ Tinytest.addAsync(
}
);
Tinytest.addAsync(
'accounts async - Meteor.loggingIn() is false after login has completed',
(test, done) => {
logoutAndCreateUser(test, done, () => {
// Login then verify loggingIn is false after login has completed
Meteor.loginWithPassword(username, password, async () => {
test.isFalse(Meteor.loggingIn());
test.isTrue(await Meteor.userAsync());
removeTestUser(done);
});
});
}
);
Tinytest.addAsync(
'accounts - Meteor.loggingOut() is true right after a logout call',
(test, done) => {
@@ -150,7 +164,7 @@ Tinytest.addAsync(
);
Tinytest.addAsync(
'accounts - Meteor.user obeys explicit and default field selectors',
'accounts - Meteor.user() obeys explicit and default field selectors',
(test, done) => {
logoutAndCreateUser(test, done, () => {
Meteor.loginWithPassword(username, password, () => {
@@ -178,6 +192,38 @@ Tinytest.addAsync(
}
);
Tinytest.addAsync(
'accounts async - Meteor.userAsync() obeys explicit and default field selectors',
(test, done) => {
logoutAndCreateUser(test, done, () => {
Meteor.loginWithPassword(username, password, async () => {
// by default, all fields should be returned
let user;
user = await Meteor.userAsync();
test.equal(user.profile[excludeField], excludeValue);
// this time we want to exclude the default fields
const options = Accounts._options;
Accounts._options = {};
Accounts.config({ defaultFieldSelector: { ['profile.' + defaultExcludeField]: 0 } });
user = await Meteor.userAsync();
test.isUndefined(user.profile[defaultExcludeField]);
test.equal(user.profile[excludeField], excludeValue);
test.equal(user.profile.name, username);
// this time we only want certain fields...
user = await Meteor.userAsync({ fields: { 'profile.name': 1 } });
test.isUndefined(user.profile[excludeField]);
test.isUndefined(user.profile[defaultExcludeField]);
test.equal(user.profile.name, username);
Accounts._options = options;
removeTestUser(done);
});
});
}
);
Tinytest.addAsync(
'accounts-2fa - Meteor.loginWithPasswordAnd2faCode() fails when token is not provided',

View File

@@ -16,6 +16,7 @@ const VALID_CONFIG_KEYS = [
'defaultFieldSelector',
'loginTokenExpirationHours',
'tokenSequenceLength',
'collection',
];
/**
@@ -26,6 +27,8 @@ const VALID_CONFIG_KEYS = [
* @param options {Object} an object with fields:
* - connection {Object} Optional DDP connection to reuse.
* - ddpUrl {String} Optional URL for creating a new DDP connection.
* - collection {String|Mongo.Collection} The name of the Mongo.Collection
* or the Mongo.Collection object to hold the users.
*/
export class AccountsCommon {
constructor(options) {
@@ -40,10 +43,7 @@ export class AccountsCommon {
// There is an allow call in accounts_server.js that restricts writes to
// this collection.
this.users = new Mongo.Collection('users', {
_preventAutopublish: true,
connection: this.connection,
});
this.users = this._initializeCollection(options || {});
// Callback exceptions are printed with Meteor._debug and ignored.
this._onLoginHook = new Hook({
@@ -79,40 +79,29 @@ export class AccountsCommon {
// should come up with a more generic way to do this (eg, with some sort of
// symbolic error code rather than a number).
this.LoginCancelledError.numericError = 0x8acdc2f;
}
// loginServiceConfiguration and ConfigError are maintained for backwards compatibility
Meteor.startup(() => {
const { ServiceConfiguration } = Package['service-configuration'];
this.loginServiceConfiguration = ServiceConfiguration.configurations;
this.ConfigError = ServiceConfiguration.ConfigError;
_initializeCollection(options) {
if (options.collection && typeof options.collection !== 'string' && !(options.collection instanceof Mongo.Collection)) {
throw new Meteor.Error('Collection parameter can be only of type string or "Mongo.Collection"');
}
const settings = Meteor.settings?.packages?.['accounts-base'];
if (settings) {
if (settings.oauthSecretKey) {
if (!Package['oauth-encryption']) {
throw new Error(
'The oauth-encryption package must be loaded to set oauthSecretKey'
);
}
Package['oauth-encryption'].OAuthEncryption.loadKey(
settings.oauthSecretKey
);
delete settings.oauthSecretKey;
}
// Validate config options keys
Object.keys(settings).forEach(key => {
if (!VALID_CONFIG_KEYS.includes(key)) {
// TODO Consider just logging a debug message instead to allow for additional keys in the settings here?
throw new Meteor.Error(
`Accounts configuration: Invalid key: ${key}`
);
} else {
// set values in Accounts._options
this._options[key] = settings[key];
}
});
}
});
let collectionName = 'users';
if (typeof options.collection === 'string') {
collectionName = options.collection;
}
let collection;
if (options.collection instanceof Mongo.Collection) {
collection = options.collection;
} else {
collection = new Mongo.Collection(collectionName, {
_preventAutopublish: true,
connection: this.connection,
});
}
return collection;
}
/**
@@ -170,6 +159,18 @@ export class AccountsCommon {
: null;
}
/**
* @summary Get the current user record, or `null` if no user is logged in.
* @locus Anywhere
* @param {Object} [options]
* @param {MongoFieldSpecifier} options.fields Dictionary of fields to return or exclude.
*/
async userAsync(options) {
const userId = this.userId();
return userId
? this.users.findOneAsync(userId, this._addDefaultFieldSelector(options))
: null;
}
// Set up config for the accounts system. Call this on both the client
// and the server.
//
@@ -194,6 +195,8 @@ export class AccountsCommon {
// - loginExpirationInDays {Number}
// Number of days since login until a user is logged out (login token
// expires).
// - collection {String|Mongo.Collection}
// A collection name or a Mongo.Collection object to hold the users.
// - passwordResetTokenExpirationInDays {Number}
// Number of days since password reset token creation until the
// token cannt be used any longer (password reset token expires).
@@ -220,6 +223,7 @@ export class AccountsCommon {
* @param {Number} options.passwordEnrollTokenExpiration The number of milliseconds from when a link to set initial password is sent until token expires and user can't set password with the link anymore. If `passwordEnrollTokenExpirationInDays` is set, it takes precedent.
* @param {Boolean} options.ambiguousErrorMessages Return ambiguous error messages from login failures to prevent user enumeration. Defaults to false.
* @param {MongoFieldSpecifier} options.defaultFieldSelector To exclude by default large custom fields from `Meteor.user()` and `Meteor.findUserBy...()` functions when called without a field selector, and all `onLogin`, `onLoginFailure` and `onLogout` callbacks. Example: `Accounts.config({ defaultFieldSelector: { myBigArray: 0 }})`. Beware when using this. If, for instance, you do not include `email` when excluding the fields, you can have problems with functions like `forgotPassword` that will break because they won't have the required data available. It's recommend that you always keep the fields `_id`, `username`, and `email`.
* @param {String|Mongo.Collection} options.collection A collection name or a Mongo.Collection object to hold the users.
* @param {Number} options.loginTokenExpirationHours When using the package `accounts-2fa`, use this 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.
* @param {Number} options.tokenSequenceLength When using the package `accounts-2fa`, use this to the size of the token sequence generated. The default is 6.
*/
@@ -264,6 +268,7 @@ export class AccountsCommon {
// Validate config options keys
Object.keys(options).forEach(key => {
if (!VALID_CONFIG_KEYS.includes(key)) {
// TODO Consider just logging a debug message instead to allow for additional keys in the settings here?
throw new Meteor.Error(`Accounts.config: Invalid key: ${key}`);
}
});
@@ -272,11 +277,17 @@ export class AccountsCommon {
VALID_CONFIG_KEYS.forEach(key => {
if (key in options) {
if (key in this._options) {
throw new Meteor.Error(`Can't set \`${key}\` more than once`);
if (key !== 'collection') {
throw new Meteor.Error(`Can't set \`${key}\` more than once`);
}
}
this._options[key] = options[key];
}
});
if (options.collection && options.collection !== this.users._name && options.collection !== this.users) {
this.users = this._initializeCollection(options);
}
}
/**
@@ -418,6 +429,15 @@ Meteor.userId = () => Accounts.userId();
*/
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
* @importFromPackage meteor
* @param {Object} [options]
* @param {MongoFieldSpecifier} options.fields Dictionary of fields to return or exclude.
*/
Meteor.userAsync = options => Accounts.userAsync(options);
// how long (in days) until a login token expires
const DEFAULT_LOGIN_EXPIRATION_DAYS = 90;
// how long (in days) until reset password token expires
@@ -430,9 +450,6 @@ const DEFAULT_PASSWORD_ENROLL_TOKEN_EXPIRATION_DAYS = 30;
const MIN_TOKEN_LIFETIME_CAP_SECS = 3600; // one hour
// how often (in milliseconds) we check for expired tokens
export const EXPIRE_TOKENS_INTERVAL_MS = 600 * 1000; // 10 minutes
// how long we wait before logging out clients when Meteor.logoutOtherClients is
// called
export const CONNECTION_CLOSE_DELAY_MS = 10 * 1000;
// A large number of expiration days (approximately 100 years worth) that is
// used when creating unexpiring tokens.
const LOGIN_UNEXPIRING_TOKEN_DAYS = 365 * 100;

View File

@@ -1,4 +1,5 @@
import crypto from 'crypto';
import { Meteor } from 'meteor/meteor'
import {
AccountsCommon,
EXPIRE_TOKENS_INTERVAL_MS,
@@ -25,8 +26,8 @@ export class AccountsServer extends AccountsCommon {
// Note that this constructor is less likely to be instantiated multiple
// times than the `AccountsClient` constructor, because a single server
// can provide only one set of methods.
constructor(server) {
super();
constructor(server, options) {
super(options || {});
this._server = server || Meteor.server;
// Set up the server's methods, as if by calling Meteor.methods.
@@ -189,7 +190,7 @@ export class AccountsServer extends AccountsCommon {
throw new Error("Can only call onCreateUser once");
}
this._onCreateUserHook = func;
this._onCreateUserHook = Meteor.wrapFn(func);
}
/**
@@ -318,7 +319,7 @@ export class AccountsServer extends AccountsCommon {
// If user is not found, try a case insensitive lookup
if (!user) {
selector = this._selectorForFastCaseInsensitiveLookup(fieldName, fieldValue);
const candidateUsers = Meteor.users.find(selector, options).fetch();
const candidateUsers = Meteor.users.find(selector, { ...options, limit: 2 }).fetch();
// No match if multiple candidates are found
if (candidateUsers.length === 1) {
user = candidateUsers[0];
@@ -434,7 +435,7 @@ export class AccountsServer extends AccountsCommon {
// If the login is allowed and isn't aborted by a validate login hook
// callback, log in the user.
//
_attemptLogin(
async _attemptLogin(
methodInvocation,
methodName,
methodArgs,
@@ -494,18 +495,18 @@ export class AccountsServer extends AccountsCommon {
// Ensure that thrown exceptions are caught and that login hook
// callbacks are still called.
//
_loginMethod(
async _loginMethod(
methodInvocation,
methodName,
methodArgs,
type,
fn
) {
return this._attemptLogin(
return await this._attemptLogin(
methodInvocation,
methodName,
methodArgs,
tryLoginMethod(type, fn)
await tryLoginMethod(type, fn)
);
};
@@ -547,19 +548,14 @@ export class AccountsServer extends AccountsCommon {
/// LOGIN HANDLERS
///
// The main entry point for auth packages to hook in to login.
//
// A login handler is a login method which can return `undefined` to
// indicate that the login request is not handled by this handler.
//
// @param name {String} Optional. The service name, used by default
// if a specific service name isn't returned in the result.
//
// @param handler {Function} A function that receives an options object
// (as passed as an argument to the `login` method) and returns one of:
// - `undefined`, meaning don't handle;
// - a login method result object
/**
* @summary Registers a new login handler.
* @locus Server
* @param {String} [name] The type of login method like oauth, password, etc.
* @param {Function} handler A function that receives an options object
* (as passed as an argument to the `login` method) and returns one of
* `undefined`, meaning don't handle or a login method result object.
*/
registerLoginHandler(name, handler) {
if (! handler) {
handler = name;
@@ -568,7 +564,7 @@ export class AccountsServer extends AccountsCommon {
this._loginHandlers.push({
name: name,
handler: handler
handler: Meteor.wrapFn(handler)
});
};
@@ -587,11 +583,10 @@ export class AccountsServer extends AccountsCommon {
// Try all of the registered login handlers until one of them doesn't
// return `undefined`, meaning it handled this call to `login`. Return
// that return value.
_runLoginHandlers(methodInvocation, options) {
async _runLoginHandlers(methodInvocation, options) {
for (let handler of this._loginHandlers) {
const result = tryLoginMethod(
handler.name,
() => handler.handler.call(methodInvocation, options)
const result = await tryLoginMethod(handler.name, async () =>
await handler.handler.call(methodInvocation, options)
);
if (result) {
@@ -599,7 +594,10 @@ export class AccountsServer extends AccountsCommon {
}
if (result !== undefined) {
throw new Meteor.Error(400, "A login handler should return a result or undefined");
throw new Meteor.Error(
400,
'A login handler should return a result or undefined'
);
}
}
@@ -644,14 +642,15 @@ export class AccountsServer extends AccountsCommon {
// If successful, returns {token: reconnectToken, id: userId}
// If unsuccessful (for example, if the user closed the oauth login popup),
// throws an error describing the reason
methods.login = function (options) {
methods.login = async function (options) {
// Login handlers should really also check whatever field they look at in
// options, but we don't enforce it.
check(options, Object);
const result = accounts._runLoginHandlers(this, options);
const result = await accounts._runLoginHandlers(this, options);
//console.log({result});
return accounts._attemptLogin(this, "login", arguments, result);
return await accounts._attemptLogin(this, "login", arguments, result);
};
methods.logout = function () {
@@ -726,14 +725,19 @@ export class AccountsServer extends AccountsCommon {
throw new Meteor.Error(403, "Service unknown");
}
const { ServiceConfiguration } = Package['service-configuration'];
if (ServiceConfiguration.configurations.findOne({service: options.service}))
throw new Meteor.Error(403, `Service ${options.service} already configured`);
if (Package['service-configuration']) {
const { ServiceConfiguration } = Package['service-configuration'];
if (ServiceConfiguration.configurations.findOne({service: options.service}))
throw new Meteor.Error(403, `Service ${options.service} already configured`);
if (hasOwn.call(options, 'secret') && usingOAuthEncryption())
options.secret = OAuthEncryption.seal(options.secret);
if (Package["oauth-encryption"]) {
const { OAuthEncryption } = Package["oauth-encryption"]
if (hasOwn.call(options, 'secret') && OAuthEncryption.keyIsLoaded())
options.secret = OAuthEncryption.seal(options.secret);
}
ServiceConfiguration.configurations.insert(options);
ServiceConfiguration.configurations.insert(options);
}
};
accounts._server.methods(methods);
@@ -757,9 +761,12 @@ export class AccountsServer extends AccountsCommon {
const { users, _autopublishFields, _defaultPublishFields } = this;
// Publish all login service configuration fields other than secret.
this._server.publish("meteor.loginServiceConfiguration", () => {
const { ServiceConfiguration } = Package['service-configuration'];
return ServiceConfiguration.configurations.find({}, {fields: {secret: 0}});
this._server.publish("meteor.loginServiceConfiguration", function() {
if (Package['service-configuration']) {
const { ServiceConfiguration } = Package['service-configuration'];
return ServiceConfiguration.configurations.find({}, {fields: {secret: 0}});
}
this.ready();
}, {is_auto: true}); // not technically autopublish, but stops the warning.
// Use Meteor.startup to give other packages a chance to call
@@ -1512,10 +1519,10 @@ const cloneAttemptWithConnection = (connection, attempt) => {
return clonedAttempt;
};
const tryLoginMethod = (type, fn) => {
const tryLoginMethod = async (type, fn) => {
let result;
try {
result = fn();
result = await fn();
}
catch (e) {
result = {error: e};
@@ -1684,17 +1691,7 @@ const setExpireTokensInterval = accounts => {
}, EXPIRE_TOKENS_INTERVAL_MS);
};
///
/// OAuth Encryption Support
///
const OAuthEncryption =
Package["oauth-encryption"] &&
Package["oauth-encryption"].OAuthEncryption;
const usingOAuthEncryption = () => {
return OAuthEncryption && OAuthEncryption.keyIsLoaded();
};
const OAuthEncryption = Package["oauth-encryption"]?.OAuthEncryption;
// OAuth service data is temporarily stored in the pending credentials
// collection during the oauth authentication process. Sensitive data
@@ -1706,44 +1703,12 @@ const usingOAuthEncryption = () => {
const pinEncryptedFieldsToUser = (serviceData, userId) => {
Object.keys(serviceData).forEach(key => {
let value = serviceData[key];
if (OAuthEncryption && OAuthEncryption.isSealed(value))
if (OAuthEncryption?.isSealed(value))
value = OAuthEncryption.seal(OAuthEncryption.open(value), userId);
serviceData[key] = value;
});
};
// Encrypt unencrypted login service secrets when oauth-encryption is
// added.
//
// XXX For the oauthSecretKey to be available here at startup, the
// developer must call Accounts.config({oauthSecretKey: ...}) at load
// time, instead of in a Meteor.startup block, because the startup
// block in the app code will run after this accounts-base startup
// block. Perhaps we need a post-startup callback?
Meteor.startup(() => {
if (! usingOAuthEncryption()) {
return;
}
const { ServiceConfiguration } = Package['service-configuration'];
ServiceConfiguration.configurations.find({
$and: [{
secret: { $exists: true }
}, {
"secret.algorithm": { $exists: false }
}]
}).forEach(config => {
ServiceConfiguration.configurations.update(config._id, {
$set: {
secret: OAuthEncryption.seal(config.secret)
}
});
});
});
// XXX see comment on Accounts.createUser in passwords_server about adding a
// second "server options" argument.
const defaultCreateUserHook = (options, user) => {

View File

@@ -1,3 +1,4 @@
import { Mongo } from 'meteor/mongo';
import { URL } from 'meteor/url';
import { Meteor } from 'meteor/meteor';
import { Accounts } from 'meteor/accounts-base';
@@ -604,6 +605,62 @@ Tinytest.add(
}
);
Tinytest.addAsync(
'accounts async - Meteor.userAsync() obeys options.defaultFieldSelector',
async test => {
const ignoreFieldName = "bigArray";
const customField = "customField";
const userId = Accounts.insertUserDoc({}, { username: Random.id(), [ignoreFieldName]: [1], [customField]: 'test' });
const stampedToken = Accounts._generateStampedLoginToken();
Accounts._insertLoginToken(userId, stampedToken);
const options = Accounts._options;
// stub Meteor.userId() so it works outside methods and returns the correct user:
const origAccountsUserId = Accounts.userId;
Accounts.userId = () => userId;
Accounts._options = {};
// test the field is included by default
let user = await Meteor.userAsync();
test.isNotUndefined(user[ignoreFieldName], 'included by default');
// test the field is excluded
Accounts.config({ defaultFieldSelector: { [ignoreFieldName]: 0 } });
user = await Meteor.userAsync();
test.isUndefined(user[ignoreFieldName], 'excluded');
user = await Meteor.userAsync({});
test.isUndefined(user[ignoreFieldName], 'excluded {}');
// test the field can still be retrieved if required
user = await Meteor.userAsync({ fields: { [ignoreFieldName]: 1 } });
test.isNotUndefined(user[ignoreFieldName], 'field can be retrieved');
test.isUndefined(user.username, 'field can be retrieved username');
// test a combined negative field specifier
user = await Meteor.userAsync({ fields: { username: 0 } });
test.isUndefined(user[ignoreFieldName], 'combined field selector');
test.isUndefined(user.username, 'combined field selector username');
// test an explicit request for the full user object
user = await Meteor.userAsync({ fields: {} });
test.isNotUndefined(user[ignoreFieldName], 'full selector');
test.isNotUndefined(user.username, 'full selector username');
Accounts._options = {};
// Test that a custom field gets retrieved properly
Accounts.config({ defaultFieldSelector: { [customField]: 1 } });
user = await Meteor.userAsync();
test.isNotUndefined(user[customField]);
test.isUndefined(user.username);
test.isUndefined(user[ignoreFieldName]);
Accounts._options = options;
Accounts.userId = origAccountsUserId;
}
);
Tinytest.add(
'accounts - verify onExternalLogin hook can update oauth user profiles',
test => {
@@ -739,6 +796,56 @@ Tinytest.add(
);
if(Meteor.isServer) {
Tinytest.add('accounts - config - collection - mongo.collection', test => {
const origCollection = Accounts.users;
// create same user in two different collections - should pass
const email = "test-collection@testdomain.com"
const collection0 = new Mongo.Collection('test1');
Accounts.config({
collection: collection0,
})
const uid0 = Accounts.createUser({email})
Meteor.users.remove(uid0);
const collection1 = new Mongo.Collection('test2');
Accounts.config({
collection: collection1,
})
const uid1 = Accounts.createUser({email})
Meteor.users.remove(uid1);
test.notEqual(uid0, uid1);
Accounts.config({
collection: origCollection,
});
});
Tinytest.add('accounts - config - collection - name', test => {
const origCollection = Accounts.users;
// create same user in two different collections - should pass
const email = "test-collection@testdomain.com"
Accounts.config({
collection: 'collection0',
})
const uid0 = Accounts.createUser({email})
Meteor.users.remove(uid0);
Accounts.config({
collection: 'collection1',
})
const uid1 = Accounts.createUser({email})
Meteor.users.remove(uid1);
test.notEqual(uid0, uid1);
Accounts.config({
collection: origCollection,
});
});
Tinytest.add(
'accounts - make sure that extra params to accounts urls are added',
test => {

View File

@@ -0,0 +1,3 @@
{
"typesEntry": "accounts-base.d.ts"
}

View File

@@ -1,6 +1,6 @@
Package.describe({
summary: 'A user account system',
version: '2.2.4',
version: '2.2.8',
});
Package.onUse(api => {
@@ -15,10 +15,6 @@ Package.onUse(api => {
api.use('reactive-var', 'client');
api.use('url', ['client', 'server']);
// use unordered to work around a circular dependency
// (service-configuration needs Accounts.connection)
api.use('service-configuration', ['client', 'server'], { unordered: true });
// needed for getting the currently logged-in user and handling reconnects
api.use('ddp', ['client', 'server']);
@@ -48,6 +44,8 @@ Package.onUse(api => {
// modules that import the accounts-base package.
api.mainModule('server_main.js', 'server');
api.mainModule('client_main.js', 'client');
api.addAssets('accounts-base.d.ts', 'server');
});
Package.onTest(api => {

View File

@@ -1,3 +1,24 @@
import { Meteor } from 'meteor/meteor';
// TODO get from account-base
// config option keys
const VALID_CONFIG_KEYS = [
'sendVerificationEmail',
'forbidClientAccountCreation',
'passwordEnrollTokenExpiration',
'passwordEnrollTokenExpirationInDays',
'restrictCreationByEmailDomain',
'loginExpirationInDays',
'loginExpiration',
'passwordResetTokenExpirationInDays',
'passwordResetTokenExpiration',
'ambiguousErrorMessages',
'bcryptRounds',
'defaultFieldSelector',
'loginTokenExpirationHours',
'tokenSequenceLength',
];
Accounts.oauth = {};
const services = {};
@@ -31,3 +52,37 @@ Accounts.oauth.unregisterService = name => {
};
Accounts.oauth.serviceNames = () => Object.keys(services);
// loginServiceConfiguration and ConfigError are maintained for backwards compatibility
Meteor.startup(() => {
const { ServiceConfiguration } = Package['service-configuration'];
Accounts.loginServiceConfiguration = ServiceConfiguration.configurations;
Accounts.ConfigError = ServiceConfiguration.ConfigError;
const settings = Meteor.settings?.packages?.['accounts-base'];
if (settings) {
if (settings.oauthSecretKey) {
if (!Package['oauth-encryption']) {
throw new Error(
'The oauth-encryption package must be loaded to set oauthSecretKey'
);
}
Package['oauth-encryption'].OAuthEncryption.loadKey(
settings.oauthSecretKey
);
delete settings.oauthSecretKey;
}
// Validate config options keys
Object.keys(settings).forEach(key => {
if (!VALID_CONFIG_KEYS.includes(key)) {
// TODO Consider just logging a debug message instead to allow for additional keys in the settings here?
throw new Meteor.Error(
`Accounts configuration: Invalid key: ${key}`
);
} else {
// set values in Accounts._options
Accounts._options[key] = settings[key];
}
});
}
});

View File

@@ -1,3 +1,5 @@
import { Meteor } from 'meteor/meteor';
// Listen to calls to `login` with an oauth option set. This is where
// users actually get logged in to meteor via oauth.
Accounts.registerLoginHandler(options => {
@@ -55,3 +57,44 @@ Accounts.registerLoginHandler(options => {
return Accounts.updateOrCreateUserFromExternalService(result.serviceName, result.serviceData, result.options);
}
});
///
/// OAuth Encryption Support
///
const OAuthEncryption = Package["oauth-encryption"]?.OAuthEncryption;
const usingOAuthEncryption = () => {
return OAuthEncryption?.keyIsLoaded();
};
// Encrypt unencrypted login service secrets when oauth-encryption is
// added.
//
// XXX For the oauthSecretKey to be available here at startup, the
// developer must call Accounts.config({oauthSecretKey: ...}) at load
// time, instead of in a Meteor.startup block, because the startup
// block in the app code will run after this accounts-base startup
// block. Perhaps we need a post-startup callback?
Meteor.startup(() => {
if (! usingOAuthEncryption()) {
return;
}
const { ServiceConfiguration } = Package['service-configuration'];
ServiceConfiguration.configurations.find({
$and: [{
secret: { $exists: true }
}, {
"secret.algorithm": { $exists: false }
}]
}).forEach(config => {
ServiceConfiguration.configurations.update(config._id, {
$set: {
secret: OAuthEncryption.seal(config.secret)
}
});
});
});

View File

@@ -1,6 +1,6 @@
Package.describe({
summary: "Common code for OAuth-based login services",
version: "1.4.1",
version: "1.4.2",
});
Package.onUse(api => {
@@ -9,6 +9,11 @@ Package.onUse(api => {
api.use(['accounts-base', 'ecmascript'], ['client', 'server']);
// Export Accounts (etc) to packages using this one.
api.imply('accounts-base', ['client', 'server']);
// use unordered to work around a circular dependency
// (service-configuration needs Accounts.connection)
api.use('service-configuration', ['client', 'server'], { unordered: true });
api.use('oauth');
api.addFiles('oauth_common.js');

View File

@@ -0,0 +1 @@
node_modules

View File

@@ -0,0 +1,7 @@
This directory and the files immediately inside it are automatically generated
when you change this package's NPM dependencies. Commit the files in this
directory (npm-shrinkwrap.json, .gitignore, and this README) to source control
so that others run the same versions of sub-dependencies.
You should NOT check in the node_modules directory that Meteor automatically
creates; if you are using git, the .gitignore file tells git to ignore it.

View File

@@ -0,0 +1,311 @@
{
"lockfileVersion": 1,
"dependencies": {
"@mapbox/node-pre-gyp": {
"version": "1.0.10",
"resolved": "https://registry.npmjs.org/@mapbox/node-pre-gyp/-/node-pre-gyp-1.0.10.tgz",
"integrity": "sha512-4ySo4CjzStuprMwk35H5pPbkymjv1SF3jGLj6rAHp/xT/RF7TL7bd9CTm1xDY49K2qF7jmR/g7k+SkLETP6opA=="
},
"abbrev": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz",
"integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q=="
},
"agent-base": {
"version": "6.0.2",
"resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz",
"integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ=="
},
"ansi-regex": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",
"integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ=="
},
"aproba": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/aproba/-/aproba-2.0.0.tgz",
"integrity": "sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ=="
},
"are-we-there-yet": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-2.0.0.tgz",
"integrity": "sha512-Ci/qENmwHnsYo9xKIcUJN5LeDKdJ6R1Z1j9V/J5wyq8nh/mYPEpIKJbBZXtZjG04HiK7zV/p6Vs9952MrMeUIw=="
},
"balanced-match": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
"integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw=="
},
"bcrypt": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/bcrypt/-/bcrypt-5.0.1.tgz",
"integrity": "sha512-9BTgmrhZM2t1bNuDtrtIMVSmmxZBrJ71n8Wg+YgdjHuIWYF7SjjmCPZFB+/5i/o/PIeRpwVJR3P+NrpIItUjqw=="
},
"brace-expansion": {
"version": "1.1.11",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
"integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA=="
},
"chownr": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz",
"integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ=="
},
"color-support": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz",
"integrity": "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg=="
},
"concat-map": {
"version": "0.0.1",
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
"integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg=="
},
"console-control-strings": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz",
"integrity": "sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ=="
},
"debug": {
"version": "4.3.4",
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
"integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ=="
},
"delegates": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz",
"integrity": "sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ=="
},
"detect-libc": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.1.tgz",
"integrity": "sha512-463v3ZeIrcWtdgIg6vI6XUncguvr2TnGl4SzDXinkt9mSLpBJKXT3mW6xT3VQdDN11+WVs29pgvivTc4Lp8v+w=="
},
"emoji-regex": {
"version": "8.0.0",
"resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
"integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A=="
},
"fs-minipass": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz",
"integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==",
"dependencies": {
"minipass": {
"version": "3.3.6",
"resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz",
"integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw=="
}
}
},
"fs.realpath": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
"integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw=="
},
"gauge": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/gauge/-/gauge-3.0.2.tgz",
"integrity": "sha512-+5J6MS/5XksCuXq++uFRsnUd7Ovu1XenbeuIuNRJxYWjgQbPuFhT14lAvsWfqfAmnwluf1OwMjz39HjfLPci0Q=="
},
"glob": {
"version": "7.2.3",
"resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz",
"integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q=="
},
"has-unicode": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz",
"integrity": "sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ=="
},
"https-proxy-agent": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz",
"integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA=="
},
"inflight": {
"version": "1.0.6",
"resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
"integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA=="
},
"inherits": {
"version": "2.0.4",
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
"integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
},
"is-fullwidth-code-point": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
"integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg=="
},
"lru-cache": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
"integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA=="
},
"make-dir": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz",
"integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==",
"dependencies": {
"semver": {
"version": "6.3.0",
"resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
"integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw=="
}
}
},
"minimatch": {
"version": "3.1.2",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
"integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw=="
},
"minipass": {
"version": "4.0.3",
"resolved": "https://registry.npmjs.org/minipass/-/minipass-4.0.3.tgz",
"integrity": "sha512-OW2r4sQ0sI+z5ckEt5c1Tri4xTgZwYDxpE54eqWlQloQRoWtXjqt9udJ5Z4dSv7wK+nfFI7FRXyCpBSft+gpFw=="
},
"minizlib": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz",
"integrity": "sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==",
"dependencies": {
"minipass": {
"version": "3.3.6",
"resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz",
"integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw=="
}
}
},
"mkdirp": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz",
"integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw=="
},
"ms": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
},
"node-addon-api": {
"version": "3.2.1",
"resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-3.2.1.tgz",
"integrity": "sha512-mmcei9JghVNDYydghQmeDX8KoAm0FAiYyIcUt/N4nhyAipB17pllZQDOJD2fotxABnt4Mdz+dKTO7eftLg4d0A=="
},
"node-fetch": {
"version": "2.6.9",
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.9.tgz",
"integrity": "sha512-DJm/CJkZkRjKKj4Zi4BsKVZh3ValV5IR5s7LVZnW+6YMh0W1BfNA8XSs6DLMGYlId5F3KnA70uu2qepcR08Qqg=="
},
"nopt": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/nopt/-/nopt-5.0.0.tgz",
"integrity": "sha512-Tbj67rffqceeLpcRXrT7vKAN8CwfPeIBgM7E6iBkmKLV7bEMwpGgYLGv0jACUsECaa/vuxP0IjEont6umdMgtQ=="
},
"npmlog": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/npmlog/-/npmlog-5.0.1.tgz",
"integrity": "sha512-AqZtDUWOMKs1G/8lwylVjrdYgqA4d9nu8hc+0gzRxlDb1I10+FHBGMXs6aiQHFdCUUlqH99MUMuLfzWDNDtfxw=="
},
"object-assign": {
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
"integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg=="
},
"once": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
"integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w=="
},
"path-is-absolute": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
"integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg=="
},
"readable-stream": {
"version": "3.6.0",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz",
"integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA=="
},
"rimraf": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz",
"integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA=="
},
"safe-buffer": {
"version": "5.2.1",
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
"integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ=="
},
"semver": {
"version": "7.3.8",
"resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz",
"integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A=="
},
"set-blocking": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz",
"integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw=="
},
"signal-exit": {
"version": "3.0.7",
"resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz",
"integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ=="
},
"string-width": {
"version": "4.2.3",
"resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",
"integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g=="
},
"string_decoder": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz",
"integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA=="
},
"strip-ansi": {
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
"integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A=="
},
"tar": {
"version": "6.1.13",
"resolved": "https://registry.npmjs.org/tar/-/tar-6.1.13.tgz",
"integrity": "sha512-jdIBIN6LTIe2jqzay/2vtYLlBHa3JF42ot3h1dW8Q0PaAG4v8rm0cvpVePtau5C6OKXGGcgO9q2AMNSWxiLqKw=="
},
"tr46": {
"version": "0.0.3",
"resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz",
"integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw=="
},
"util-deprecate": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
"integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw=="
},
"webidl-conversions": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz",
"integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ=="
},
"whatwg-url": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz",
"integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw=="
},
"wide-align": {
"version": "1.1.5",
"resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.5.tgz",
"integrity": "sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg=="
},
"wrappy": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
"integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ=="
},
"yallist": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
"integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A=="
}
}
}

View File

@@ -5,7 +5,7 @@ Package.describe({
// 2.2.x in the future. The version was also bumped to 2.0.0 temporarily
// during the Meteor 1.5.1 release process, so versions 2.0.0-beta.2
// through -beta.5 and -rc.0 have already been published.
version: '2.3.1',
version: '2.3.4',
});
Npm.depends({

View File

@@ -7,12 +7,10 @@ const reportError = (error, callback) => {
}
};
const internalLoginWithPassword = ({ selector, password, code, callback }) => {
if (typeof selector === 'string')
if (!selector.includes('@')) selector = { username: selector };
else selector = { email: selector };
Accounts.callLoginMethod({
methodArguments: [
{
@@ -144,7 +142,7 @@ Accounts.changePassword = (oldPassword, newPassword, callback) => {
return reportError(new Error("Must be logged in to change password."), callback);
}
if (!newPassword instanceof String) {
if (!(typeof newPassword === "string" || newPassword instanceof String)) {
return reportError(new Meteor.Error(400, "Password must be a string"), callback);
}
@@ -203,7 +201,7 @@ Accounts.forgotPassword = (options, callback) => {
// @param callback (optional) {Function(error|undefined)}
/**
* @summary Reset the password for a user using a token received in email. Logs the user in afterwards.
* @summary Reset the password for a user using a token received in email. Logs the user in afterwards if the user doesn't have 2FA enabled.
* @locus Client
* @param {String} token The token retrieved from the reset password URL.
* @param {String} newPassword A new password for the user. This is __not__ sent in plain text over the wire.
@@ -211,11 +209,11 @@ Accounts.forgotPassword = (options, callback) => {
* @importFromPackage accounts-base
*/
Accounts.resetPassword = (token, newPassword, callback) => {
if (!token instanceof String) {
if (!(typeof token === "string" || token instanceof String)) {
return reportError(new Meteor.Error(400, "Token must be a string"), callback);
}
if (!newPassword instanceof String) {
if (!(typeof newPassword === "string" || newPassword instanceof String)) {
return reportError(new Meteor.Error(400, "Password must be a string"), callback);
}
@@ -236,7 +234,7 @@ Accounts.resetPassword = (token, newPassword, callback) => {
// @param callback (optional) {Function(error|undefined)}
/**
* @summary Marks the user's email address as verified. Logs the user in afterwards.
* @summary Marks the user's email address as verified. Logs the user in afterwards if the user doesn't have 2FA enabled.
* @locus Client
* @param {String} token The token retrieved from the verification URL.
* @param {Function} [callback] Optional callback. Called with no arguments on success, or with a single `Error` argument on failure.

View File

@@ -1,8 +1,5 @@
import bcrypt from 'bcrypt'
import {Accounts} from "meteor/accounts-base";
const bcryptHash = Meteor.wrapAsync(bcrypt.hash);
const bcryptCompare = Meteor.wrapAsync(bcrypt.compare);
import { hash as bcryptHash, compare as bcryptCompare } from 'bcrypt';
import { Accounts } from "meteor/accounts-base";
// Utility for grabbing user
const getUserById = (id, options) => Meteor.users.findOne(id, Accounts._addDefaultFieldSelector(options));
@@ -48,9 +45,9 @@ const getPasswordString = password => {
// SHA256 before bcrypt) or an object with properties `digest` and
// `algorithm` (in which case we bcrypt `password.digest`).
//
const hashPassword = password => {
const hashPassword = async password => {
password = getPasswordString(password);
return bcryptHash(password, Accounts._bcryptRounds());
return await bcryptHash(password, Accounts._bcryptRounds());
};
// Extract the number of rounds used in the specified bcrypt hash.
@@ -74,7 +71,7 @@ const getRoundsFromBcryptHash = hash => {
// The user parameter needs at least user._id and user.services
Accounts._checkPasswordUserFields = {_id: 1, services: 1};
//
Accounts._checkPassword = (user, password) => {
const checkPasswordAsync = async (user, password) => {
const result = {
userId: user._id
};
@@ -83,15 +80,16 @@ Accounts._checkPassword = (user, password) => {
const hash = user.services.password.bcrypt;
const hashRounds = getRoundsFromBcryptHash(hash);
if (! bcryptCompare(formattedPassword, hash)) {
if (! await bcryptCompare(formattedPassword, hash)) {
result.error = Accounts._handleError("Incorrect password", false);
} else if (hash && Accounts._bcryptRounds() != hashRounds) {
// The password checks out, but the user's bcrypt hash needs to be updated.
Meteor.defer(() => {
Meteor.defer(async () => {
Meteor.users.update({ _id: user._id }, {
$set: {
'services.password.bcrypt':
bcryptHash(formattedPassword, Accounts._bcryptRounds())
await bcryptHash(formattedPassword, Accounts._bcryptRounds())
}
});
});
@@ -99,7 +97,13 @@ Accounts._checkPassword = (user, password) => {
return result;
};
const checkPassword = Accounts._checkPassword;
const checkPassword = (user, password) => {
return Promise.await(checkPasswordAsync(user, password));
};
Accounts._checkPassword = checkPassword;
Accounts._checkPasswordAsync = checkPasswordAsync;
///
/// LOGIN
@@ -163,7 +167,7 @@ const passwordValidator = Match.OneOf(
//
// Note that neither password option is secure without SSL.
//
Accounts.registerLoginHandler("password", options => {
Accounts.registerLoginHandler("password", async options => {
if (!options.password)
return undefined; // don't handle
@@ -188,7 +192,7 @@ Accounts.registerLoginHandler("password", options => {
Accounts._handleError("User has no password set");
}
const result = checkPassword(user, options.password);
const result = await checkPasswordAsync(user, options.password);
// This method is added by the package accounts-2fa
// First the login is validated, then the code situation is checked
if (
@@ -258,7 +262,7 @@ Accounts.setUsername = (userId, newUsername) => {
// Let the user change their own password if they know the old
// password. `oldPassword` and `newPassword` should be objects with keys
// `digest` and `algorithm` (representing the SHA256 of the password).
Meteor.methods({changePassword: function (oldPassword, newPassword) {
Meteor.methods({changePassword: async function (oldPassword, newPassword) {
check(oldPassword, passwordValidator);
check(newPassword, passwordValidator);
@@ -278,12 +282,12 @@ Meteor.methods({changePassword: function (oldPassword, newPassword) {
Accounts._handleError("User has no password set");
}
const result = checkPassword(user, oldPassword);
const result = await checkPasswordAsync(user, oldPassword);
if (result.error) {
throw result.error;
}
const hashed = hashPassword(newPassword);
const hashed = await hashPassword(newPassword);
// It would be better if this removed ALL existing tokens and replaced
// the token for the current connection with a new one, but that would
@@ -316,10 +320,10 @@ Meteor.methods({changePassword: function (oldPassword, newPassword) {
* @param {Object} options.logout Logout all current connections with this userId (default: true)
* @importFromPackage accounts-base
*/
Accounts.setPassword = (userId, newPlaintextPassword, options) => {
check(userId, String)
check(newPlaintextPassword, Match.Where(str => Match.test(str, String) && str.length <= Meteor.settings?.packages?.accounts?.passwordMaxLength || 256))
check(options, Match.Maybe({ logout: Boolean }))
Accounts.setPasswordAsync = async (userId, newPlaintextPassword, options) => {
check(userId, String);
check(newPlaintextPassword, Match.Where(str => Match.test(str, String) && str.length <= Meteor.settings?.packages?.accounts?.passwordMaxLength || 256));
check(options, Match.Maybe({ logout: Boolean }));
options = { logout: true , ...options };
const user = getUserById(userId, {fields: {_id: 1}});
@@ -331,7 +335,7 @@ Accounts.setPassword = (userId, newPlaintextPassword, options) => {
$unset: {
'services.password.reset': 1
},
$set: {'services.password.bcrypt': hashPassword(newPlaintextPassword)}
$set: {'services.password.bcrypt': await hashPassword(newPlaintextPassword)}
};
if (options.logout) {
@@ -341,6 +345,19 @@ Accounts.setPassword = (userId, newPlaintextPassword, options) => {
Meteor.users.update({_id: user._id}, update);
};
/**
* @summary Forcibly change the password for a user.
* @locus Server
* @param {String} userId The id of the user to update.
* @param {String} newPassword A new password for the user.
* @param {Object} [options]
* @param {Object} options.logout Logout all current connections with this userId (default: true)
* @importFromPackage accounts-base
*/
Accounts.setPassword = (userId, newPlaintextPassword, options) => {
return Promise.await(Accounts.setPasswordAsync(userId, newPlaintextPassword, options));
};
///
/// RESETTING VIA EMAIL
@@ -560,15 +577,15 @@ Accounts.sendEnrollmentEmail = (userId, email, extraTokenData, extraParams) => {
// Take token from sendResetPasswordEmail or sendEnrollmentEmail, change
// the users password, and log them in.
Meteor.methods({resetPassword: function (...args) {
Meteor.methods({resetPassword: async function (...args) {
const token = args[0];
const newPassword = args[1];
return Accounts._loginMethod(
return await Accounts._loginMethod(
this,
"resetPassword",
args,
"password",
() => {
async () => {
check(token, String);
check(newPassword, passwordValidator);
@@ -617,7 +634,7 @@ Meteor.methods({resetPassword: function (...args) {
error: new Meteor.Error(403, "Token has invalid email address")
};
const hashed = hashPassword(newPassword);
const hashed = await hashPassword(newPassword);
// NOTE: We're about to invalidate tokens on the user, who we might be
// logged in as. Make sure to avoid logging ourselves out if this
@@ -670,6 +687,17 @@ Meteor.methods({resetPassword: function (...args) {
// password should invalidate existing sessions).
Accounts._clearAllLoginTokens(user._id);
if (Accounts._check2faEnabled?.(user)) {
return {
userId: user._id,
error: Accounts._handleError(
'Changed password, but user not logged in because 2FA is enabled',
false,
'2fa-enabled'
),
};
}
return {userId: user._id};
}
);
@@ -712,9 +740,9 @@ Accounts.sendVerificationEmail = (userId, email, extraTokenData, extraParams) =>
// Take token from sendVerificationEmail, mark the email as verified,
// and log them in.
Meteor.methods({verifyEmail: function (...args) {
Meteor.methods({verifyEmail: async function (...args) {
const token = args[0];
return Accounts._loginMethod(
return await Accounts._loginMethod(
this,
"verifyEmail",
args,
@@ -761,6 +789,17 @@ Meteor.methods({verifyEmail: function (...args) {
{$set: {'emails.$.verified': true},
$pull: {'services.email.verificationTokens': {address: tokenRecord.address}}});
if (Accounts._check2faEnabled?.(user)) {
return {
userId: user._id,
error: Accounts._handleError(
'Email verified, but user not logged in because 2FA is enabled',
false,
'2fa-enabled'
),
};
}
return {userId: user._id};
}
);
@@ -888,7 +927,7 @@ Accounts.removeEmail = (userId, email) => {
// does the actual user insertion.
//
// returns the user id
const createUser = options => {
const createUser = async options => {
// Unknown keys allowed, because a onCreateUserHook can take arbitrary
// options.
check(options, Match.ObjectIncluding({
@@ -903,22 +942,22 @@ const createUser = options => {
const user = {services: {}};
if (password) {
const hashed = hashPassword(password);
const hashed = await hashPassword(password);
user.services.password = { bcrypt: hashed };
}
return Accounts._createUserCheckingDuplicates({ user, email, username, options })
return Accounts._createUserCheckingDuplicates({ user, email, username, options });
};
// method for create user. Requests come from the client.
Meteor.methods({createUser: function (...args) {
Meteor.methods({createUser: async function (...args) {
const options = args[0];
return Accounts._loginMethod(
return await Accounts._loginMethod(
this,
"createUser",
args,
"password",
() => {
async () => {
// createUser() above does more checking.
check(options, Object);
if (Accounts._options.forbidClientAccountCreation)
@@ -926,7 +965,7 @@ Meteor.methods({createUser: function (...args) {
error: new Meteor.Error(403, "Signups forbidden")
};
const userId = Accounts.createUserVerifyingEmail(options);
const userId = await Accounts.createUserVerifyingEmail(options);
// client gets logged in as the new user afterwards.
return {userId: userId};
@@ -948,10 +987,10 @@ Meteor.methods({createUser: function (...args) {
* @param {Object} options.profile The user's profile, typically including the `name` field.
* @importFromPackage accounts-base
* */
Accounts.createUserVerifyingEmail = (options) => {
Accounts.createUserVerifyingEmail = async (options) => {
options = { ...options };
// Create user. result contains id and token.
const userId = createUser(options);
const userId = await createUser(options);
// safety belt. createUser is supposed to throw on error. send 500 error
// instead of sending a verification email with empty userid.
if (! userId)
@@ -976,14 +1015,15 @@ Accounts.createUserVerifyingEmail = (options) => {
// Unlike the client version, this does not log you in as this user
// after creation.
//
// returns userId or throws an error if it can't create
// returns Promise<userId> or throws an error if it can't create
//
// XXX add another argument ("server options") that gets sent to onCreateUser,
// which is always empty when called from the createUser method? eg, "admin:
// true", which we want to prevent the client from setting, but which a custom
// method calling Accounts.createUser could set?
//
Accounts.createUser = (options, callback) => {
Accounts.createUserAsync = async (options, callback) => {
options = { ...options };
// XXX allow an optional callback?
@@ -994,6 +1034,23 @@ Accounts.createUser = (options, callback) => {
return createUser(options);
};
// Create user directly on the server.
//
// Unlike the client version, this does not log you in as this user
// after creation.
//
// returns userId or throws an error if it can't create
//
// XXX add another argument ("server options") that gets sent to onCreateUser,
// which is always empty when called from the createUser method? eg, "admin:
// true", which we want to prevent the client from setting, but which a custom
// method calling Accounts.createUser could set?
//
Accounts.createUser = (options, callback) => {
return Promise.await(Accounts.createUserAsync(options, callback));
};
///
/// PASSWORD-SPECIFIC INDEXES ON USERS
///

View File

@@ -1747,7 +1747,7 @@ if (Meteor.isServer) (() => {
Tinytest.addAsync(
'passwords - allow custom bcrypt rounds',
(test, done) => {
async (test, done) => {
const getUserHashRounds = user =>
Number(user.services.password.bcrypt.substring(4, 6));
@@ -1768,7 +1768,7 @@ if (Meteor.isServer) (() => {
const defaultRounds = Accounts._bcryptRounds();
const customRounds = 11;
Accounts._options.bcryptRounds = customRounds;
Accounts._checkPassword(user1, password);
await Accounts._checkPasswordAsync(user1, password);
Meteor.setTimeout(() => {
user1 = Meteor.users.findOne(userId1);
rounds = getUserHashRounds(user1);

View File

@@ -1,5 +1,9 @@
# CHANGELOG
## v1.2.8, 2022-01-19
* 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.
## v1.2.3, 2019-12-13
* Rewrite appcache resources exceed recommended cache size debug message. Fixes [Issue #10321](https://github.com/meteor/meteor/issues/10321). Thanks [@CaptainN](https://github.com/CaptainN)

View File

@@ -1,6 +1,7 @@
Package.describe({
summary: "Enable the application cache in the browser",
version: "1.2.7",
version: '1.2.8',
deprecated: true,
});
Package.onUse(api => {

View File

@@ -12,26 +12,26 @@
"integrity": "sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q=="
},
"@babel/compat-data": {
"version": "7.18.8",
"resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.18.8.tgz",
"integrity": "sha512-HSmX4WZPPK3FUxYp7g2T6EyO8j96HlZJlxmKPSh6KAcqwyDrfx7hKjXpAW/0FhFfTJsR0Yt4lAjLI2coMptIHQ=="
"version": "7.20.10",
"resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.20.10.tgz",
"integrity": "sha512-sEnuDPpOJR/fcafHMjpcpGN5M2jbUGUHwmuWKM/YdPzeEDJg8bgmbcWQFUfE32MQjti1koACvoPVsDe8Uq+idg=="
},
"@babel/core": {
"version": "7.18.6",
"resolved": "https://registry.npmjs.org/@babel/core/-/core-7.18.6.tgz",
"integrity": "sha512-cQbWBpxcbbs/IUredIPkHiAGULLV8iwgNRMFzvbhEXISp4f3rUUXE5+TIw6KwUWUR3DwyI6gmBRnmAtYaWehwQ==",
"version": "7.20.12",
"resolved": "https://registry.npmjs.org/@babel/core/-/core-7.20.12.tgz",
"integrity": "sha512-XsMfHovsUYHFMdrIHkZphTN/2Hzzi78R08NuHfDBehym2VsPDL6Zn/JAD/JQdnRvbSsbQc4mVaU1m6JgtTEElg==",
"dependencies": {
"json5": {
"version": "2.2.1",
"resolved": "https://registry.npmjs.org/json5/-/json5-2.2.1.tgz",
"integrity": "sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA=="
"version": "2.2.3",
"resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz",
"integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg=="
}
}
},
"@babel/generator": {
"version": "7.18.7",
"resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.18.7.tgz",
"integrity": "sha512-shck+7VLlY72a2w9c3zYWuE1pwOKEiQHV7GTUbSnhyl5eu3i04t30tBY82ZRWrDfo3gkakCFtevExnxbkf2a3A==",
"version": "7.20.7",
"resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.20.7.tgz",
"integrity": "sha512-7wqMOJq8doJMZmP4ApXTzLxSr7+oO2jroJURrVEp6XShrQUObV8Tq/D0NCcoYg2uHqUrjzO0zwBjoYzelxK+sw==",
"dependencies": {
"@jridgewell/gen-mapping": {
"version": "0.3.2",
@@ -46,34 +46,34 @@
"integrity": "sha512-duORpUiYrEpzKIop6iNbjnwKLAKnJ47csTyRACyEmWj0QdUrm5aqNJGHSSEQSUAvNW0ojX0dOmK9dZduvkfeXA=="
},
"@babel/helper-builder-binary-assignment-operator-visitor": {
"version": "7.18.6",
"resolved": "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.18.6.tgz",
"integrity": "sha512-KT10c1oWEpmrIRYnthbzHgoOf6B+Xd6a5yhdbNtdhtG7aO1or5HViuf1TQR36xY/QprXA5nvxO6nAjhJ4y38jw=="
"version": "7.18.9",
"resolved": "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.18.9.tgz",
"integrity": "sha512-yFQ0YCHoIqarl8BCRwBL8ulYUaZpz3bNsA7oFepAzee+8/+ImtADXNOmO5vJvsPff3qi+hvpkY/NYBTrBQgdNw=="
},
"@babel/helper-compilation-targets": {
"version": "7.18.6",
"resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.18.6.tgz",
"integrity": "sha512-vFjbfhNCzqdeAtZflUFrG5YIFqGTqsctrtkZ1D/NB0mDW9TwW3GmmUepYY4G9wCET5rY5ugz4OGTcLd614IzQg=="
"version": "7.20.7",
"resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.20.7.tgz",
"integrity": "sha512-4tGORmfQcrc+bvrjb5y3dG9Mx1IOZjsHqQVUz7XCNHO+iTmqxWnVg3KRygjGmpRLJGdQSKuvFinbIb0CnZwHAQ=="
},
"@babel/helper-create-class-features-plugin": {
"version": "7.18.6",
"resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.18.6.tgz",
"integrity": "sha512-YfDzdnoxHGV8CzqHGyCbFvXg5QESPFkXlHtvdCkesLjjVMT2Adxe4FGUR5ChIb3DxSaXO12iIOCWoXdsUVwnqw=="
"version": "7.20.12",
"resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.20.12.tgz",
"integrity": "sha512-9OunRkbT0JQcednL0UFvbfXpAsUXiGjUk0a7sN8fUXX7Mue79cUSMjHGDRRi/Vz9vYlpIhLV5fMD5dKoMhhsNQ=="
},
"@babel/helper-create-regexp-features-plugin": {
"version": "7.18.6",
"resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.18.6.tgz",
"integrity": "sha512-7LcpH1wnQLGrI+4v+nPp+zUvIkF9x0ddv1Hkdue10tg3gmRnLy97DXh4STiOf1qeIInyD69Qv5kKSZzKD8B/7A=="
"version": "7.20.5",
"resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.20.5.tgz",
"integrity": "sha512-m68B1lkg3XDGX5yCvGO0kPx3v9WIYLnzjKfPcQiwntEQa5ZeRkPmo2X/ISJc8qxWGfwUr+kvZAeEzAwLec2r2w=="
},
"@babel/helper-define-polyfill-provider": {
"version": "0.3.1",
"resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.3.1.tgz",
"integrity": "sha512-J9hGMpJQmtWmj46B3kBHmL38UhJGhYX7eqkcq+2gsstyYt341HmPeWspihX43yVRA0mS+8GGk2Gckc7bY/HCmA=="
"version": "0.3.3",
"resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.3.3.tgz",
"integrity": "sha512-z5aQKU4IzbqCC1XH0nAqfsFLMVSo22SBKUc0BxGrLkolTdPTructy0ToNnlO2zA4j9Q/7pjMZf0DSY+DSTYzww=="
},
"@babel/helper-environment-visitor": {
"version": "7.18.6",
"resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.18.6.tgz",
"integrity": "sha512-8n6gSfn2baOY+qlp+VSzsosjCVGFqWKmDF0cCWOybh52Dw3SEyoWR1KrhMJASjLwIEkkAufZ0xvr+SxLHSpy2Q=="
"version": "7.18.9",
"resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.18.9.tgz",
"integrity": "sha512-3r/aACDJ3fhQ/EVgFy0hpj8oHyHpQc+LPtJoY9SzTThAsStm4Ptegq92vqKoE3vD706ZVFWITnMnxucw+S9Ipg=="
},
"@babel/helper-explode-assignable-expression": {
"version": "7.18.6",
@@ -81,9 +81,9 @@
"integrity": "sha512-eyAYAsQmB80jNfg4baAtLeWAQHfHFiR483rzFK+BhETlGZaQC9bsfrugfXDCbRHLQbIA7U5NxhhOxN7p/dWIcg=="
},
"@babel/helper-function-name": {
"version": "7.18.6",
"resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.18.6.tgz",
"integrity": "sha512-0mWMxV1aC97dhjCah5U5Ua7668r5ZmSC2DLfH2EZnf9c3/dHZKiFa5pRLMH5tjSl471tY6496ZWk/kjNONBxhw=="
"version": "7.19.0",
"resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.19.0.tgz",
"integrity": "sha512-WAwHBINyrpqywkUH0nTnNgI5ina5TFn85HKS0pbPDfxFfhyR/aNQEn4hGi1P1JyT//I0t4OgXUlofzWILRvS5w=="
},
"@babel/helper-hoist-variables": {
"version": "7.18.6",
@@ -91,9 +91,9 @@
"integrity": "sha512-UlJQPkFqFULIcyW5sbzgbkxn2FKRgwWiRexcuaR8RNJRy8+LLveqPjwZV/bwrLZCN0eUHD/x8D0heK1ozuoo6Q=="
},
"@babel/helper-member-expression-to-functions": {
"version": "7.18.6",
"resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.18.6.tgz",
"integrity": "sha512-CeHxqwwipekotzPDUuJOfIMtcIHBuc7WAzLmTYWctVigqS5RktNMQ5bEwQSuGewzYnCtTWa3BARXeiLxDTv+Ng=="
"version": "7.20.7",
"resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.20.7.tgz",
"integrity": "sha512-9J0CxJLq315fEdi4s7xK5TQaNYjZw+nDVpVqr1axNGKzdrdwYBD5b4uKv3n75aABG0rCCTK8Im8Ww7eYfMrZgw=="
},
"@babel/helper-module-imports": {
"version": "7.18.6",
@@ -101,9 +101,9 @@
"integrity": "sha512-0NFvs3VkuSYbFi1x2Vd6tKrywq+z/cLeYC/RJNFrIX/30Bf5aiGYbtvGXolEktzJH8o5E5KJ3tT+nkxuuZFVlA=="
},
"@babel/helper-module-transforms": {
"version": "7.18.8",
"resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.18.8.tgz",
"integrity": "sha512-che3jvZwIcZxrwh63VfnFTUzcAM9v/lznYkkRxIBGMPt1SudOKHAEec0SIRCfiuIzTcF7VGj/CaTT6gY4eWxvA=="
"version": "7.20.11",
"resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.20.11.tgz",
"integrity": "sha512-uRy78kN4psmji1s2QtbtcCSaj/LILFDp0f/ymhpQH5QY3nljUZCaNWz9X1dEj/8MBdBEFECs7yRhKn8i7NjZgg=="
},
"@babel/helper-optimise-call-expression": {
"version": "7.18.6",
@@ -111,39 +111,44 @@
"integrity": "sha512-HP59oD9/fEHQkdcbgFCnbmgH5vIQTJbxh2yf+CdM89/glUNnuzr87Q8GIjGEnOktTROemO0Pe0iPAYbqZuOUiA=="
},
"@babel/helper-plugin-utils": {
"version": "7.18.6",
"resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.18.6.tgz",
"integrity": "sha512-gvZnm1YAAxh13eJdkb9EWHBnF3eAub3XTLCZEehHT2kWxiKVRL64+ae5Y6Ivne0mVHmMYKT+xWgZO+gQhuLUBg=="
"version": "7.20.2",
"resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.20.2.tgz",
"integrity": "sha512-8RvlJG2mj4huQ4pZ+rU9lqKi9ZKiRmuvGuM2HlWmkmgOhbs6zEAw6IEiJ5cQqGbDzGZOhwuOQNtZMi/ENLjZoQ=="
},
"@babel/helper-remap-async-to-generator": {
"version": "7.18.6",
"resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.18.6.tgz",
"integrity": "sha512-z5wbmV55TveUPZlCLZvxWHtrjuJd+8inFhk7DG0WW87/oJuGDcjDiu7HIvGcpf5464L6xKCg3vNkmlVVz9hwyQ=="
"version": "7.18.9",
"resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.18.9.tgz",
"integrity": "sha512-dI7q50YKd8BAv3VEfgg7PS7yD3Rtbi2J1XMXaalXO0W0164hYLnh8zpjRS0mte9MfVp/tltvr/cfdXPvJr1opA=="
},
"@babel/helper-replace-supers": {
"version": "7.18.6",
"resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.18.6.tgz",
"integrity": "sha512-fTf7zoXnUGl9gF25fXCWE26t7Tvtyn6H4hkLSYhATwJvw2uYxd3aoXplMSe0g9XbwK7bmxNes7+FGO0rB/xC0g=="
"version": "7.20.7",
"resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.20.7.tgz",
"integrity": "sha512-vujDMtB6LVfNW13jhlCrp48QNslK6JXi7lQG736HVbHz/mbf4Dc7tIRh1Xf5C0rF7BP8iiSxGMCmY6Ci1ven3A=="
},
"@babel/helper-simple-access": {
"version": "7.18.6",
"resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.18.6.tgz",
"integrity": "sha512-iNpIgTgyAvDQpDj76POqg+YEt8fPxx3yaNBg3S30dxNKm2SWfYhD0TGrK/Eu9wHpUW63VQU894TsTg+GLbUa1g=="
"version": "7.20.2",
"resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.20.2.tgz",
"integrity": "sha512-+0woI/WPq59IrqDYbVGfshjT5Dmk/nnbdpcF8SnMhhXObpTq2KNBdLFRFrkVdbDOyUmHBCxzm5FHV1rACIkIbA=="
},
"@babel/helper-skip-transparent-expression-wrappers": {
"version": "7.18.6",
"resolved": "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.18.6.tgz",
"integrity": "sha512-4KoLhwGS9vGethZpAhYnMejWkX64wsnHPDwvOsKWU6Fg4+AlK2Jz3TyjQLMEPvz+1zemi/WBdkYxCD0bAfIkiw=="
"version": "7.20.0",
"resolved": "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.20.0.tgz",
"integrity": "sha512-5y1JYeNKfvnT8sZcK9DVRtpTbGiomYIHviSP3OQWmDPU3DeH4a1ZlT/N2lyQ5P8egjcRaT/Y9aNqUxK0WsnIIg=="
},
"@babel/helper-split-export-declaration": {
"version": "7.18.6",
"resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.18.6.tgz",
"integrity": "sha512-bde1etTx6ZyTmobl9LLMMQsaizFVZrquTEHOqKeQESMKo4PlObf+8+JA25ZsIpZhT/WEd39+vOdLXAFG/nELpA=="
},
"@babel/helper-string-parser": {
"version": "7.19.4",
"resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.19.4.tgz",
"integrity": "sha512-nHtDoQcuqFmwYNYPz3Rah5ph2p8PFeFCsZk9A/48dPc/rGocJ5J3hAAZ7pb76VWX3fZKu+uEr/FhH5jLx7umrw=="
},
"@babel/helper-validator-identifier": {
"version": "7.18.6",
"resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.18.6.tgz",
"integrity": "sha512-MmetCkz9ej86nJQV+sFCxoGGrUbU3q02kgLciwkrt9QqEB7cP39oKEY0PakknEO0Gu20SskMRi+AYZ3b1TpN9g=="
"version": "7.19.1",
"resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.19.1.tgz",
"integrity": "sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w=="
},
"@babel/helper-validator-option": {
"version": "7.18.6",
@@ -151,14 +156,14 @@
"integrity": "sha512-XO7gESt5ouv/LRJdrVjkShckw6STTaB7l9BrpBaAHDeF5YZT+01PCwmR0SJHnkW6i8OwW/EVWRShfi4j2x+KQw=="
},
"@babel/helper-wrap-function": {
"version": "7.18.6",
"resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.18.6.tgz",
"integrity": "sha512-I5/LZfozwMNbwr/b1vhhuYD+J/mU+gfGAj5td7l5Rv9WYmH6i3Om69WGKNmlIpsVW/mF6O5bvTKbvDQZVgjqOw=="
"version": "7.20.5",
"resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.20.5.tgz",
"integrity": "sha512-bYMxIWK5mh+TgXGVqAtnu5Yn1un+v8DDZtqyzKRLUzrh70Eal2O3aZ7aPYiMADO4uKlkzOiRiZ6GX5q3qxvW9Q=="
},
"@babel/helpers": {
"version": "7.18.6",
"resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.18.6.tgz",
"integrity": "sha512-vzSiiqbQOghPngUYt/zWGvK3LAsPhz55vc9XNN0xAl2gV4ieShI2OQli5duxWHD+72PZPTKAcfcZDE1Cwc5zsQ=="
"version": "7.20.13",
"resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.20.13.tgz",
"integrity": "sha512-nzJ0DWCL3gB5RCXbUO3KIMMsBY2Eqbx8mBpKGE/02PgyRQFcPQLbkQ1vyy596mZLaP+dAfD+R4ckASzNVmW3jg=="
},
"@babel/highlight": {
"version": "7.18.6",
@@ -166,14 +171,14 @@
"integrity": "sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g=="
},
"@babel/parser": {
"version": "7.18.8",
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.18.8.tgz",
"integrity": "sha512-RSKRfYX20dyH+elbJK2uqAkVyucL+xXzhqlMD5/ZXx+dAAwpyB7HsvnHe/ZUGOF+xLr5Wx9/JoXVTj6BQE2/oA=="
"version": "7.20.13",
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.20.13.tgz",
"integrity": "sha512-gFDLKMfpiXCsjt4za2JA9oTMn70CeseCehb11kRZgvd7+F67Hih3OHOK24cRrWECJ/ljfPGac6ygXAs/C8kIvw=="
},
"@babel/plugin-proposal-async-generator-functions": {
"version": "7.18.6",
"resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.18.6.tgz",
"integrity": "sha512-WAz4R9bvozx4qwf74M+sfqPMKfSqwM0phxPTR6iJIi8robgzXwkEgmeJG1gEKhm6sDqT/U9aV3lfcqybIpev8w=="
"version": "7.20.7",
"resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.20.7.tgz",
"integrity": "sha512-xMbiLsn/8RK7Wq7VeVytytS2L6qE69bXPB10YCmMdDZbKF4okCqY74pI/jJQ/8U0b/F6NrT2+14b8/P9/3AMGA=="
},
"@babel/plugin-proposal-class-properties": {
"version": "7.18.6",
@@ -181,9 +186,9 @@
"integrity": "sha512-cumfXOF0+nzZrrN8Rf0t7M+tF6sZc7vhQwYQck9q1/5w2OExlD+b4v4RpMJFaV1Z7WcDRgO6FqvxqxGlwo+RHQ=="
},
"@babel/plugin-proposal-logical-assignment-operators": {
"version": "7.18.6",
"resolved": "https://registry.npmjs.org/@babel/plugin-proposal-logical-assignment-operators/-/plugin-proposal-logical-assignment-operators-7.18.6.tgz",
"integrity": "sha512-zMo66azZth/0tVd7gmkxOkOjs2rpHyhpcFo565PUP37hSp6hSd9uUKIfTDFMz58BwqgQKhJ9YxtM5XddjXVn+Q=="
"version": "7.20.7",
"resolved": "https://registry.npmjs.org/@babel/plugin-proposal-logical-assignment-operators/-/plugin-proposal-logical-assignment-operators-7.20.7.tgz",
"integrity": "sha512-y7C7cZgpMIjWlKE5T7eJwp+tnRYM89HmRvWM5EQuB5BoHEONjmQ8lSNmBUwOyy/GFRsohJED51YBF79hE1djug=="
},
"@babel/plugin-proposal-nullish-coalescing-operator": {
"version": "7.18.6",
@@ -191,9 +196,9 @@
"integrity": "sha512-wQxQzxYeJqHcfppzBDnm1yAY0jSRkUXR2z8RePZYrKwMKgMlE8+Z6LUno+bd6LvbGh8Gltvy74+9pIYkr+XkKA=="
},
"@babel/plugin-proposal-object-rest-spread": {
"version": "7.18.6",
"resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.18.6.tgz",
"integrity": "sha512-9yuM6wr4rIsKa1wlUAbZEazkCrgw2sMPEXCr4Rnwetu7cEW1NydkCWytLuYletbf8vFxdJxFhwEZqMpOx2eZyw=="
"version": "7.20.7",
"resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.20.7.tgz",
"integrity": "sha512-d2S98yCiLxDVmBmE8UjGcfPvNEUbA1U5q5WxaWFUGRzJSVAZqm5W6MbPct0jxnegUZ0niLeNX+IOzEs7wYg9Dg=="
},
"@babel/plugin-proposal-optional-catch-binding": {
"version": "7.18.6",
@@ -201,9 +206,9 @@
"integrity": "sha512-Q40HEhs9DJQyaZfUjjn6vE8Cv4GmMHCYuMGIWUnlxH6400VGxOuwWsPt4FxXxJkC/5eOzgn0z21M9gMT4MOhbw=="
},
"@babel/plugin-proposal-optional-chaining": {
"version": "7.18.6",
"resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.18.6.tgz",
"integrity": "sha512-PatI6elL5eMzoypFAiYDpYQyMtXTn+iMhuxxQt5mAXD4fEmKorpSI3PHd+i3JXBJN3xyA6MvJv7at23HffFHwA=="
"version": "7.20.7",
"resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.20.7.tgz",
"integrity": "sha512-T+A7b1kfjtRM51ssoOfS1+wbyCVqorfyZhT99TvxxLMirPShD8CzKMRepMlCBGM5RpHMbn8s+5MMHnPstJH6mQ=="
},
"@babel/plugin-syntax-async-generators": {
"version": "7.8.4",
@@ -251,14 +256,14 @@
"integrity": "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg=="
},
"@babel/plugin-transform-arrow-functions": {
"version": "7.18.6",
"resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.18.6.tgz",
"integrity": "sha512-9S9X9RUefzrsHZmKMbDXxweEH+YlE8JJEuat9FdvW9Qh1cw7W64jELCtWNkPBPX5En45uy28KGvA/AySqUh8CQ=="
"version": "7.20.7",
"resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.20.7.tgz",
"integrity": "sha512-3poA5E7dzDomxj9WXWwuD6A5F3kc7VXwIJO+E+J8qtDtS+pXPAhrgEyh+9GBwBgPq1Z+bB+/JD60lp5jsN7JPQ=="
},
"@babel/plugin-transform-async-to-generator": {
"version": "7.18.6",
"resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.18.6.tgz",
"integrity": "sha512-ARE5wZLKnTgPW7/1ftQmSi1CmkqqHo2DNmtztFhvgtOWSDfq0Cq9/9L+KnZNYSNrydBekhW3rwShduf59RoXag=="
"version": "7.20.7",
"resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.20.7.tgz",
"integrity": "sha512-Uo5gwHPT9vgnSXQxqGtpdufUiWp96gk7yiP4Mp5bm1QMkEmLXBO7PAGYbKoJ6DhAwiNkcHFBol/x5zZZkL/t0Q=="
},
"@babel/plugin-transform-block-scoped-functions": {
"version": "7.18.6",
@@ -266,24 +271,24 @@
"integrity": "sha512-ExUcOqpPWnliRcPqves5HJcJOvHvIIWfuS4sroBUenPuMdmW+SMHDakmtS7qOo13sVppmUijqeTv7qqGsvURpQ=="
},
"@babel/plugin-transform-block-scoping": {
"version": "7.18.6",
"resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.18.6.tgz",
"integrity": "sha512-pRqwb91C42vs1ahSAWJkxOxU1RHWDn16XAa6ggQ72wjLlWyYeAcLvTtE0aM8ph3KNydy9CQF2nLYcjq1WysgxQ=="
"version": "7.20.11",
"resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.20.11.tgz",
"integrity": "sha512-tA4N427a7fjf1P0/2I4ScsHGc5jcHPbb30xMbaTke2gxDuWpUfXDuX1FEymJwKk4tuGUvGcejAR6HdZVqmmPyw=="
},
"@babel/plugin-transform-classes": {
"version": "7.18.8",
"resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.18.8.tgz",
"integrity": "sha512-RySDoXdF6hgHSHuAW4aLGyVQdmvEX/iJtjVre52k0pxRq4hzqze+rAVP++NmNv596brBpYmaiKgTZby7ziBnVg=="
"version": "7.20.7",
"resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.20.7.tgz",
"integrity": "sha512-LWYbsiXTPKl+oBlXUGlwNlJZetXD5Am+CyBdqhPsDVjM9Jc8jwBJFrKhHf900Kfk2eZG1y9MAG3UNajol7A4VQ=="
},
"@babel/plugin-transform-computed-properties": {
"version": "7.18.6",
"resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.18.6.tgz",
"integrity": "sha512-9repI4BhNrR0KenoR9vm3/cIc1tSBIo+u1WVjKCAynahj25O8zfbiE6JtAtHPGQSs4yZ+bA8mRasRP+qc+2R5A=="
"version": "7.20.7",
"resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.20.7.tgz",
"integrity": "sha512-Lz7MvBK6DTjElHAmfu6bfANzKcxpyNPeYBGEafyA6E5HtRpjpZwU+u7Qrgz/2OR0z+5TvKYbPdphfSaAcZBrYQ=="
},
"@babel/plugin-transform-destructuring": {
"version": "7.18.6",
"resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.18.6.tgz",
"integrity": "sha512-tgy3u6lRp17ilY8r1kP4i2+HDUwxlVqq3RTc943eAWSzGgpU1qhiKpqZ5CMyHReIYPHdo3Kg8v8edKtDqSVEyQ=="
"version": "7.20.7",
"resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.20.7.tgz",
"integrity": "sha512-Xwg403sRrZb81IVB79ZPqNQME23yhugYVqgTxAhT99h485F4f+GMELFhhOsscDUB7HCswepKeCKLn/GZvUKoBA=="
},
"@babel/plugin-transform-exponentiation-operator": {
"version": "7.18.6",
@@ -296,14 +301,14 @@
"integrity": "sha512-yEfTRnjuskWYo0k1mHUqrVWaZwrdq8AYbfrpqULOJOaucGSp4mNMVps+YtA8byoevxS/urwU75vyhQIxcCgiBQ=="
},
"@babel/plugin-transform-literals": {
"version": "7.18.6",
"resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.18.6.tgz",
"integrity": "sha512-x3HEw0cJZVDoENXOp20HlypIHfl0zMIhMVZEBVTfmqbObIpsMxMbmU5nOEO8R7LYT+z5RORKPlTI5Hj4OsO9/Q=="
"version": "7.18.9",
"resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.18.9.tgz",
"integrity": "sha512-IFQDSRoTPnrAIrI5zoZv73IFeZu2dhu6irxQjY9rNjTT53VmKg9fenjvoiOWOkJ6mm4jKVPtdMzBY98Fp4Z4cg=="
},
"@babel/plugin-transform-modules-commonjs": {
"version": "7.18.6",
"resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.18.6.tgz",
"integrity": "sha512-Qfv2ZOWikpvmedXQJDSbxNqy7Xr/j2Y8/KfijM0iJyKkBTmWuvCA1yeH1yDM7NJhBW/2aXxeucLj6i80/LAJ/Q=="
"version": "7.20.11",
"resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.20.11.tgz",
"integrity": "sha512-S8e1f7WQ7cimJQ51JkAaDrEtohVEitXjgCGAS2N8S31Y42E+kWwfSz83LYz57QdBm7q9diARVqanIaH2oVgQnw=="
},
"@babel/plugin-transform-object-super": {
"version": "7.18.6",
@@ -311,9 +316,9 @@
"integrity": "sha512-uvGz6zk+pZoS1aTZrOvrbj6Pp/kK2mp45t2B+bTDre2UgsZZ8EZLSJtUg7m/no0zOJUWgFONpB7Zv9W2tSaFlA=="
},
"@babel/plugin-transform-parameters": {
"version": "7.18.8",
"resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.18.8.tgz",
"integrity": "sha512-ivfbE3X2Ss+Fj8nnXvKJS6sjRG4gzwPMsP+taZC+ZzEGjAYlvENixmt1sZ5Ca6tWls+BlKSGKPJ6OOXvXCbkFg=="
"version": "7.20.7",
"resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.20.7.tgz",
"integrity": "sha512-WiWBIkeHKVOSYPO0pWkxGPfKeWrCJyD3NJ53+Lrp/QMSZbsVPovrVl2aWZ19D/LTVnaDv5Ap7GJ/B2CTOZdrfA=="
},
"@babel/plugin-transform-property-literals": {
"version": "7.18.6",
@@ -326,9 +331,9 @@
"integrity": "sha512-TV4sQ+T013n61uMoygyMRm+xf04Bd5oqFpv2jAEQwSZ8NwQA7zeRPg1LMVg2PWi3zWBz+CLKD+v5bcpZ/BS0aA=="
},
"@babel/plugin-transform-react-jsx": {
"version": "7.18.6",
"resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.18.6.tgz",
"integrity": "sha512-Mz7xMPxoy9kPS/JScj6fJs03TZ/fZ1dJPlMjRAgTaxaS0fUBk8FV/A2rRgfPsVCZqALNwMexD+0Uaf5zlcKPpw=="
"version": "7.20.13",
"resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.20.13.tgz",
"integrity": "sha512-MmTZx/bkUrfJhhYAYt3Urjm+h8DQGrPrnKQ94jLo7NLuOU+T89a7IByhKmrb8SKhrIYIQ0FN0CHMbnFRen4qNw=="
},
"@babel/plugin-transform-react-jsx-development": {
"version": "7.18.6",
@@ -341,14 +346,14 @@
"integrity": "sha512-I8VfEPg9r2TRDdvnHgPepTKvuRomzA8+u+nhY7qSI1fR2hRNebasZEETLyM5mAUr0Ku56OkXJ0I7NHJnO6cJiQ=="
},
"@babel/plugin-transform-regenerator": {
"version": "7.18.6",
"resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.18.6.tgz",
"integrity": "sha512-poqRI2+qiSdeldcz4wTSTXBRryoq3Gc70ye7m7UD5Ww0nE29IXqMl6r7Nd15WBgRd74vloEMlShtH6CKxVzfmQ=="
"version": "7.20.5",
"resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.20.5.tgz",
"integrity": "sha512-kW/oO7HPBtntbsahzQ0qSE3tFvkFwnbozz3NWFhLGqH75vLEg+sCGngLlhVkePlCs3Jv0dBBHDzCHxNiFAQKCQ=="
},
"@babel/plugin-transform-runtime": {
"version": "7.18.6",
"resolved": "https://registry.npmjs.org/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.18.6.tgz",
"integrity": "sha512-8uRHk9ZmRSnWqUgyae249EJZ94b0yAGLBIqzZzl+0iEdbno55Pmlt/32JZsHwXD9k/uZj18Aqqk35wBX4CBTXA=="
"version": "7.19.6",
"resolved": "https://registry.npmjs.org/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.19.6.tgz",
"integrity": "sha512-PRH37lz4JU156lYFW1p8OxE5i7d6Sl/zV58ooyr+q1J1lnQPyg5tIiXlIwNVhJaY4W3TmOtdc8jqdXQcB1v5Yw=="
},
"@babel/plugin-transform-shorthand-properties": {
"version": "7.18.6",
@@ -356,9 +361,9 @@
"integrity": "sha512-eCLXXJqv8okzg86ywZJbRn19YJHU4XUa55oz2wbHhaQVn/MM+XhukiT7SYqp/7o00dg52Rj51Ny+Ecw4oyoygw=="
},
"@babel/plugin-transform-spread": {
"version": "7.18.6",
"resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.18.6.tgz",
"integrity": "sha512-ayT53rT/ENF8WWexIRg9AiV9h0aIteyWn5ptfZTZQrjk/+f3WdrJGCY4c9wcgl2+MKkKPhzbYp97FTsquZpDCw=="
"version": "7.20.7",
"resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.20.7.tgz",
"integrity": "sha512-ewBbHQ+1U/VnH1fxltbJqDeWBU1oNLG8Dj11uIv3xVf7nrQu0bPGe5Rf716r7K5Qz+SqtAOVswoVunoiBtGhxw=="
},
"@babel/plugin-transform-sticky-regex": {
"version": "7.18.6",
@@ -366,14 +371,14 @@
"integrity": "sha512-kfiDrDQ+PBsQDO85yj1icueWMfGfJFKN1KCkndygtu/C9+XUfydLC8Iv5UYJqRwy4zk8EcplRxEOeLyjq1gm6Q=="
},
"@babel/plugin-transform-template-literals": {
"version": "7.18.6",
"resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.18.6.tgz",
"integrity": "sha512-UuqlRrQmT2SWRvahW46cGSany0uTlcj8NYOS5sRGYi8FxPYPoLd5DDmMd32ZXEj2Jq+06uGVQKHxa/hJx2EzKw=="
"version": "7.18.9",
"resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.18.9.tgz",
"integrity": "sha512-S8cOWfT82gTezpYOiVaGHrCbhlHgKhQt8XH5ES46P2XWmX92yisoZywf5km75wv5sYcXDUCLMmMxOLCtthDgMA=="
},
"@babel/plugin-transform-typeof-symbol": {
"version": "7.18.6",
"resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.18.6.tgz",
"integrity": "sha512-7m71iS/QhsPk85xSjFPovHPcH3H9qeyzsujhTc+vcdnsXavoWYJ74zx0lP5RhpC5+iDnVLO+PPMHzC11qels1g=="
"version": "7.18.9",
"resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.18.9.tgz",
"integrity": "sha512-SRfwTtF11G2aemAZWivL7PD+C9z52v9EvMqH9BuYbabyPuKUvSWks3oCg6041pT925L4zVFqaVBeECwsmlguEw=="
},
"@babel/plugin-transform-unicode-regex": {
"version": "7.18.6",
@@ -386,24 +391,24 @@
"integrity": "sha512-zXr6atUmyYdiWRVLOZahakYmOBHtWc2WGCkP8PYTgZi0iJXDY2CN180TdrIW4OGOAdLc7TifzDIvtx6izaRIzg=="
},
"@babel/runtime": {
"version": "7.18.6",
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.18.6.tgz",
"integrity": "sha512-t9wi7/AW6XtKahAe20Yw0/mMljKq0B1r2fPdvaAdV/KPDZewFXdaaa6K7lxmZBZ8FBNpCiAT6iHPmd6QO9bKfQ=="
"version": "7.17.2",
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.17.2.tgz",
"integrity": "sha512-hzeyJyMA1YGdJTuWU0e/j4wKXrU4OMFvY2MSlaI9B7VQb0r5cxTE3EAIS2Q7Tn2RIcDkRvTA/v2JsAEhxe99uw=="
},
"@babel/template": {
"version": "7.18.6",
"resolved": "https://registry.npmjs.org/@babel/template/-/template-7.18.6.tgz",
"integrity": "sha512-JoDWzPe+wgBsTTgdnIma3iHNFC7YVJoPssVBDjiHfNlyt4YcunDtcDOUmfVDfCK5MfdsaIoX9PkijPhjH3nYUw=="
"version": "7.20.7",
"resolved": "https://registry.npmjs.org/@babel/template/-/template-7.20.7.tgz",
"integrity": "sha512-8SegXApWe6VoNw0r9JHpSteLKTpTiLZ4rMlGIm9JQ18KiCtyQiAMEazujAHrUS5flrcqYZa75ukev3P6QmUwUw=="
},
"@babel/traverse": {
"version": "7.18.8",
"resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.18.8.tgz",
"integrity": "sha512-UNg/AcSySJYR/+mIcJQDCv00T+AqRO7j/ZEJLzpaYtgM48rMg5MnkJgyNqkzo88+p4tfRvZJCEiwwfG6h4jkRg=="
"version": "7.20.13",
"resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.20.13.tgz",
"integrity": "sha512-kMJXfF0T6DIS9E8cgdLCSAL+cuCK+YEZHWiLK0SXpTo8YRj5lpJu3CDNKiIBCne4m9hhTIqUg6SYTAI39tAiVQ=="
},
"@babel/types": {
"version": "7.18.8",
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.18.8.tgz",
"integrity": "sha512-qwpdsmraq0aJ3osLJRApsc2ouSJCdnMeZwB0DhbtHAtRpZNZCdlbRnHIgcRKzdE1g0iOGg644fzjOBcdOz9cPw=="
"version": "7.20.7",
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.20.7.tgz",
"integrity": "sha512-69OnhBxSSgK0OzTJai4kyPDiKTIe3j+ctaHdIGVbRahTLAT7L3R9oeXHC2aVSuGYt3cVnoAMDmOCgJ2yaiLMvg=="
},
"@jridgewell/gen-mapping": {
"version": "0.1.1",
@@ -426,14 +431,14 @@
"integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw=="
},
"@jridgewell/trace-mapping": {
"version": "0.3.14",
"resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.14.tgz",
"integrity": "sha512-bJWEfQ9lPTvm3SneWwRFVLzrh6nhjwqw7TUFFBEMzwvg7t7PCDenf2lDwqo4NQXzdpgBXyFgDWnQA+2vkruksQ=="
"version": "0.3.17",
"resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.17.tgz",
"integrity": "sha512-MCNzAp77qzKca9+W/+I0+sEpaUnZoeasnghNeVc41VZCEKaCH73Vq3BZZ/SzWIgrqE4H4ceI+p+b6C0mHf9T4g=="
},
"@meteorjs/babel": {
"version": "7.16.0-beta.1",
"resolved": "https://registry.npmjs.org/@meteorjs/babel/-/babel-7.16.0-beta.1.tgz",
"integrity": "sha512-PSyp2+oO2nrGMBTXd3VAP0EzHLW4bFqRIzmbTfHnr/s0dGhb7XaaGg3sOGAInewrFNCWfMHNe3hSiyOvC9bS2A=="
"version": "7.18.0-beta.6",
"resolved": "https://registry.npmjs.org/@meteorjs/babel/-/babel-7.18.0-beta.6.tgz",
"integrity": "sha512-M3BL5ivQQBE4iQ9my7WqXZdkhR61x2H/Z0xshYuv8kppFzuS9/saksET1T7JrTGJnnfONpoxqYkiBGIHSw8+cQ=="
},
"@meteorjs/reify": {
"version": "0.23.0",
@@ -502,11 +507,6 @@
"resolved": "https://registry.npmjs.org/babel-helper-to-multiple-sequence-expressions/-/babel-helper-to-multiple-sequence-expressions-0.5.0.tgz",
"integrity": "sha512-m2CvfDW4+1qfDdsrtf4dwOslQC3yhbgyBFptncp4wvtdrDHqueW7slsYv4gArie056phvQFhT2nRcGS4bnm6mA=="
},
"babel-plugin-dynamic-import-node": {
"version": "2.3.3",
"resolved": "https://registry.npmjs.org/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-2.3.3.tgz",
"integrity": "sha512-jZVI+s9Zg3IqA/kdi0i6UDCybUI3aSBLnglhYbSSjKlV7yF1F/5LWv8MakQmvYpnbJDS6fcBL2KzHSxNCMtWSQ=="
},
"babel-plugin-minify-builtins": {
"version": "0.5.0",
"resolved": "https://registry.npmjs.org/babel-plugin-minify-builtins/-/babel-plugin-minify-builtins-0.5.0.tgz",
@@ -563,19 +563,19 @@
"integrity": "sha512-4ADB0irJ/6BeXWHubjCJmrPbzhxDgjphBMjIjxCc25n4NGJ00NsYqwYt+F/OvE9RXx8KaSW7cJvp+iZX436tnQ=="
},
"babel-plugin-polyfill-corejs2": {
"version": "0.3.1",
"resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.3.1.tgz",
"integrity": "sha512-v7/T6EQcNfVLfcN2X8Lulb7DjprieyLWJK/zOWH5DUYcAgex9sP3h25Q+DLsX9TloXe3y1O8l2q2Jv9q8UVB9w=="
"version": "0.3.3",
"resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.3.3.tgz",
"integrity": "sha512-8hOdmFYFSZhqg2C/JgLUQ+t52o5nirNwaWM2B9LWteozwIvM14VSwdsCAUET10qT+kmySAlseadmfeeSWFCy+Q=="
},
"babel-plugin-polyfill-corejs3": {
"version": "0.5.2",
"resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.5.2.tgz",
"integrity": "sha512-G3uJih0XWiID451fpeFaYGVuxHEjzKTHtc9uGFEjR6hHrvNzeS/PX+LLLcetJcytsB5m4j+K3o/EpXJNb/5IEQ=="
"version": "0.6.0",
"resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.6.0.tgz",
"integrity": "sha512-+eHqR6OPcBhJOGgsIar7xoAB1GcSwVUA3XjAd7HJNzOXT4wv6/H7KIdA/Nc60cvUlDbKApmqNvD1B1bzOt4nyA=="
},
"babel-plugin-polyfill-regenerator": {
"version": "0.3.1",
"resolved": "https://registry.npmjs.org/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.3.1.tgz",
"integrity": "sha512-Y2B06tvgHYt1x0yz17jGkGeeMr5FeKUu+ASJ+N6nB5lQ8Dapfg42i0OVrf8PNGJ3zKL4A23snMi1IRwrqqND7A=="
"version": "0.4.1",
"resolved": "https://registry.npmjs.org/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.4.1.tgz",
"integrity": "sha512-NtQGmyQDXjQqQ+IzRkBVwEOz9lQ4zxAQZgoAYEtU9dJjnl1Oc98qnN7jcp+bE7O7aYzVpavXE3/VKXNzUbh7aw=="
},
"babel-plugin-transform-inline-consecutive-adds": {
"version": "0.4.3",
@@ -643,19 +643,14 @@
"integrity": "sha512-v4GL+kk0TfovbRIKZnC3HPbu2cAGmPAby7BsOmuPdMJfHV+4FVdsGXTH/OOGQRKYdjemBuL1+MsE6mobobhe9w=="
},
"browserslist": {
"version": "4.21.2",
"resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.2.tgz",
"integrity": "sha512-MonuOgAtUB46uP5CezYbRaYKBNt2LxP0yX+Pmj4LkcDFGkn9Cbpi83d9sCjwQDErXsIJSzY5oKGDbgOlF/LPAA=="
},
"call-bind": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz",
"integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA=="
"version": "4.21.4",
"resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.4.tgz",
"integrity": "sha512-CBHJJdDmgjl3daYjN5Cp5kbTf1mUhZoS+beLklHIvkOWscs83YAhLlF3Wsh/lciQYAcbBJgTOD44VtG31ZM4Hw=="
},
"caniuse-lite": {
"version": "1.0.30001366",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001366.tgz",
"integrity": "sha512-yy7XLWCubDobokgzudpkKux8e0UOOnLHE6mlNJBzT3lZJz6s5atSEzjoL+fsCPkI0G8MP5uVdDx1ur/fXEWkZA=="
"version": "1.0.30001449",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001449.tgz",
"integrity": "sha512-CPB+UL9XMT/Av+pJxCKGhdx+yg1hzplvFJQlJ2n68PyQGMz9L/E2zCyLdOL8uasbouTUgnPl+y0tccI/se+BEw=="
},
"chalk": {
"version": "2.4.2",
@@ -673,36 +668,24 @@
"integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw=="
},
"convert-source-map": {
"version": "1.8.0",
"resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.8.0.tgz",
"integrity": "sha512-+OQdjP49zViI/6i7nIJpA8rAl4sV/JdPfU9nZs3VqOwGIgizICvuN2ru6fMd+4llL0tar18UYJXfZ/TWtmhUjA=="
"version": "1.9.0",
"resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz",
"integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A=="
},
"core-js-compat": {
"version": "3.23.4",
"resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.23.4.tgz",
"integrity": "sha512-RkSRPe+JYEoflcsuxJWaiMPhnZoFS51FcIxm53k4KzhISCBTmaGlto9dTIrYuk0hnJc3G6pKufAKepHnBq6B6Q==",
"dependencies": {
"semver": {
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/semver/-/semver-7.0.0.tgz",
"integrity": "sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A=="
}
}
"version": "3.27.2",
"resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.27.2.tgz",
"integrity": "sha512-welaYuF7ZtbYKGrIy7y3eb40d37rG1FvzEOfe7hSLd2iD6duMDqUhRfSvCGyC46HhR6Y8JXXdZ2lnRUMkPBpvg=="
},
"debug": {
"version": "4.3.4",
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
"integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ=="
},
"define-properties": {
"version": "1.1.4",
"resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.4.tgz",
"integrity": "sha512-uckOqKcfaVvtBdsVkdPv3XjveQJsNQqmhXgRi8uhvWWuPYZCNlzT8qAyblUgNoXdHdjMTzAqeGjAoli8f+bzPA=="
},
"electron-to-chromium": {
"version": "1.4.189",
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.189.tgz",
"integrity": "sha512-dQ6Zn4ll2NofGtxPXaDfY2laIa6NyCQdqXYHdwH90GJQW0LpJJib0ZU/ERtbb0XkBEmUD2eJtagbOie3pdMiPg=="
"version": "1.4.284",
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.284.tgz",
"integrity": "sha512-M8WEXFuKXMYMVr45fo8mq0wUrrJHheiKZf6BArTKk9ZBYCKJEOU5H8cdWgDT+qCVZf7Na4lVUaZsA+h6uA9+PA=="
},
"escalade": {
"version": "3.1.1",
@@ -734,11 +717,6 @@
"resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz",
"integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg=="
},
"get-intrinsic": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.2.tgz",
"integrity": "sha512-Jfm3OyCxHh9DJyc28qGk+JmfkpO41A4XkneDSujN9MDXrm4oDKdHvndhZ2dN94+ERNfkYJWDclW6k2L/ZGHjXA=="
},
"globals": {
"version": "11.12.0",
"resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz",
@@ -754,20 +732,10 @@
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
"integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw=="
},
"has-property-descriptors": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz",
"integrity": "sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ=="
},
"has-symbols": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz",
"integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A=="
},
"is-core-module": {
"version": "2.9.0",
"resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.9.0.tgz",
"integrity": "sha512-+5FPy5PnwmO3lvfMb0AsoPaBG+5KHUI0wYFXOtYPnVVVspTFUuMZNfNaNVRt3FZadstu2c8x23vykRW/NBoU6A=="
"version": "2.11.0",
"resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.11.0.tgz",
"integrity": "sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw=="
},
"is-reference": {
"version": "1.2.1",
@@ -799,6 +767,11 @@
"resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz",
"integrity": "sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow=="
},
"lru-cache": {
"version": "5.1.1",
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz",
"integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w=="
},
"magic-string": {
"version": "0.25.9",
"resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.9.tgz",
@@ -810,9 +783,9 @@
"integrity": "sha512-PgfmiyT/HiBaxwGHxS4t3Qi0fpmEW3O0WW2VfrgekiMGz3aZPd9/4PRIaMMZsfyjQ1vyEm6dZqTAFZENbuoTxw=="
},
"minimist": {
"version": "1.2.6",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz",
"integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q=="
"version": "1.2.7",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.7.tgz",
"integrity": "sha512-bzfL1YUZsP41gmu/qjrEk0Q6i2ix/cVeAhbCbqH9u3zYutS1cLg00qhrD0M2MVdCcx4Sc0UpP2eBWo9rotpq6g=="
},
"ms": {
"version": "2.1.2",
@@ -820,19 +793,9 @@
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
},
"node-releases": {
"version": "2.0.6",
"resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.6.tgz",
"integrity": "sha512-PiVXnNuFm5+iYkLBNeq5211hvO38y63T0i2KKh2KnUs3RpzJ+JtODFjkD8yjLwnDkTYF1eKXheUwdssR+NRZdg=="
},
"object-keys": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz",
"integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA=="
},
"object.assign": {
"version": "4.1.2",
"resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz",
"integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ=="
"version": "2.0.8",
"resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.8.tgz",
"integrity": "sha512-dFSmB8fFHEH/s81Xi+Y/15DQY6VHW81nXRj86EMSL3lmuTmK1e+aT4wrFCkTbm+gSwkw4KpX+rT/pMM2c1mF+A=="
},
"path-parse": {
"version": "1.0.7",
@@ -855,34 +818,34 @@
"integrity": "sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A=="
},
"regenerate-unicode-properties": {
"version": "10.0.1",
"resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-10.0.1.tgz",
"integrity": "sha512-vn5DU6yg6h8hP/2OkQo3K7uVILvY4iu0oI4t3HFa81UPkhGJwkRwM10JEc3upjdhHjs/k8GJY1sRBhk5sr69Bw=="
"version": "10.1.0",
"resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-10.1.0.tgz",
"integrity": "sha512-d1VudCLoIGitcU/hEg2QqvyGZQmdC0Lf8BqdOMXGFSvJP4bNV1+XqbPQeHHLD51Jh4QJJ225dlIFvY4Ly6MXmQ=="
},
"regenerator-runtime": {
"version": "0.13.9",
"resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz",
"integrity": "sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA=="
"version": "0.13.11",
"resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz",
"integrity": "sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg=="
},
"regenerator-transform": {
"version": "0.15.0",
"resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.15.0.tgz",
"integrity": "sha512-LsrGtPmbYg19bcPHwdtmXwbW+TqNvtY4riE3P83foeHRroMbH6/2ddFBfab3t7kbzc7v7p4wbkIecHImqt0QNg=="
"version": "0.15.1",
"resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.15.1.tgz",
"integrity": "sha512-knzmNAcuyxV+gQCufkYcvOqX/qIIfHLv0u5x79kRxuGojfYVky1f15TzZEu2Avte8QGepvUNTnLskf8E6X6Vyg=="
},
"regexpu-core": {
"version": "5.1.0",
"resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-5.1.0.tgz",
"integrity": "sha512-bb6hk+xWd2PEOkj5It46A16zFMs2mv86Iwpdu94la4S3sJ7C973h2dHpYKwIBGaWSO7cIRJ+UX0IeMaWcO4qwA=="
"version": "5.2.2",
"resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-5.2.2.tgz",
"integrity": "sha512-T0+1Zp2wjF/juXMrMxHxidqGYn8U4R+zleSJhX9tQ1PUsS8a9UtYfbsF9LdiVgNX3kiX8RNaKM42nfSgvFJjmw=="
},
"regjsgen": {
"version": "0.6.0",
"resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.6.0.tgz",
"integrity": "sha512-ozE883Uigtqj3bx7OhL1KNbCzGyW2NQZPl6Hs09WTvCuZD5sTI4JY58bkbQWa/Y9hxIsvJ3M8Nbf7j54IqeZbA=="
"version": "0.7.1",
"resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.7.1.tgz",
"integrity": "sha512-RAt+8H2ZEzHeYWxZ3H2z6tF18zyyOnlcdaafLrm21Bguj7uZy6ULibiAFdXEtKQY4Sy7wDTwDiOazasMLc4KPA=="
},
"regjsparser": {
"version": "0.8.4",
"resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.8.4.tgz",
"integrity": "sha512-J3LABycON/VNEu3abOviqGHuB/LOtOQj8SKmfP9anY5GfAVw/SPjwzSjxGjbZXIxbGfqTHtJw58C2Li/WkStmA==",
"version": "0.9.1",
"resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.9.1.tgz",
"integrity": "sha512-dQUtn90WanSNl+7mQKcXAgZxvUe7Z0SqXlgzv0za4LwiUhyzBC58yQO3liFoUgu8GiJVInAhJjkj1N0EtQ5nkQ==",
"dependencies": {
"jsesc": {
"version": "0.5.0",
@@ -896,11 +859,6 @@
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz",
"integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw=="
},
"safe-buffer": {
"version": "5.1.2",
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
"integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
},
"semver": {
"version": "6.3.0",
"resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
@@ -927,9 +885,9 @@
"integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog=="
},
"typescript": {
"version": "4.7.4",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.7.4.tgz",
"integrity": "sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ=="
"version": "4.9.4",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.4.tgz",
"integrity": "sha512-Uz+dTXYzxXXbsFpM86Wh3dKCxrQqUcVMxwU54orwlJjOpO3ao8L7j5lH+dWfTwgCwIuM9GQ2kvVotzYJMXTBZg=="
},
"unicode-canonical-property-names-ecmascript": {
"version": "2.0.0",
@@ -942,19 +900,24 @@
"integrity": "sha512-5kaZCrbp5mmbz5ulBkDkbY0SsPOjKqVS35VpL9ulMPfSl0J0Xsm+9Evphv9CoIZFwre7aJoa94AY6seMKGVN5Q=="
},
"unicode-match-property-value-ecmascript": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-2.0.0.tgz",
"integrity": "sha512-7Yhkc0Ye+t4PNYzOGKedDhXbYIBe1XEQYQxOPyhcXNMJ0WCABqqj6ckydd6pWRZTHV4GuCPKdBAUiMc60tsKVw=="
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-2.1.0.tgz",
"integrity": "sha512-qxkjQt6qjg/mYscYMC0XKRn3Rh0wFPlfxB0xkt9CfyTvpX1Ra0+rAmdX2QyAobptSEvuy4RtpPRui6XkV+8wjA=="
},
"unicode-property-aliases-ecmascript": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-2.0.0.tgz",
"integrity": "sha512-5Zfuy9q/DFr4tfO7ZPeVXb1aPoeQSdeFMLpYuFebehDAhbuevLs5yxSZmIFN1tP5F9Wl4IpJrYojg85/zgyZHQ=="
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-2.1.0.tgz",
"integrity": "sha512-6t3foTQI9qne+OZoVQB/8x8rk2k1eVy1gRXhV3oFQ5T6R1dqQ1xtin3XqSlx3+ATBkliTaR/hHyJBm+LVPNM8w=="
},
"update-browserslist-db": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.4.tgz",
"integrity": "sha512-jnmO2BEGUjsMOe/Fg9u0oczOe/ppIDZPebzccl1yDWGLFP16Pa1/RM5wEoKYPG2zstNcDuAStejyxsOuKINdGA=="
"version": "1.0.10",
"resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.10.tgz",
"integrity": "sha512-OztqDenkfFkbSG+tRxBeAnCVPckDBcvibKd35yDONx6OU8N7sqgwc7rCbkJ/WcYtVRZ4ba68d6byhC21GFh7sQ=="
},
"yallist": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz",
"integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g=="
}
}
}

View File

@@ -80,7 +80,7 @@ BCp.processOneFileForTarget = function (inputFile, source) {
// compilation, give it the following file extension: .es5.js
! excludedFileExtensionPattern.test(inputFilePath)) {
const features = { ...this.extraFeatures };
const features = Object.assign({}, this.extraFeatures);
const arch = inputFile.getArch();
if (arch.startsWith("os.")) {
@@ -122,7 +122,7 @@ BCp.processOneFileForTarget = function (inputFile, source) {
this.inferExtraBabelOptions(
inputFile,
babelOptions,
cacheOptions.cacheDeps,
cacheOptions.cacheDeps
);
babelOptions.sourceMaps = true;

View File

@@ -26,7 +26,7 @@ Babel = {
return getMeteorBabel().compile(
source,
babelOptions || getDefaultOptions(),
cacheOptions,
cacheOptions
);
},

View File

@@ -1,11 +1,11 @@
Package.describe({
name: "babel-compiler",
summary: "Parser/transpiler for ECMAScript 2015+ syntax",
version: '7.9.0'
version: '7.10.4',
});
Npm.depends({
'@meteorjs/babel': '7.16.0-beta.1',
'@meteorjs/babel': '7.18.0-beta.6',
'json5': '2.1.1'
});

Some files were not shown because too many files have changed in this diff Show More