@axium/server 0.4.4 → 0.4.6

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/dist/database.js CHANGED
@@ -164,7 +164,7 @@ export async function init(opt) {
164
164
  .catch(relationExists);
165
165
  opt.output('done');
166
166
  opt.output('start', 'Creating index for Account.userId');
167
- db.schema.createIndex('Account_userId_index').on('Account').column('userId').execute().catch(relationExists);
167
+ await db.schema.createIndex('Account_userId_index').on('Account').column('userId').execute().catch(relationExists);
168
168
  opt.output('done');
169
169
  opt.output('start', 'Creating table Session');
170
170
  await db.schema
@@ -177,7 +177,7 @@ export async function init(opt) {
177
177
  .catch(relationExists);
178
178
  opt.output('done');
179
179
  opt.output('start', 'Creating index for Session.userId');
180
- db.schema.createIndex('Session_userId_index').on('Session').column('userId').execute().catch(relationExists);
180
+ await db.schema.createIndex('Session_userId_index').on('Session').column('userId').execute().catch(relationExists);
181
181
  opt.output('done');
182
182
  opt.output('start', 'Creating table VerificationToken');
183
183
  await db.schema
@@ -203,7 +203,7 @@ export async function init(opt) {
203
203
  .catch(relationExists);
204
204
  opt.output('done');
205
205
  opt.output('start', 'Creating index for Authenticator.credentialID');
206
- db.schema.createIndex('Authenticator_credentialID_key').on('Authenticator').column('credentialID').execute().catch(relationExists);
206
+ await db.schema.createIndex('Authenticator_credentialID_key').on('Authenticator').column('credentialID').execute().catch(relationExists);
207
207
  opt.output('done');
208
208
  return config.db;
209
209
  }
package/dist/io.js CHANGED
@@ -93,10 +93,10 @@ export function defaultOutput(state, message = '') {
93
93
  console.log(message);
94
94
  break;
95
95
  case 'warn':
96
- process.stdout.write(styleText('yellow', message));
96
+ console.warn(styleText('yellow', message));
97
97
  break;
98
98
  case 'error':
99
- process.stdout.write(styleText('red', message));
99
+ console.error(styleText('red', message));
100
100
  break;
101
101
  case 'done':
102
102
  console.log('done.');
@@ -176,8 +176,10 @@ export function someWarnings(output, ...allowList) {
176
176
  return (error) => {
177
177
  error = typeof error == 'object' && 'message' in error ? error.message : error;
178
178
  for (const [pattern, message = error] of allowList) {
179
- if (pattern.test(error))
180
- output('warn', message);
179
+ if (!pattern.test(error))
180
+ continue;
181
+ output('warn', message);
182
+ return;
181
183
  }
182
184
  throw error;
183
185
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@axium/server",
3
- "version": "0.4.4",
3
+ "version": "0.4.6",
4
4
  "author": "James Prevett <axium@jamespre.dev> (https://jamespre.dev)",
5
5
  "funding": {
6
6
  "type": "individual",