s3db.js 8.0.2 → 8.0.3
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/s3db.cjs.js +12 -3
- package/dist/s3db.cjs.min.js +1 -1
- package/dist/s3db.es.js +12 -3
- package/dist/s3db.es.min.js +1 -1
- package/dist/s3db.iife.js +12 -3
- package/dist/s3db.iife.min.js +1 -1
- package/package.json +1 -1
- package/src/client.class.js +1 -1
- package/src/database.class.js +3 -1
- package/src/resource.class.js +11 -5
package/dist/s3db.iife.js
CHANGED
|
@@ -9651,7 +9651,7 @@ ${JSON.stringify(validation, null, 2)}`,
|
|
|
9651
9651
|
}) {
|
|
9652
9652
|
super();
|
|
9653
9653
|
this.verbose = verbose;
|
|
9654
|
-
this.id = id ?? idGenerator();
|
|
9654
|
+
this.id = id ?? idGenerator(77);
|
|
9655
9655
|
this.parallelism = parallelism;
|
|
9656
9656
|
this.config = new ConnectionString(connectionString);
|
|
9657
9657
|
this.httpClientOptions = {
|
|
@@ -11238,10 +11238,18 @@ ${JSON.stringify(validation, null, 2)}`,
|
|
|
11238
11238
|
*/
|
|
11239
11239
|
constructor(config = {}) {
|
|
11240
11240
|
super();
|
|
11241
|
-
this._instanceId =
|
|
11241
|
+
this._instanceId = idGenerator(7);
|
|
11242
11242
|
const validation = validateResourceConfig(config);
|
|
11243
11243
|
if (!validation.isValid) {
|
|
11244
|
-
|
|
11244
|
+
const errorDetails = validation.errors.map((err) => ` \u2022 ${err}`).join("\n");
|
|
11245
|
+
throw new ResourceError(
|
|
11246
|
+
`Invalid Resource ${config.name || "[unnamed]"} configuration:
|
|
11247
|
+
${errorDetails}`,
|
|
11248
|
+
{
|
|
11249
|
+
resourceName: config.name,
|
|
11250
|
+
validation: validation.errors
|
|
11251
|
+
}
|
|
11252
|
+
);
|
|
11245
11253
|
}
|
|
11246
11254
|
const {
|
|
11247
11255
|
name,
|
|
@@ -13412,6 +13420,7 @@ ${JSON.stringify(validation, null, 2)}`,
|
|
|
13412
13420
|
class Database extends EventEmitter {
|
|
13413
13421
|
constructor(options) {
|
|
13414
13422
|
super();
|
|
13423
|
+
this.id = idGenerator(7);
|
|
13415
13424
|
this.version = "1";
|
|
13416
13425
|
this.s3dbVersion = (() => {
|
|
13417
13426
|
const [ok, err, version] = try_fn_default(() => true ? "8.0.2" : "latest");
|