backend-manager 3.2.159 → 3.2.161

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "backend-manager",
3
- "version": "3.2.159",
3
+ "version": "3.2.161",
4
4
  "description": "Quick tools for developing Firebase functions",
5
5
  "main": "src/manager/index.js",
6
6
  "bin": {
package/src/cli/cli.js CHANGED
@@ -1299,8 +1299,8 @@ async function cmd_configSet(self, newPath, newValue) {
1299
1299
  return reject();
1300
1300
  }
1301
1301
 
1302
- // Make sure it doesnt include space or special characters
1303
- if (newPath.match(/[^a-zA-Z0-9.]/)) {
1302
+ // Make sure it's only letters, numbers, periods, and underscores
1303
+ if (newPath.match(/[^a-zA-Z0-9._]/)) {
1304
1304
  console.log(chalk.red(`Path contains invalid characters: ${newPath}`));
1305
1305
  return reject();
1306
1306
  }
@@ -88,7 +88,7 @@ Module.prototype.main = function () {
88
88
 
89
89
  // Fix even more values
90
90
  payload.data.payload.layout = payload.data.payload.layout || 'app/blog/post';
91
- payload.data.payload.date = payload.data.payload.date || moment(now).format('YYYY-MM-DD');
91
+ payload.data.payload.date = moment(payload.data.payload.date || now).subtract(1, 'days').format('YYYY-MM-DD');
92
92
  payload.data.payload.id = payload.data.payload.id || Math.round(new Date(now).getTime() / 1000);
93
93
  payload.data.payload.path = `_posts/${moment(now).format('YYYY')}/${payload.data.payload.path || 'guest'}`;
94
94
  payload.data.payload.githubUser = payload.data.payload.githubUser || bemRepo.user;