@sprucelabs/data-stores 28.1.241 → 28.1.243

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.
@@ -101,7 +101,7 @@ If you are on a mac, using brew is recommended: https://brew.sh`;
101
101
  message = `An index was trying to be created that exists. Original error is:\n\n${(_g = (_e = options.friendlyMessage) !== null && _e !== void 0 ? _e : (_f = options.originalError) === null || _f === void 0 ? void 0 : _f.stack) !== null && _g !== void 0 ? _g : (_h = options.originalError) === null || _h === void 0 ? void 0 : _h.message}`;
102
102
  break;
103
103
  case 'INVALID_CONNECTION_STRING_SCHEME':
104
- message = `There is no database adapter setup for: ${options.connectionString.split('://')[0]}`;
104
+ message = `There is no database adapter setup for: ${options.connectionString.split('://')[0]}. You may need to install a plugin to support this database using env.DB_ADAPTER and 'yarn add ...'`;
105
105
  break;
106
106
  case 'NOT_IMPLEMENTED':
107
107
  message = 'A Not implemented just happened!';
@@ -96,7 +96,7 @@ If you are on a mac, using brew is recommended: https://brew.sh`;
96
96
  message = `An index was trying to be created that exists. Original error is:\n\n${(_g = (_e = options.friendlyMessage) !== null && _e !== void 0 ? _e : (_f = options.originalError) === null || _f === void 0 ? void 0 : _f.stack) !== null && _g !== void 0 ? _g : (_h = options.originalError) === null || _h === void 0 ? void 0 : _h.message}`;
97
97
  break;
98
98
  case 'INVALID_CONNECTION_STRING_SCHEME':
99
- message = `There is no database adapter setup for: ${options.connectionString.split('://')[0]}`;
99
+ message = `There is no database adapter setup for: ${options.connectionString.split('://')[0]}. You may need to install a plugin to support this database using env.DB_ADAPTER and 'yarn add ...'`;
100
100
  break;
101
101
  case 'NOT_IMPLEMENTED':
102
102
  message = 'A Not implemented just happened!';
@@ -1,6 +1,5 @@
1
- import { Schema } from '@sprucelabs/schema';
2
- import AbstractStore from '../stores/AbstractStore';
1
+ import { DataStore, DataStorePlugin } from '../types/stores.types';
3
2
  declare const storePluginAssert: {
4
- storeHasPlugin: (store: AbstractStore<Schema>, pluginName: string) => import("..").DataStorePlugin;
3
+ storeHasPlugin: (store: DataStore, pluginName: string) => DataStorePlugin;
5
4
  };
6
5
  export default storePluginAssert;
@@ -9,11 +9,11 @@ const storePluginAssert = {
9
9
  //@ts-ignore
10
10
  const { plugins } = store;
11
11
  if (!(plugins === null || plugins === void 0 ? void 0 : plugins.length)) {
12
- assert.fail(`The store you passed has no plugins. Add one to 'protected plugins: DataStorePlugin[] = [...]' or add it in the constructor of your store with 'this.plugins[...]'`);
12
+ assert.fail(`The store you passed has no plugins. Add one to 'protected plugins: DataStorePlugin[] = [...]' or add it in the constructor of your store with 'this.plugins.push(...)'`);
13
13
  }
14
14
  const plugin = plugins === null || plugins === void 0 ? void 0 : plugins.find((p) => p.getName() === pluginName);
15
15
  if ((plugin === null || plugin === void 0 ? void 0 : plugin.getName()) !== pluginName) {
16
- assert.fail(`I could not find the plugin '${pluginName}' in the store you passed. Make sure you added it to 'protected plugins: DataStorePlugin[] = [...]' or added it in the constructor of your store with 'this.plugins[...]'`);
16
+ assert.fail(`I could not find the plugin '${pluginName}' in the store you passed. Make sure you added it to 'protected plugins: DataStorePlugin[] = [...]' or added it in the constructor of your store with 'this.plugins.push(...)'`);
17
17
  }
18
18
  return plugin;
19
19
  },
@@ -1,6 +1,5 @@
1
- import { Schema } from '@sprucelabs/schema';
2
- import AbstractStore from '../stores/AbstractStore';
1
+ import { DataStore, DataStorePlugin } from '../types/stores.types';
3
2
  declare const storePluginAssert: {
4
- storeHasPlugin: (store: AbstractStore<Schema>, pluginName: string) => import("..").DataStorePlugin;
3
+ storeHasPlugin: (store: DataStore, pluginName: string) => DataStorePlugin;
5
4
  };
6
5
  export default storePluginAssert;
@@ -11,11 +11,11 @@ const storePluginAssert = {
11
11
  //@ts-ignore
12
12
  const { plugins } = store;
13
13
  if (!(plugins === null || plugins === void 0 ? void 0 : plugins.length)) {
14
- test_utils_1.assert.fail(`The store you passed has no plugins. Add one to 'protected plugins: DataStorePlugin[] = [...]' or add it in the constructor of your store with 'this.plugins[...]'`);
14
+ test_utils_1.assert.fail(`The store you passed has no plugins. Add one to 'protected plugins: DataStorePlugin[] = [...]' or add it in the constructor of your store with 'this.plugins.push(...)'`);
15
15
  }
16
16
  const plugin = plugins === null || plugins === void 0 ? void 0 : plugins.find((p) => p.getName() === pluginName);
17
17
  if ((plugin === null || plugin === void 0 ? void 0 : plugin.getName()) !== pluginName) {
18
- test_utils_1.assert.fail(`I could not find the plugin '${pluginName}' in the store you passed. Make sure you added it to 'protected plugins: DataStorePlugin[] = [...]' or added it in the constructor of your store with 'this.plugins[...]'`);
18
+ test_utils_1.assert.fail(`I could not find the plugin '${pluginName}' in the store you passed. Make sure you added it to 'protected plugins: DataStorePlugin[] = [...]' or added it in the constructor of your store with 'this.plugins.push(...)'`);
19
19
  }
20
20
  return plugin;
21
21
  },
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "28.1.241",
6
+ "version": "28.1.243",
7
7
  "files": [
8
8
  "build/**/*",
9
9
  "!build/__tests__",