mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
Merge branch 'devel' into devel
This commit is contained in:
@@ -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
|
||||
@@ -261,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:
|
||||
@@ -746,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:
|
||||
|
||||
19
.github/workflows/check-code-style.yml
vendored
Normal file
19
.github/workflows/check-code-style.yml
vendored
Normal 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
15
.github/workflows/check-syntax.yml
vendored
Normal 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
|
||||
6
.github/workflows/docs.yml
vendored
6
.github/workflows/docs.yml
vendored
@@ -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
|
||||
|
||||
6
.github/workflows/guide.yml
vendored
6
.github/workflows/guide.yml
vendored
@@ -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
|
||||
|
||||
2
.github/workflows/labeler.yml
vendored
2
.github/workflows/labeler.yml
vendored
@@ -17,6 +17,6 @@ jobs:
|
||||
label:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/labeler@v3
|
||||
- uses: actions/labeler@v4
|
||||
with:
|
||||
repo-token: "${{ secrets.GITHUB_TOKEN }}"
|
||||
|
||||
@@ -20,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
|
||||
|
||||
4
.github/workflows/npm-meteor-babel.yml
vendored
4
.github/workflows/npm-meteor-babel.yml
vendored
@@ -20,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
|
||||
|
||||
4
.github/workflows/npm-meteor-promise.yml
vendored
4
.github/workflows/npm-meteor-promise.yml
vendored
@@ -20,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
3
.gitignore
vendored
@@ -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
|
||||
|
||||
10
README.md
10
README.md
@@ -8,9 +8,9 @@
|
||||
|
||||
<div align="center">
|
||||
|
||||
[](https://travis-ci.org/meteor/meteor)
|
||||
[](https://circleci.com/gh/meteor/meteor/tree/devel)
|
||||
[](https://meteor.com)
|
||||
[](https://app.travis-ci.com/github/meteor/meteor)
|
||||
[](https://app.circleci.com/pipelines/github/meteor/meteor?branch=devel)
|
||||
[](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 you’re 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/) |
|
||||
| - |
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
title: Meteor API Docs
|
||||
subtitle: API Docs
|
||||
versions:
|
||||
- '2.12'
|
||||
- '2.11'
|
||||
- '2.10'
|
||||
- '2.9'
|
||||
- '2.8'
|
||||
- '2.7'
|
||||
|
||||
36
docs/generators/changelog/EXAMPLE.MD
Normal file
36
docs/generators/changelog/EXAMPLE.MD
Normal 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!
|
||||
|
||||
|
||||
29
docs/generators/changelog/README.md
Normal file
29
docs/generators/changelog/README.md
Normal 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.
|
||||
109
docs/generators/changelog/script.js
Executable file
109
docs/generators/changelog/script.js
Executable 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(_ => _);
|
||||
9657
docs/generators/changelog/versions/0-before-2.10.md
Normal file
9657
docs/generators/changelog/versions/0-before-2.10.md
Normal file
File diff suppressed because it is too large
Load Diff
84
docs/generators/changelog/versions/2.10.md
Normal file
84
docs/generators/changelog/versions/2.10.md
Normal 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!
|
||||
137
docs/generators/changelog/versions/2.11.md
Normal file
137
docs/generators/changelog/versions/2.11.md
Normal 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!
|
||||
|
||||
|
||||
151
docs/generators/changelog/versions/2.12.md
Normal file
151
docs/generators/changelog/versions/2.12.md
Normal 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).
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
|
||||
808
docs/history.md
808
docs/history.md
File diff suppressed because it is too large
Load Diff
@@ -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",
|
||||
|
||||
@@ -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 %}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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" %}
|
||||
|
||||
@@ -249,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');
|
||||
```
|
||||
@@ -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" %}
|
||||
|
||||
@@ -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),
|
||||
|
||||
@@ -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.
|
||||
@@ -164,38 +174,38 @@ Create a basic [Solid](https://www.solidjs.com/) app.
|
||||
|
||||
| | 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 | X | |
|
||||
| [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 |
|
||||
| [insecure](https://atmospherejs.com/meteor/insecure) | 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 | | | | | | | |
|
||||
| [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 | 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 | | | | | |
|
||||
| [reactive-var](https://atmospherejs.com/meteor/reactive-var) | X | X | X | | X | X | X | X | X | X | X | X |
|
||||
| [rdb:svelte-meteor-data](https://atmospherejs.com/rdb/svelte-meteor-data) | | | | | | | | 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 | | | | |
|
||||
| [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 | X | X | |
|
||||
| [webapp](https://atmospherejs.com/meteor/webapp) | | | | X | | | | | | | | |
|
||||
| [react-meteor-data](https://atmospherejs.com/meteor/react-meteor-data) | 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>
|
||||
|
||||
@@ -916,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.
|
||||
|
||||
@@ -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>
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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.
|
||||
@@ -160,3 +160,4 @@ WebApp.addUpdatedNotifyHook(({arch, manifest, runtimeConfig}) => {
|
||||
|
||||
{% apibox "WebApp.addUpdatedNotifyHook" %}
|
||||
{% apibox "addUpdatedNotifyHookCallback(options)" %}
|
||||
{% apibox "main" %}
|
||||
@@ -5,6 +5,9 @@ edit_branch: 'devel'
|
||||
edit_path: 'guide'
|
||||
content_root: 'content'
|
||||
versions:
|
||||
- '2.12'
|
||||
- '2.11'
|
||||
- '2.10'
|
||||
- '2.9'
|
||||
- '2.8'
|
||||
- '2.7'
|
||||
@@ -38,7 +41,7 @@ sidebar_categories:
|
||||
- index
|
||||
- code-style
|
||||
- structure
|
||||
- 2.9-migration
|
||||
- 2.12-migration
|
||||
Data:
|
||||
- collections
|
||||
- data-loading
|
||||
|
||||
76
guide/source/2.10-migration.md
Normal file
76
guide/source/2.10-migration.md
Normal 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)
|
||||
161
guide/source/2.11-migration.md
Normal file
161
guide/source/2.11-migration.md
Normal 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)
|
||||
58
guide/source/2.12-migration.md
Normal file
58
guide/source/2.12-migration.md
Normal file
@@ -0,0 +1,58 @@
|
||||
---
|
||||
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.
|
||||
|
||||
<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)
|
||||
@@ -70,6 +70,43 @@ We now have async version of methods that you already use. They are:
|
||||
- [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.
|
||||
|
||||
@@ -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
3
meteor
@@ -1,6 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
BUNDLE_VERSION=14.21.1.7
|
||||
BUNDLE_VERSION=14.21.3.2
|
||||
|
||||
|
||||
# OS Check. Put here because here is where we download the precompiled
|
||||
# bundles that are arch specific.
|
||||
|
||||
@@ -14,8 +14,8 @@ var packageJson = {
|
||||
pacote: "https://github.com/meteor/pacote/tarball/a81b0324686e85d22c7688c47629d4009000e8b8",
|
||||
"node-gyp": "8.0.0",
|
||||
"node-pre-gyp": "0.15.0",
|
||||
typescript: "4.6.4",
|
||||
"@meteorjs/babel": "7.17.1-beta.0",
|
||||
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",
|
||||
|
||||
18
npm-packages/meteor-babel/package-lock.json
generated
18
npm-packages/meteor-babel/package-lock.json
generated
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "@meteorjs/babel",
|
||||
"version": "7.17.2-beta.0",
|
||||
"version": "7.18.0-beta.6",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@meteorjs/babel",
|
||||
"version": "7.17.2-beta.0",
|
||||
"version": "7.18.0-beta.6",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@babel/core": "^7.17.2",
|
||||
@@ -26,7 +26,7 @@
|
||||
"convert-source-map": "^1.6.0",
|
||||
"lodash": "^4.17.21",
|
||||
"meteor-babel-helpers": "0.0.3",
|
||||
"typescript": "~4.6.4"
|
||||
"typescript": "~4.9.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/plugin-proposal-decorators": "7.14.5",
|
||||
@@ -3617,9 +3617,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/typescript": {
|
||||
"version": "4.6.4",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.6.4.tgz",
|
||||
"integrity": "sha512-9ia/jWHIEbo49HfjrLGfKbZSuWo9iTMwXO+Ca3pRsSpbsMbc7/IU8NKdCZVRRBafVPGnoJeFL76ZOAA84I9fEg==",
|
||||
"version": "4.9.4",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.4.tgz",
|
||||
"integrity": "sha512-Uz+dTXYzxXXbsFpM86Wh3dKCxrQqUcVMxwU54orwlJjOpO3ao8L7j5lH+dWfTwgCwIuM9GQ2kvVotzYJMXTBZg==",
|
||||
"bin": {
|
||||
"tsc": "bin/tsc",
|
||||
"tsserver": "bin/tsserver"
|
||||
@@ -6590,9 +6590,9 @@
|
||||
"integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4="
|
||||
},
|
||||
"typescript": {
|
||||
"version": "4.6.4",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.6.4.tgz",
|
||||
"integrity": "sha512-9ia/jWHIEbo49HfjrLGfKbZSuWo9iTMwXO+Ca3pRsSpbsMbc7/IU8NKdCZVRRBafVPGnoJeFL76ZOAA84I9fEg=="
|
||||
"version": "4.9.4",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.4.tgz",
|
||||
"integrity": "sha512-Uz+dTXYzxXXbsFpM86Wh3dKCxrQqUcVMxwU54orwlJjOpO3ao8L7j5lH+dWfTwgCwIuM9GQ2kvVotzYJMXTBZg=="
|
||||
},
|
||||
"unbox-primitive": {
|
||||
"version": "1.0.1",
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@meteorjs/babel",
|
||||
"author": "Meteor <dev@meteor.com>",
|
||||
"version": "7.18.0-beta.4",
|
||||
"version": "7.18.0-beta.6",
|
||||
"license": "MIT",
|
||||
"description": "Babel wrapper package for use with Meteor",
|
||||
"keywords": [
|
||||
@@ -47,7 +47,7 @@
|
||||
"convert-source-map": "^1.6.0",
|
||||
"lodash": "^4.17.21",
|
||||
"meteor-babel-helpers": "0.0.3",
|
||||
"typescript": "~4.6.4"
|
||||
"typescript": "~4.9.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/plugin-proposal-decorators": "7.14.5",
|
||||
|
||||
@@ -14,6 +14,12 @@ 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 |
|
||||
|
||||
@@ -14,7 +14,7 @@ if (!command) {
|
||||
}
|
||||
|
||||
if (command === 'install') {
|
||||
require('./install.js');
|
||||
require('./install');
|
||||
} else if (command === 'uninstall') {
|
||||
const { uninstall } = require('./uninstall');
|
||||
uninstall();
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
const path = require('path');
|
||||
const os = require('os');
|
||||
|
||||
const METEOR_LATEST_VERSION = '2.9.0';
|
||||
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);
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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,26 +23,30 @@ 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');
|
||||
const isInstalledGlobally = process.env.npm_config_global === 'true';
|
||||
} = require('./extract');
|
||||
const { engines } = require('./package.json');
|
||||
|
||||
const { engines } = require('./package');
|
||||
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`);
|
||||
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) {
|
||||
console.error('******************************************');
|
||||
console.error(
|
||||
@@ -54,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: ',
|
||||
@@ -170,8 +180,8 @@ function download() {
|
||||
override: true,
|
||||
fileName: tarGzName,
|
||||
httpsRequestOptions: {
|
||||
agent: generateProxyAgent()
|
||||
}
|
||||
agent: generateProxyAgent(),
|
||||
},
|
||||
});
|
||||
|
||||
dl.on('progress', ({ progress }) => {
|
||||
@@ -250,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
|
||||
@@ -279,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');
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "meteor",
|
||||
"version": "2.9.0",
|
||||
"version": "2.12.1",
|
||||
"description": "Install Meteor",
|
||||
"main": "install.js",
|
||||
"scripts": {
|
||||
|
||||
@@ -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,
|
||||
};
|
||||
|
||||
17
package.json
17
package.json
@@ -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"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
1
packages/accounts-2fa/.npm/package/.gitignore
vendored
Normal file
1
packages/accounts-2fa/.npm/package/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
node_modules
|
||||
7
packages/accounts-2fa/.npm/package/README
Normal file
7
packages/accounts-2fa/.npm/package/README
Normal 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.
|
||||
40
packages/accounts-2fa/.npm/package/npm-shrinkwrap.json
generated
Normal file
40
packages/accounts-2fa/.npm/package/npm-shrinkwrap.json
generated
Normal 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=="
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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',
|
||||
});
|
||||
|
||||
51
packages/accounts-base/accounts-base.d.ts
vendored
51
packages/accounts-base/accounts-base.d.ts
vendored
@@ -1,5 +1,6 @@
|
||||
import { Mongo } from 'meteor/mongo';
|
||||
import { Meteor } from 'meteor/meteor';
|
||||
import { Configuration } from 'meteor/service-configuration';
|
||||
|
||||
export interface URLS {
|
||||
resetPassword: (token: string) => string;
|
||||
@@ -21,6 +22,10 @@ export namespace Accounts {
|
||||
fields?: Mongo.FieldSpecifier | undefined;
|
||||
}): Meteor.User | null;
|
||||
|
||||
function userAsync(options?: {
|
||||
fields?: Mongo.FieldSpecifier | undefined;
|
||||
}): Promise<Meteor.User | null>;
|
||||
|
||||
function userId(): string | null;
|
||||
|
||||
function createUser(
|
||||
@@ -28,11 +33,21 @@ export namespace Accounts {
|
||||
username?: string | undefined;
|
||||
email?: string | undefined;
|
||||
password?: string | undefined;
|
||||
profile?: Object | 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;
|
||||
@@ -57,6 +72,8 @@ export namespace Accounts {
|
||||
stop: () => void;
|
||||
};
|
||||
|
||||
var loginServiceConfiguration: Mongo.Collection<Configuration>
|
||||
|
||||
function loginServicesConfigured(): boolean;
|
||||
|
||||
function onPageLoadLogin(func: Function): void;
|
||||
@@ -103,12 +120,16 @@ export namespace Accounts {
|
||||
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?: Object | undefined;
|
||||
requestOfflineToken?: Object | undefined;
|
||||
forceApprovalPrompt?: Object | undefined;
|
||||
passwordSignupFields?: string | undefined;
|
||||
requestPermissions?: Record<string, string[]> | undefined;
|
||||
requestOfflineToken?: Record<'google', boolean> | undefined;
|
||||
forceApprovalPrompt?: Record<'google', boolean> | undefined;
|
||||
passwordSignupFields?: PasswordSignupField | PasswordSignupField[] | undefined;
|
||||
passwordlessSignupFields?: PasswordlessSignupField | PasswordlessSignupField[] | undefined;
|
||||
}): void;
|
||||
};
|
||||
}
|
||||
@@ -173,9 +194,15 @@ export namespace Accounts {
|
||||
function setPassword(
|
||||
userId: string,
|
||||
newPassword: string,
|
||||
options?: { logout?: Object | undefined }
|
||||
options?: { logout?: boolean | undefined }
|
||||
): void;
|
||||
|
||||
function setPasswordAsync(
|
||||
userId: string,
|
||||
newPassword: string,
|
||||
options?: { logout?: boolean | undefined }
|
||||
): Promise<void>;
|
||||
|
||||
function validateNewUser(func: Function): boolean;
|
||||
|
||||
function validateLoginAttempt(
|
||||
@@ -264,6 +291,13 @@ export namespace Accounts {
|
||||
* */
|
||||
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.
|
||||
@@ -279,9 +313,12 @@ export namespace Accounts {
|
||||
* - `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 | Object
|
||||
handler: (options: any) => undefined | LoginMethodResult
|
||||
): void;
|
||||
|
||||
type Password =
|
||||
|
||||
@@ -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({
|
||||
@@ -81,6 +81,29 @@ export class AccountsCommon {
|
||||
this.LoginCancelledError.numericError = 0x8acdc2f;
|
||||
}
|
||||
|
||||
_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"');
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary Get the current user id, or `null` if no user is logged in. A reactive data source.
|
||||
* @locus Anywhere
|
||||
@@ -172,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).
|
||||
@@ -198,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.
|
||||
*/
|
||||
@@ -251,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);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -26,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.
|
||||
@@ -190,7 +190,7 @@ export class AccountsServer extends AccountsCommon {
|
||||
throw new Error("Can only call onCreateUser once");
|
||||
}
|
||||
|
||||
this._onCreateUserHook = func;
|
||||
this._onCreateUserHook = Meteor.wrapFn(func);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -564,7 +564,7 @@ export class AccountsServer extends AccountsCommon {
|
||||
|
||||
this._loginHandlers.push({
|
||||
name: name,
|
||||
handler: handler
|
||||
handler: Meteor.wrapFn(handler)
|
||||
});
|
||||
};
|
||||
|
||||
@@ -761,11 +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", () => {
|
||||
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
|
||||
|
||||
@@ -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';
|
||||
@@ -795,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 => {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
Package.describe({
|
||||
summary: 'A user account system',
|
||||
version: '2.2.6',
|
||||
version: '2.2.8',
|
||||
});
|
||||
|
||||
Package.onUse(api => {
|
||||
|
||||
1
packages/accounts-password/.npm/package/.gitignore
vendored
Normal file
1
packages/accounts-password/.npm/package/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
node_modules
|
||||
7
packages/accounts-password/.npm/package/README
Normal file
7
packages/accounts-password/.npm/package/README
Normal 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.
|
||||
311
packages/accounts-password/.npm/package/npm-shrinkwrap.json
generated
Normal file
311
packages/accounts-password/.npm/package/npm-shrinkwrap.json
generated
Normal 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=="
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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.2',
|
||||
version: '2.3.4',
|
||||
});
|
||||
|
||||
Npm.depends({
|
||||
|
||||
@@ -142,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);
|
||||
}
|
||||
|
||||
@@ -201,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.
|
||||
@@ -209,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);
|
||||
}
|
||||
|
||||
@@ -234,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.
|
||||
|
||||
@@ -687,6 +687,17 @@ Meteor.methods({resetPassword: async 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};
|
||||
}
|
||||
);
|
||||
@@ -778,6 +789,17 @@ Meteor.methods({verifyEmail: async 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};
|
||||
}
|
||||
);
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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 => {
|
||||
|
||||
208
packages/babel-compiler/.npm/package/npm-shrinkwrap.json
generated
208
packages/babel-compiler/.npm/package/npm-shrinkwrap.json
generated
@@ -12,26 +12,26 @@
|
||||
"integrity": "sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q=="
|
||||
},
|
||||
"@babel/compat-data": {
|
||||
"version": "7.20.5",
|
||||
"resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.20.5.tgz",
|
||||
"integrity": "sha512-KZXo2t10+/jxmkhNXc7pZTqRvSOIvVv/+lJwHS+B2rErwOyjuVRh60yVpb7liQ1U5t7lLJ1bz+t8tSypUZdm0g=="
|
||||
"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.20.5",
|
||||
"resolved": "https://registry.npmjs.org/@babel/core/-/core-7.20.5.tgz",
|
||||
"integrity": "sha512-UdOWmk4pNWTm/4DlPUl/Pt4Gz4rcEMb7CY0Y3eJl5Yz1vI8ZJGmHWaVE55LoxRjdpx0z259GE9U5STA9atUinQ==",
|
||||
"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.20.5",
|
||||
"resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.20.5.tgz",
|
||||
"integrity": "sha512-jl7JY2Ykn9S0yj4DQP82sYvPU+T3g0HFcWTqDLqiuA9tGRNIj9VfbtXGAYTTkyNEnQk1jkMGOdYka8aG/lulCA==",
|
||||
"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",
|
||||
@@ -51,14 +51,14 @@
|
||||
"integrity": "sha512-yFQ0YCHoIqarl8BCRwBL8ulYUaZpz3bNsA7oFepAzee+8/+ImtADXNOmO5vJvsPff3qi+hvpkY/NYBTrBQgdNw=="
|
||||
},
|
||||
"@babel/helper-compilation-targets": {
|
||||
"version": "7.20.0",
|
||||
"resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.20.0.tgz",
|
||||
"integrity": "sha512-0jp//vDGp9e8hZzBc6N/KwA5ZK3Wsm/pfm4CrY7vzegkVxc65SgSn6wYOnwHe9Js9HRQ1YTCKLGPzDtaS3RoLQ=="
|
||||
"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.20.5",
|
||||
"resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.20.5.tgz",
|
||||
"integrity": "sha512-3RCdA/EmEaikrhayahwToF0fpweU/8o2p8vhc1c/1kftHOdTKuC65kik/TLc+qfbS8JKw4qqJbne4ovICDhmww=="
|
||||
"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.20.5",
|
||||
@@ -91,9 +91,9 @@
|
||||
"integrity": "sha512-UlJQPkFqFULIcyW5sbzgbkxn2FKRgwWiRexcuaR8RNJRy8+LLveqPjwZV/bwrLZCN0eUHD/x8D0heK1ozuoo6Q=="
|
||||
},
|
||||
"@babel/helper-member-expression-to-functions": {
|
||||
"version": "7.18.9",
|
||||
"resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.18.9.tgz",
|
||||
"integrity": "sha512-RxifAh2ZoVU67PyKIO4AMi1wTenGfMR/O/ae0CCRqwgBAt5v7xjdtRw7UoSbsreKrQn5t7r89eruK/9JjYHuDg=="
|
||||
"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.20.2",
|
||||
"resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.20.2.tgz",
|
||||
"integrity": "sha512-zvBKyJXRbmK07XhMuujYoJ48B5yvvmM6+wcpv6Ivj4Yg6qO7NOZOSnvZN9CRl1zz1Z4cKf8YejmCMh8clOoOeA=="
|
||||
"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",
|
||||
@@ -121,9 +121,9 @@
|
||||
"integrity": "sha512-dI7q50YKd8BAv3VEfgg7PS7yD3Rtbi2J1XMXaalXO0W0164hYLnh8zpjRS0mte9MfVp/tltvr/cfdXPvJr1opA=="
|
||||
},
|
||||
"@babel/helper-replace-supers": {
|
||||
"version": "7.19.1",
|
||||
"resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.19.1.tgz",
|
||||
"integrity": "sha512-T7ahH7wV0Hfs46SFh5Jz3s0B6+o8g3c+7TMxu7xKfmHikg7EAZ3I2Qk9LFhjxXq8sL7UkP5JflezNwoZa8WvWw=="
|
||||
"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.20.2",
|
||||
@@ -161,9 +161,9 @@
|
||||
"integrity": "sha512-bYMxIWK5mh+TgXGVqAtnu5Yn1un+v8DDZtqyzKRLUzrh70Eal2O3aZ7aPYiMADO4uKlkzOiRiZ6GX5q3qxvW9Q=="
|
||||
},
|
||||
"@babel/helpers": {
|
||||
"version": "7.20.6",
|
||||
"resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.20.6.tgz",
|
||||
"integrity": "sha512-Pf/OjgfgFRW5bApskEz5pvidpim7tEDPlFtKcNRXWmfHGn9IEI2W2flqRQXTFb7gIPTyK++N6rVHuwKut4XK6w=="
|
||||
"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",
|
||||
@@ -171,14 +171,14 @@
|
||||
"integrity": "sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g=="
|
||||
},
|
||||
"@babel/parser": {
|
||||
"version": "7.20.5",
|
||||
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.20.5.tgz",
|
||||
"integrity": "sha512-r27t/cy/m9uKLXQNWWebeCUHgnAZq0CpG1OwKRxzJMP1vpSU4bSIK2hq+/cp0bQxetkXx38n09rNu8jVkcK/zA=="
|
||||
"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.20.1",
|
||||
"resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.20.1.tgz",
|
||||
"integrity": "sha512-Gh5rchzSwE4kC+o/6T8waD0WHEQIsDmjltY8WnWRXHUdH8axZhuH86Ov9M72YhJfDrZseQwuuWaaIT/TmePp3g=="
|
||||
"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",
|
||||
@@ -186,9 +186,9 @@
|
||||
"integrity": "sha512-cumfXOF0+nzZrrN8Rf0t7M+tF6sZc7vhQwYQck9q1/5w2OExlD+b4v4RpMJFaV1Z7WcDRgO6FqvxqxGlwo+RHQ=="
|
||||
},
|
||||
"@babel/plugin-proposal-logical-assignment-operators": {
|
||||
"version": "7.18.9",
|
||||
"resolved": "https://registry.npmjs.org/@babel/plugin-proposal-logical-assignment-operators/-/plugin-proposal-logical-assignment-operators-7.18.9.tgz",
|
||||
"integrity": "sha512-128YbMpjCrP35IOExw2Fq+x55LMP42DzhOhX2aNNIdI9avSWl2PI0yuBWarr3RYpZBSPtabfadkH2yeRiMD61Q=="
|
||||
"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",
|
||||
@@ -196,9 +196,9 @@
|
||||
"integrity": "sha512-wQxQzxYeJqHcfppzBDnm1yAY0jSRkUXR2z8RePZYrKwMKgMlE8+Z6LUno+bd6LvbGh8Gltvy74+9pIYkr+XkKA=="
|
||||
},
|
||||
"@babel/plugin-proposal-object-rest-spread": {
|
||||
"version": "7.20.2",
|
||||
"resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.20.2.tgz",
|
||||
"integrity": "sha512-Ks6uej9WFK+fvIMesSqbAto5dD8Dz4VuuFvGJFKgIGSkJuRGcrwGECPA1fDgQK3/DbExBJpEkTeYeB8geIFCSQ=="
|
||||
"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",
|
||||
@@ -206,9 +206,9 @@
|
||||
"integrity": "sha512-Q40HEhs9DJQyaZfUjjn6vE8Cv4GmMHCYuMGIWUnlxH6400VGxOuwWsPt4FxXxJkC/5eOzgn0z21M9gMT4MOhbw=="
|
||||
},
|
||||
"@babel/plugin-proposal-optional-chaining": {
|
||||
"version": "7.18.9",
|
||||
"resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.18.9.tgz",
|
||||
"integrity": "sha512-v5nwt4IqBXihxGsW2QmCWMDS3B3bzGIk/EQVZz2ei7f3NJl8NzAJVvUmpDW5q1CRNY+Beb/k58UAH1Km1N411w=="
|
||||
"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",
|
||||
@@ -256,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",
|
||||
@@ -271,24 +271,24 @@
|
||||
"integrity": "sha512-ExUcOqpPWnliRcPqves5HJcJOvHvIIWfuS4sroBUenPuMdmW+SMHDakmtS7qOo13sVppmUijqeTv7qqGsvURpQ=="
|
||||
},
|
||||
"@babel/plugin-transform-block-scoping": {
|
||||
"version": "7.20.5",
|
||||
"resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.20.5.tgz",
|
||||
"integrity": "sha512-WvpEIW9Cbj9ApF3yJCjIEEf1EiNJLtXagOrL5LNWEZOo3jv8pmPoYTSNJQvqej8OavVlgOoOPw6/htGZro6IkA=="
|
||||
"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.20.2",
|
||||
"resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.20.2.tgz",
|
||||
"integrity": "sha512-9rbPp0lCVVoagvtEyQKSo5L8oo0nQS/iif+lwlAz29MccX2642vWDlSZK+2T2buxbopotId2ld7zZAzRfz9j1g=="
|
||||
"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.9",
|
||||
"resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.18.9.tgz",
|
||||
"integrity": "sha512-+i0ZU1bCDymKakLxn5srGHrsAPRELC2WIbzwjLhHW9SIE1cPYkLCL0NlnXMZaM1vhfgA2+M7hySk42VBvrkBRw=="
|
||||
"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.20.2",
|
||||
"resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.20.2.tgz",
|
||||
"integrity": "sha512-mENM+ZHrvEgxLTBXUiQ621rRXZes3KWUv6NdQlrnr1TkWVw+hUjQBZuP2X32qKlrlG2BzgR95gkuCRSkJl8vIw=="
|
||||
"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",
|
||||
@@ -306,9 +306,9 @@
|
||||
"integrity": "sha512-IFQDSRoTPnrAIrI5zoZv73IFeZu2dhu6irxQjY9rNjTT53VmKg9fenjvoiOWOkJ6mm4jKVPtdMzBY98Fp4Z4cg=="
|
||||
},
|
||||
"@babel/plugin-transform-modules-commonjs": {
|
||||
"version": "7.19.6",
|
||||
"resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.19.6.tgz",
|
||||
"integrity": "sha512-8PIa1ym4XRTKuSsOUXqDG0YaOlEuTVvHMe5JCfgBMOtHvJKw/4NGovEGN33viISshG/rZNVrACiBmPQLvWN8xQ=="
|
||||
"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",
|
||||
@@ -316,9 +316,9 @@
|
||||
"integrity": "sha512-uvGz6zk+pZoS1aTZrOvrbj6Pp/kK2mp45t2B+bTDre2UgsZZ8EZLSJtUg7m/no0zOJUWgFONpB7Zv9W2tSaFlA=="
|
||||
},
|
||||
"@babel/plugin-transform-parameters": {
|
||||
"version": "7.20.5",
|
||||
"resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.20.5.tgz",
|
||||
"integrity": "sha512-h7plkOmcndIUWXZFLgpbrh2+fXAi47zcUX7IrOQuZdLD0I0KvjJ6cvo3BEcAOsDOcZhVKGJqv07mkSqK0y2isQ=="
|
||||
"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",
|
||||
@@ -331,9 +331,9 @@
|
||||
"integrity": "sha512-TV4sQ+T013n61uMoygyMRm+xf04Bd5oqFpv2jAEQwSZ8NwQA7zeRPg1LMVg2PWi3zWBz+CLKD+v5bcpZ/BS0aA=="
|
||||
},
|
||||
"@babel/plugin-transform-react-jsx": {
|
||||
"version": "7.19.0",
|
||||
"resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.19.0.tgz",
|
||||
"integrity": "sha512-UVEvX3tXie3Szm3emi1+G63jyw1w5IcMY0FSKM+CRnKRI5Mr1YbCNgsSTwoTwKphQEG9P+QqmuRFneJPZuHNhg=="
|
||||
"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",
|
||||
@@ -361,9 +361,9 @@
|
||||
"integrity": "sha512-eCLXXJqv8okzg86ywZJbRn19YJHU4XUa55oz2wbHhaQVn/MM+XhukiT7SYqp/7o00dg52Rj51Ny+Ecw4oyoygw=="
|
||||
},
|
||||
"@babel/plugin-transform-spread": {
|
||||
"version": "7.19.0",
|
||||
"resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.19.0.tgz",
|
||||
"integrity": "sha512-RsuMk7j6n+r752EtzyScnWkQyuJdli6LdO5Klv8Yx0OfPVTcQkIUfS8clx5e9yHXzlnhOZF3CbQ8C2uP5j074w=="
|
||||
"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",
|
||||
@@ -396,19 +396,19 @@
|
||||
"integrity": "sha512-hzeyJyMA1YGdJTuWU0e/j4wKXrU4OMFvY2MSlaI9B7VQb0r5cxTE3EAIS2Q7Tn2RIcDkRvTA/v2JsAEhxe99uw=="
|
||||
},
|
||||
"@babel/template": {
|
||||
"version": "7.18.10",
|
||||
"resolved": "https://registry.npmjs.org/@babel/template/-/template-7.18.10.tgz",
|
||||
"integrity": "sha512-TI+rCtooWHr3QJ27kJxfjutghu44DLnasDMwpDqCXVTal9RLp3RSYNh4NdBrRP2cQAoG9A8juOQl6P6oZG4JxA=="
|
||||
"version": "7.20.7",
|
||||
"resolved": "https://registry.npmjs.org/@babel/template/-/template-7.20.7.tgz",
|
||||
"integrity": "sha512-8SegXApWe6VoNw0r9JHpSteLKTpTiLZ4rMlGIm9JQ18KiCtyQiAMEazujAHrUS5flrcqYZa75ukev3P6QmUwUw=="
|
||||
},
|
||||
"@babel/traverse": {
|
||||
"version": "7.20.5",
|
||||
"resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.20.5.tgz",
|
||||
"integrity": "sha512-WM5ZNN3JITQIq9tFZaw1ojLU3WgWdtkxnhM1AegMS+PvHjkM5IXjmYEGY7yukz5XS4sJyEf2VzWjI8uAavhxBQ=="
|
||||
"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.20.5",
|
||||
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.20.5.tgz",
|
||||
"integrity": "sha512-c9fst/h2/dcF7H+MJKZ2T0KjEQ8hY/BNnDk/H3XY8C4Aw/eWQXWn/lWntHF9ooUBnGmEvbfGrTgLWc+um0YDUg=="
|
||||
"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",
|
||||
@@ -436,9 +436,9 @@
|
||||
"integrity": "sha512-MCNzAp77qzKca9+W/+I0+sEpaUnZoeasnghNeVc41VZCEKaCH73Vq3BZZ/SzWIgrqE4H4ceI+p+b6C0mHf9T4g=="
|
||||
},
|
||||
"@meteorjs/babel": {
|
||||
"version": "7.17.2-beta.0",
|
||||
"resolved": "https://registry.npmjs.org/@meteorjs/babel/-/babel-7.17.2-beta.0.tgz",
|
||||
"integrity": "sha512-gFXgGNIUu2mVvLRTtEPRE8OdpbdwDY2+vAOSn4/O//w42n7xKBDuYkiyNQtXCWIVuEjO4UBFkX2CHD88eTKhxA=="
|
||||
"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",
|
||||
@@ -648,9 +648,9 @@
|
||||
"integrity": "sha512-CBHJJdDmgjl3daYjN5Cp5kbTf1mUhZoS+beLklHIvkOWscs83YAhLlF3Wsh/lciQYAcbBJgTOD44VtG31ZM4Hw=="
|
||||
},
|
||||
"caniuse-lite": {
|
||||
"version": "1.0.30001436",
|
||||
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001436.tgz",
|
||||
"integrity": "sha512-ZmWkKsnC2ifEPoWUvSAIGyOYwT+keAaaWPHiQ9DfMqS1t6tfuyFYoWR78TeZtznkEQ64+vGXH9cZrElwR2Mrxg=="
|
||||
"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,9 +673,9 @@
|
||||
"integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A=="
|
||||
},
|
||||
"core-js-compat": {
|
||||
"version": "3.26.1",
|
||||
"resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.26.1.tgz",
|
||||
"integrity": "sha512-622/KzTudvXCDLRw70iHW4KKs1aGpcRcowGWyYJr2DEBfRrd6hNJybxSWJFuZYD4ma86xhrwDDHxmDaIq4EA8A=="
|
||||
"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",
|
||||
@@ -767,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",
|
||||
@@ -788,9 +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=="
|
||||
"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",
|
||||
@@ -880,9 +885,9 @@
|
||||
"integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog=="
|
||||
},
|
||||
"typescript": {
|
||||
"version": "4.6.4",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.6.4.tgz",
|
||||
"integrity": "sha512-9ia/jWHIEbo49HfjrLGfKbZSuWo9iTMwXO+Ca3pRsSpbsMbc7/IU8NKdCZVRRBafVPGnoJeFL76ZOAA84I9fEg=="
|
||||
"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",
|
||||
@@ -908,6 +913,11 @@
|
||||
"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=="
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -26,7 +26,7 @@ Babel = {
|
||||
return getMeteorBabel().compile(
|
||||
source,
|
||||
babelOptions || getDefaultOptions(),
|
||||
cacheOptions,
|
||||
cacheOptions
|
||||
);
|
||||
},
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
Package.describe({
|
||||
name: "babel-compiler",
|
||||
summary: "Parser/transpiler for ECMAScript 2015+ syntax",
|
||||
version: '7.10.1'
|
||||
version: '7.10.4',
|
||||
});
|
||||
|
||||
Npm.depends({
|
||||
'@meteorjs/babel': '7.17.2-beta.0',
|
||||
'@meteorjs/babel': '7.18.0-beta.6',
|
||||
'json5': '2.1.1'
|
||||
});
|
||||
|
||||
|
||||
@@ -2,19 +2,9 @@
|
||||
"lockfileVersion": 1,
|
||||
"dependencies": {
|
||||
"parse5": {
|
||||
"version": "3.0.2",
|
||||
"resolved": "https://registry.npmjs.org/parse5/-/parse5-3.0.2.tgz",
|
||||
"integrity": "sha1-Be/1fw70V3+xRKefi5qWemzERRA="
|
||||
},
|
||||
"promise-polyfill": {
|
||||
"version": "1.1.6",
|
||||
"resolved": "https://registry.npmjs.org/promise-polyfill/-/promise-polyfill-1.1.6.tgz",
|
||||
"integrity": "sha1-zQTv9G9clcOn0EVZHXm14+AfEtc="
|
||||
},
|
||||
"stream-to-string": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/stream-to-string/-/stream-to-string-1.1.0.tgz",
|
||||
"integrity": "sha1-OSELATF+ars16FRTjgEwN7ajWUA="
|
||||
"version": "6.0.1",
|
||||
"resolved": "https://registry.npmjs.org/parse5/-/parse5-6.0.1.tgz",
|
||||
"integrity": "sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw=="
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,13 +2,12 @@ Package.describe({
|
||||
// These tests are in a separate package so that we can Npm.depend on
|
||||
// parse5, a html parsing library.
|
||||
summary: "Tests for the boilerplate-generator package",
|
||||
version: '1.5.0',
|
||||
version: '1.5.1',
|
||||
documentation: null
|
||||
});
|
||||
|
||||
Npm.depends({
|
||||
parse5: '3.0.2',
|
||||
'stream-to-string': '1.1.0'
|
||||
parse5: '6.0.1'
|
||||
});
|
||||
|
||||
Package.onTest(function (api) {
|
||||
|
||||
@@ -1,4 +1,11 @@
|
||||
import streamToString from "stream-to-string";
|
||||
function streamToString (stream) {
|
||||
const chunks = [];
|
||||
return new Promise((resolve, reject) => {
|
||||
stream.on('data', (chunk) => chunks.push(Buffer.from(chunk)));
|
||||
stream.on('error', (err) => reject(err));
|
||||
stream.on('end', () => resolve(Buffer.concat(chunks).toString('utf8')));
|
||||
})
|
||||
}
|
||||
|
||||
export async function generateHTMLForArch(arch, includeHead) {
|
||||
// Use a dummy manifest. None of these paths will be read from the filesystem, but css / js should be handled differently
|
||||
|
||||
@@ -50,7 +50,7 @@ var keywords = {
|
||||
// If false, we set the X-Content-Type-Options header to 'nosniff'.
|
||||
var contentSniffingAllowed = false;
|
||||
|
||||
const BrowserPolicy = require("meteor/browser-policy-common").BrowserPolicy;
|
||||
var BrowserPolicy = require("meteor/browser-policy-common").BrowserPolicy;
|
||||
BrowserPolicy.content = {};
|
||||
|
||||
var parseCsp = function (csp) {
|
||||
@@ -260,12 +260,12 @@ var resources = [
|
||||
{ methodResource: "Frame", directive: "frame-src" },
|
||||
{ methodResource: "FrameAncestors", directive: "frame-ancestors" }
|
||||
];
|
||||
_.each(resources,
function (resource) {
|
||||
var directive = resource.directive;
|
||||
var methodResource = resource.methodResource;
|
||||
_.each(resources, function (resource) {
|
||||
var directive = resource.directive;
|
||||
var methodResource = resource.methodResource;
|
||||
var allowMethodName = "allow" + methodResource + "Origin";
|
||||
var disallowMethodName = "disallow" + methodResource;
|
||||
var allowDataMethodName = "allow" + methodResource + "DataUrl";
|
||||
var allowDataMethodName = "allow" + methodResource + "DataUrl";
|
||||
var allowBlobMethodName = "allow" + methodResource + "BlobUrl";
|
||||
var allowSelfMethodName = "allow" + methodResource + "SameOrigin";
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
Package.describe({
|
||||
summary: "Configure content security policies",
|
||||
version: "1.1.1"
|
||||
version: "1.1.2"
|
||||
});
|
||||
|
||||
Package.onUse(function (api) {
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
var defaultXFrameOptions = "SAMEORIGIN";
|
||||
var xFrameOptions = defaultXFrameOptions;
|
||||
|
||||
const BrowserPolicy = require("meteor/browser-policy-common").BrowserPolicy;
|
||||
var BrowserPolicy = require("meteor/browser-policy-common").BrowserPolicy;
|
||||
BrowserPolicy.framing = {};
|
||||
|
||||
Object.assign(BrowserPolicy.framing, {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
Package.describe({
|
||||
summary: "Restrict which websites can frame your app",
|
||||
version: '1.1.1'
|
||||
version: '1.1.2'
|
||||
});
|
||||
|
||||
Package.onUse(function (api) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
Package.describe({
|
||||
summary: "Configure security policies enforced by the browser",
|
||||
version: '1.1.1'
|
||||
version: '1.1.2'
|
||||
});
|
||||
|
||||
Package.onUse(function (api) {
|
||||
@@ -12,5 +12,5 @@ Package.onUse(function (api) {
|
||||
|
||||
Package.onTest(function (api) {
|
||||
api.use(["tinytest", "browser-policy", "ejson"], "server");
|
||||
api.addFiles("browser-policy-test.js", "server");
|
||||
api.addFiles("browser-policy-tests.js", "server");
|
||||
});
|
||||
|
||||
@@ -49,6 +49,11 @@ export class Hook {
|
||||
this.bindEnvironment = false;
|
||||
}
|
||||
|
||||
this.wrapAsync = true;
|
||||
if (options.wrapAsync === false) {
|
||||
this.wrapAsync = false;
|
||||
}
|
||||
|
||||
if (options.exceptionHandler) {
|
||||
this.exceptionHandler = options.exceptionHandler;
|
||||
} else if (options.debugPrintExceptions) {
|
||||
@@ -73,6 +78,10 @@ export class Hook {
|
||||
callback = dontBindEnvironment(callback, exceptionHandler);
|
||||
}
|
||||
|
||||
if (this.wrapAsync) {
|
||||
callback = Meteor.wrapFn(callback);
|
||||
}
|
||||
|
||||
const id = this.nextCallbackId++;
|
||||
this.callbacks[id] = callback;
|
||||
|
||||
@@ -84,6 +93,11 @@ export class Hook {
|
||||
};
|
||||
}
|
||||
|
||||
clear() {
|
||||
this.nextCallbackId = 0;
|
||||
this.callbacks = [];
|
||||
}
|
||||
|
||||
/**
|
||||
* For each registered callback, call the passed iterator function with the callback.
|
||||
*
|
||||
@@ -114,6 +128,28 @@ export class Hook {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* For each registered callback, call the passed iterator function with the callback.
|
||||
*
|
||||
* it is a counterpart of forEach, but it is async and returns a promise
|
||||
* @param iterator
|
||||
* @return {Promise<void>}
|
||||
* @see forEach
|
||||
*/
|
||||
async forEachAsync(iterator) {
|
||||
const ids = Object.keys(this.callbacks);
|
||||
for (let i = 0; i < ids.length; ++i) {
|
||||
const id = ids[i];
|
||||
// check to see if the callback was removed during iteration
|
||||
if (hasOwn.call(this.callbacks, id)) {
|
||||
const callback = this.callbacks[id];
|
||||
if (!await iterator(callback)) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated use forEach
|
||||
* @param iterator
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
Package.describe({
|
||||
summary: "Register callbacks on a hook",
|
||||
version: '1.4.0'
|
||||
version: '1.5.1'
|
||||
});
|
||||
|
||||
Package.onUse(function (api) {
|
||||
|
||||
@@ -1,15 +1,9 @@
|
||||
const {
|
||||
Slot,
|
||||
bind,
|
||||
noContext,
|
||||
setTimeout,
|
||||
asyncFromGen,
|
||||
} = require("@wry/context");
|
||||
const context = require("@wry/context");
|
||||
|
||||
Object.assign(exports, {
|
||||
Slot,
|
||||
bind,
|
||||
noContext,
|
||||
setTimeout,
|
||||
asyncFromGen,
|
||||
Slot: context.Slot,
|
||||
bind: context.bind,
|
||||
noContext: context.noContext,
|
||||
setTimeout: context.setTimeout,
|
||||
asyncFromGen: context.asyncFromGen,
|
||||
});
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
Package.describe({
|
||||
name: "context",
|
||||
version: "0.5.0",
|
||||
version: "0.5.1",
|
||||
summary: "Manage contextual information without passing objects around",
|
||||
documentation: "README.md"
|
||||
});
|
||||
|
||||
@@ -10,14 +10,29 @@ let errorMessage = (rateLimitResult) => {
|
||||
'trying again.';
|
||||
};
|
||||
|
||||
// Store rule specific error messages.
|
||||
const errorMessageByRule = new Map();
|
||||
|
||||
const rateLimiter = new RateLimiter();
|
||||
|
||||
DDPRateLimiter.getErrorMessage = (rateLimitResult) => {
|
||||
// If there is a specific error message for this rule, use it.
|
||||
if (errorMessageByRule.has(rateLimitResult.ruleId)) {
|
||||
const message = errorMessageByRule.get(rateLimitResult.ruleId);
|
||||
// if it's a function, we need to call it
|
||||
if (typeof message === 'function') {
|
||||
// call the function with the rateLimitResult
|
||||
return message(rateLimitResult);
|
||||
}
|
||||
// otherwise, just return the string
|
||||
return message;
|
||||
}
|
||||
|
||||
// Otherwise, use the default error message.
|
||||
if (typeof errorMessage === 'function') {
|
||||
return errorMessage(rateLimitResult);
|
||||
} else {
|
||||
return errorMessage;
|
||||
}
|
||||
return errorMessage;
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -33,6 +48,20 @@ DDPRateLimiter.setErrorMessage = (message) => {
|
||||
errorMessage = message;
|
||||
};
|
||||
|
||||
/**
|
||||
* @summary Set error message text when method or subscription rate limit
|
||||
* exceeded for a specific rule.
|
||||
* @param {string} ruleId The ruleId returned from `addRule`
|
||||
* @param {string|function} message Functions are passed in an object with a
|
||||
* `timeToReset` field that specifies the number of milliseconds until the next
|
||||
* method or subscription is allowed to run. The function must return a string
|
||||
* of the error message.
|
||||
* @locus Server
|
||||
*/
|
||||
DDPRateLimiter.setErrorMessageOnRule = (ruleId, message) => {
|
||||
errorMessageByRule.set(ruleId, message);
|
||||
};
|
||||
|
||||
/**
|
||||
* @summary
|
||||
* Add a rule that matches against a stream of events describing method or
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
Package.describe({
|
||||
name: 'ddp-rate-limiter',
|
||||
version: '1.1.1',
|
||||
version: '1.2.0',
|
||||
// Brief, one-line summary of the package.
|
||||
summary: 'The DDPRateLimiter allows users to add rate limits to DDP' +
|
||||
' methods and subscriptions.',
|
||||
|
||||
24
packages/ddp-server/.npm/package/npm-shrinkwrap.json
generated
24
packages/ddp-server/.npm/package/npm-shrinkwrap.json
generated
@@ -2,14 +2,14 @@
|
||||
"lockfileVersion": 1,
|
||||
"dependencies": {
|
||||
"faye-websocket": {
|
||||
"version": "0.11.3",
|
||||
"resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.11.3.tgz",
|
||||
"integrity": "sha512-D2y4bovYpzziGgbHYtGCMjlJM36vAl/y+xUyn1C+FVx8szd1E+86KwVw6XvYSzOP8iMpm1X0I4xJD+QtUb36OA=="
|
||||
"version": "0.11.4",
|
||||
"resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.11.4.tgz",
|
||||
"integrity": "sha512-CzbClwlXAuiRQAlUyfqPgvPoNKTckTPGfwZV4ZdAhVcP2lh9KUxJg2b5GkE7XbjKQ3YJnQ9z6D9ntLAlB+tP8g=="
|
||||
},
|
||||
"http-parser-js": {
|
||||
"version": "0.5.3",
|
||||
"resolved": "https://registry.npmjs.org/http-parser-js/-/http-parser-js-0.5.3.tgz",
|
||||
"integrity": "sha512-t7hjvef/5HEK7RWTdUzVUhl8zkEu+LlaE0IYzdMuvbSDipxBRpOn4Uhw8ZyECEa808iVT8XCjzo6xmYt4CiLZg=="
|
||||
"version": "0.5.8",
|
||||
"resolved": "https://registry.npmjs.org/http-parser-js/-/http-parser-js-0.5.8.tgz",
|
||||
"integrity": "sha512-SGeBX54F94Wgu5RH3X5jsDtf4eHyRogWX1XGT3b4HuW3tQPM4AaBzoUji/4AAJNXCEOWZ5O0DgZmJw1947gD5Q=="
|
||||
},
|
||||
"permessage-deflate": {
|
||||
"version": "0.1.7",
|
||||
@@ -22,14 +22,14 @@
|
||||
"integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ=="
|
||||
},
|
||||
"sockjs": {
|
||||
"version": "0.3.21",
|
||||
"resolved": "https://registry.npmjs.org/sockjs/-/sockjs-0.3.21.tgz",
|
||||
"integrity": "sha512-DhbPFGpxjc6Z3I+uX07Id5ZO2XwYsWOrYjaSeieES78cq+JaJvVe5q/m1uvjIQhXinhIeCFRH6JgXe+mvVMyXw=="
|
||||
"version": "0.3.24",
|
||||
"resolved": "https://registry.npmjs.org/sockjs/-/sockjs-0.3.24.tgz",
|
||||
"integrity": "sha512-GJgLTZ7vYb/JtPSSZ10hsOYIvEYsjbNU+zPdIHcUaWVNUEPivzxku31865sSSud0Da0W4lEeOPlmw93zLQchuQ=="
|
||||
},
|
||||
"uuid": {
|
||||
"version": "3.4.0",
|
||||
"resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz",
|
||||
"integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A=="
|
||||
"version": "8.3.2",
|
||||
"resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz",
|
||||
"integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg=="
|
||||
},
|
||||
"websocket-driver": {
|
||||
"version": "0.7.4",
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
Package.describe({
|
||||
summary: "Meteor's latency-compensated distributed data server",
|
||||
version: '2.6.0',
|
||||
version: '2.6.1',
|
||||
documentation: null
|
||||
});
|
||||
|
||||
Npm.depends({
|
||||
"permessage-deflate": "0.1.7",
|
||||
sockjs: "0.3.21"
|
||||
sockjs: "0.3.24"
|
||||
});
|
||||
|
||||
Package.onUse(function (api) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
Package.describe({
|
||||
version: '0.1.1',
|
||||
version: '0.1.2',
|
||||
summary: 'Show build errors in client when using HMR',
|
||||
documentation: 'README.md',
|
||||
devOnly: true
|
||||
@@ -7,7 +7,7 @@ Package.describe({
|
||||
|
||||
Package.onUse(function (api) {
|
||||
api.use([
|
||||
'modules'
|
||||
'ecmascript'
|
||||
]);
|
||||
api.export('DevErrorOverlay', 'client');
|
||||
api.addFiles('client.js', 'modern');
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
// modules, for use in client.js and cache.js.
|
||||
var versions = __DYNAMIC_VERSIONS__;
|
||||
|
||||
const METEOR_PREFIX = '/node_modules/meteor/';
|
||||
var METEOR_PREFIX = '/node_modules/meteor/';
|
||||
|
||||
exports.get = function (id) {
|
||||
var tree = versions;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
Package.describe({
|
||||
name: "dynamic-import",
|
||||
version: "0.7.2",
|
||||
version: "0.7.3",
|
||||
summary: "Runtime support for Meteor 1.5 dynamic import(...) syntax",
|
||||
documentation: "README.md"
|
||||
});
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
Package.describe({
|
||||
name: "ecmascript-runtime",
|
||||
version: "0.8.0",
|
||||
version: '0.8.1',
|
||||
summary: "Polyfills for new ECMAScript 2015 APIs like Map and Set",
|
||||
git: "https://github.com/meteor/ecmascript-runtime",
|
||||
documentation: "README.md"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
Package.describe({
|
||||
name: 'ecmascript',
|
||||
version: '0.16.4',
|
||||
version: '0.16.7',
|
||||
summary: 'Compiler plugin that supports ES2015+ in all .js files',
|
||||
documentation: 'README.md',
|
||||
});
|
||||
@@ -40,5 +40,5 @@ Package.onTest(function(api) {
|
||||
api.addFiles('bare-test-file.js', ['client', 'server'], {
|
||||
bare: true,
|
||||
});
|
||||
api.addFiles('runtime-tests-client.js', ['client', 'web.browser.legacy']);
|
||||
api.addFiles('runtime-client-tests.js', ['client', 'web.browser.legacy']);
|
||||
});
|
||||
|
||||
10
packages/email/.npm/package/npm-shrinkwrap.json
generated
10
packages/email/.npm/package/npm-shrinkwrap.json
generated
@@ -1,6 +1,16 @@
|
||||
{
|
||||
"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/nodemailer": {
|
||||
"version": "6.4.7",
|
||||
"resolved": "https://registry.npmjs.org/@types/nodemailer/-/nodemailer-6.4.7.tgz",
|
||||
"integrity": "sha512-f5qCBGAn/f0qtRcd4SEn88c8Fp3Swct1731X4ryPKqS61/A3LmmzN8zaEz7hneJvpjFbUUgY7lru/B/7ODTazg=="
|
||||
},
|
||||
"nodemailer": {
|
||||
"version": "6.6.3",
|
||||
"resolved": "https://registry.npmjs.org/nodemailer/-/nodemailer-6.6.3.tgz",
|
||||
|
||||
29
packages/email/email.d.ts
vendored
29
packages/email/email.d.ts
vendored
@@ -1,23 +1,22 @@
|
||||
export namespace Email {
|
||||
interface EmailOptions {
|
||||
from?: string | undefined;
|
||||
to?: string | string[] | undefined;
|
||||
cc?: string | string[] | undefined;
|
||||
bcc?: string | string[] | undefined;
|
||||
replyTo?: string | string[] | undefined;
|
||||
subject?: string | undefined;
|
||||
text?: string | undefined;
|
||||
html?: string | undefined;
|
||||
headers?: Object | undefined;
|
||||
attachments?: Object[] | undefined;
|
||||
mailComposer?: MailComposer | undefined;
|
||||
}
|
||||
import { SendMailOptions } from 'nodemailer';
|
||||
|
||||
interface CustomEmailOptions extends EmailOptions {
|
||||
export namespace Email {
|
||||
/**
|
||||
* ExtraMailOptions is intentionally left empty here, but can be overridden in
|
||||
* your application if desired. This should not be necessary if you're using
|
||||
* the default mail transport, but if you're using a custom transport or have
|
||||
* configured hooks which accept additional options, you may need to define
|
||||
* this interface to match your custom options.
|
||||
*/
|
||||
interface ExtraMailOptions {}
|
||||
type EmailOptions = { mailComposer: MailComposer } | (ExtraMailOptions & SendMailOptions)
|
||||
|
||||
type CustomEmailOptions = EmailOptions & {
|
||||
packageSettings?: unknown;
|
||||
}
|
||||
|
||||
function send(options: EmailOptions): void;
|
||||
function sendAsync(options: EmailOptions): Promise<void>;
|
||||
function hookSend(fn: (options: EmailOptions) => boolean): void;
|
||||
function customTransport(fn: (options: CustomEmailOptions) => void): void;
|
||||
}
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
Package.describe({
|
||||
summary: 'Send email messages',
|
||||
version: '2.2.3',
|
||||
version: '2.2.5',
|
||||
});
|
||||
|
||||
Npm.depends({
|
||||
nodemailer: '6.6.3',
|
||||
'stream-buffers': '3.0.2',
|
||||
'@types/nodemailer': '6.4.7',
|
||||
});
|
||||
|
||||
Package.onUse(function(api) {
|
||||
|
||||
2
packages/fetch/fetch.d.ts
vendored
2
packages/fetch/fetch.d.ts
vendored
@@ -1,4 +1,4 @@
|
||||
export declare function fetch(): typeof globalThis.fetch;
|
||||
export declare var fetch: typeof globalThis.fetch;
|
||||
export declare var Headers: typeof globalThis.Headers;
|
||||
export declare var Request: typeof globalThis.Request;
|
||||
export declare var Response: typeof globalThis.Response;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
Package.describe({
|
||||
name: "fetch",
|
||||
version: '0.1.2',
|
||||
version: '0.1.3',
|
||||
summary: "Isomorphic modern/legacy/Node polyfill for WHATWG fetch()",
|
||||
documentation: "README.md"
|
||||
});
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user