@aooth/arbac-moost 0.2.0 → 0.2.1

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.
@@ -1,8 +1,8 @@
1
1
  import { i as __decorate, n as ArbacUserProvider, t as __decorateMetadata } from "../decorateMetadata-CU_mqYGT.mjs";
2
2
  import { defineWook, key } from "@wooksjs/event-core";
3
3
  import { Injectable } from "moost";
4
- import { defineAnnotatedType, throwFeatureDisabled } from "@atscript/typescript/utils";
5
- import "@aooth/user/atscript-db/model.as";
4
+ import { $ak, $f, $nr, defineAnnotatedType, throwFeatureDisabled } from "@atscript/typescript/utils";
5
+ import { AoothUserCredentials } from "@aooth/user/atscript-db/model.as";
6
6
  //#region src/atscript/role-list.ts
7
7
  /**
8
8
  * Collect unique, non-empty strings from an iterable of unknown values,
@@ -477,6 +477,8 @@ var AoothArbacUserCredentials = class {
477
477
  throwFeatureDisabled("JSON Schema", "jsonSchema", "emit.jsonSchema");
478
478
  }
479
479
  };
480
- defineAnnotatedType("object", AoothArbacUserCredentials).prop("id", defineAnnotatedType().designType("string").tags("string").annotate("meta.id", true).annotate("db.default.uuid", true).$type).prop("username", defineAnnotatedType().designType("string").tags("string").annotate("db.index.unique", "username_idx", true).$type).prop("version", defineAnnotatedType().designType("number").tags("int", "number").annotate("db.column.version", true).annotate("expect.int", true).$type).prop("password", defineAnnotatedType("object").prop("hash", defineAnnotatedType().designType("string").tags("string").$type).prop("history", defineAnnotatedType("array").of(defineAnnotatedType().designType("string").tags("string").$type).$type).prop("lastChanged", defineAnnotatedType().designType("number").tags("timestamp", "number").annotate("expect.int", true).$type).prop("isInitial", defineAnnotatedType().designType("boolean").tags("boolean").$type).annotate("db.patch.strategy", "merge").$type).prop("account", defineAnnotatedType("object").prop("active", defineAnnotatedType().designType("boolean").tags("boolean").$type).prop("locked", defineAnnotatedType().designType("boolean").tags("boolean").$type).prop("lockReason", defineAnnotatedType().designType("string").tags("string").$type).prop("lockEnds", defineAnnotatedType().designType("number").tags("timestamp", "number").annotate("expect.int", true).$type).prop("failedLoginAttempts", defineAnnotatedType().designType("number").tags("number").$type).prop("lastLogin", defineAnnotatedType().designType("number").tags("timestamp", "number").annotate("expect.int", true).$type).prop("pendingInvitation", defineAnnotatedType().designType("boolean").tags("boolean").optional().$type).prop("invitedBy", defineAnnotatedType().designType("string").tags("string").optional().$type).prop("inviteNonce", defineAnnotatedType().designType("string").tags("string").optional().$type).prop("verifiedEmail", defineAnnotatedType().designType("string").tags("string").optional().$type).annotate("db.patch.strategy", "merge").$type).prop("mfa", defineAnnotatedType("object").prop("methods", defineAnnotatedType("array").of(defineAnnotatedType("object").prop("name", defineAnnotatedType().designType("string").tags("string").$type).prop("confirmed", defineAnnotatedType().designType("boolean").tags("boolean").$type).prop("value", defineAnnotatedType().designType("string").tags("string").$type).prop("lastUsedWindow", defineAnnotatedType().designType("number").tags("int", "number").annotate("expect.int", true).optional().$type).$type).$type).prop("defaultMethod", defineAnnotatedType().designType("string").tags("string").$type).prop("autoSend", defineAnnotatedType().designType("boolean").tags("boolean").$type).annotate("db.patch.strategy", "merge").$type).prop("trustedDevices", defineAnnotatedType("array").of(defineAnnotatedType("object").prop("token", defineAnnotatedType().designType("string").tags("string").$type).prop("ip", defineAnnotatedType().designType("string").tags("string").optional().$type).prop("issuedAt", defineAnnotatedType().designType("number").tags("timestamp", "number").annotate("expect.int", true).$type).prop("expiresAt", defineAnnotatedType().designType("number").tags("timestamp", "number").annotate("expect.int", true).$type).prop("name", defineAnnotatedType().designType("string").tags("string").optional().$type).$type).annotate("db.patch.strategy", "merge").optional().$type).prop("seenDevices", defineAnnotatedType("array").of(defineAnnotatedType("object").prop("token", defineAnnotatedType().designType("string").tags("string").$type).prop("ip", defineAnnotatedType().designType("string").tags("string").optional().$type).prop("issuedAt", defineAnnotatedType().designType("number").tags("timestamp", "number").annotate("expect.int", true).$type).prop("expiresAt", defineAnnotatedType().designType("number").tags("timestamp", "number").annotate("expect.int", true).$type).prop("name", defineAnnotatedType().designType("string").tags("string").optional().$type).$type).annotate("db.patch.strategy", "merge").optional().$type).prop("roles", defineAnnotatedType("array").of(defineAnnotatedType().designType("string").tags("string").$type).annotate("arbac.role", true).$type);
480
+ $ak("db.index.fulltext", "db.index.plain", "db.index.unique", "db.view.joins", "expect.pattern");
481
+ $nr("aooth.auth.metadata", "aooth.user.email", "aooth.user.phone", "arbac.attenuate.attr", "arbac.attenuate.role", "arbac.attribute", "arbac.role", "arbac.userId", "db.agg.avg", "db.agg.count", "db.agg.countDistinct", "db.agg.max", "db.agg.min", "db.agg.sum", "db.alias", "db.amount.currency.ref", "db.column", "db.column.collate", "db.column.derived", "db.column.dimension", "db.column.filterable", "db.column.measure", "db.column.precision", "db.column.renamed", "db.column.searchable", "db.column.sortable", "db.column.version", "db.column.version.exempt", "db.compute", "db.default", "db.default.increment", "db.default.now", "db.default.uuid", "db.depth.limit", "db.encrypted", "db.http.path", "db.ignore", "db.index.fulltext", "db.index.geo", "db.index.plain", "db.index.unique", "db.json", "db.onUpdate.inc", "db.onUpdate.now", "db.patch.strategy", "db.rel.FK", "db.rel.filter", "db.rel.filterable", "db.rel.from", "db.rel.onDelete", "db.rel.onUpdate", "db.rel.to", "db.rel.via", "db.schema", "db.search.filter", "db.search.vector", "db.search.vector.threshold", "db.sort.nulls", "db.space", "db.sync.method", "db.table", "db.table.filterable", "db.table.preferredId.uniqueIndex", "db.table.renamed", "db.table.sortable", "db.unit.ref", "db.view", "db.view.filter", "db.view.for", "db.view.having", "db.view.joins", "db.view.materialized", "db.view.renamed", "db.writeOnly", "meta.default", "meta.id", "meta.readonly", "meta.required");
482
+ defineAnnotatedType("object", AoothArbacUserCredentials).prop("id", $f(AoothUserCredentials, "id")).prop("username", $f(AoothUserCredentials, "username")).prop("version", $f(AoothUserCredentials, "version")).prop("password", $f(AoothUserCredentials, "password")).prop("account", $f(AoothUserCredentials, "account")).prop("mfa", $f(AoothUserCredentials, "mfa")).prop("trustedDevices", $f(AoothUserCredentials, "trustedDevices")).prop("seenDevices", $f(AoothUserCredentials, "seenDevices")).prop("roles", defineAnnotatedType("array").of(defineAnnotatedType().designType("string").tags("string").$type).annotate("arbac.role", true).$type);
481
483
  //#endregion
482
484
  export { AoothArbacUserCredentials, ArbacUserRecordCache, AtscriptArbacUserProvider, extractAttenuation, getAoothUserHandleSpec, getArbacAttenuationSpec, validateAttenuationTargets };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aooth/arbac-moost",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "Moost RBAC integration for aoothjs (migrated from @moostjs/arbac)",
5
5
  "keywords": [
6
6
  "abac",
@@ -61,29 +61,29 @@
61
61
  },
62
62
  "dependencies": {
63
63
  "@uniqu/core": "^0.1.15",
64
- "@aooth/arbac": "0.2.0",
65
- "@aooth/arbac-core": "0.2.0",
66
- "@aooth/user": "0.2.0"
64
+ "@aooth/arbac": "0.2.1",
65
+ "@aooth/arbac-core": "0.2.1",
66
+ "@aooth/user": "0.2.1"
67
67
  },
68
68
  "devDependencies": {
69
- "@atscript/core": "^0.1.109",
70
- "@atscript/db": "^0.1.164",
71
- "@atscript/db-sql-tools": "^0.1.164",
72
- "@atscript/db-sqlite": "^0.1.164",
73
- "@atscript/moost-db": "^0.1.164",
74
- "@atscript/typescript": "^0.1.109",
75
- "@moostjs/event-http": "^0.6.53",
69
+ "@atscript/core": "^0.2.1",
70
+ "@atscript/db": "^0.1.166",
71
+ "@atscript/db-sql-tools": "^0.1.166",
72
+ "@atscript/db-sqlite": "^0.1.166",
73
+ "@atscript/moost-db": "^0.1.166",
74
+ "@atscript/typescript": "^0.2.1",
75
+ "@moostjs/event-http": "^0.7.0",
76
76
  "@types/better-sqlite3": "^7.6.13",
77
77
  "better-sqlite3": "^12.6.2",
78
- "unplugin-atscript": "^0.1.109"
78
+ "unplugin-atscript": "^0.2.1"
79
79
  },
80
80
  "peerDependencies": {
81
- "@atscript/db": "^0.1.164",
82
- "@atscript/moost-db": "^0.1.164",
83
- "@atscript/typescript": "^0.1.109",
84
- "@moostjs/event-http": "^0.6.53",
85
- "@wooksjs/event-core": "^0.7.31",
86
- "moost": "^0.6.53"
81
+ "@atscript/db": "^0.1.166",
82
+ "@atscript/moost-db": "^0.1.166",
83
+ "@atscript/typescript": "^0.2.1",
84
+ "@moostjs/event-http": "^0.7.0",
85
+ "@wooksjs/event-core": "^0.8.0",
86
+ "moost": "^0.7.0"
87
87
  },
88
88
  "peerDependenciesMeta": {
89
89
  "@atscript/db": {
@@ -7,7 +7,7 @@
7
7
  * Do not edit this file!
8
8
  */
9
9
 
10
- import type { TAtscriptTypeObject, TAtscriptTypeComplex, TAtscriptTypeFinal, TAtscriptTypeArray, TAtscriptAnnotatedType, TMetadataMap, Validator, TValidatorOptions } from "@atscript/typescript/utils"
10
+ import type { TAtscriptTypeObject, TAtscriptTypeComplex, TAtscriptTypeFinal, TAtscriptTypeArray, TAtscriptAnnotatedType, TAtscriptField, TMetadataMap, Validator, TValidatorOptions } from "@atscript/typescript/utils"
11
11
  import { AoothUserCredentials } from "@aooth/user/atscript-db/model.as"
12
12
 
13
13
  /**