@aooth/arbac-moost 0.1.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.
package/package.json ADDED
@@ -0,0 +1,101 @@
1
+ {
2
+ "name": "@aooth/arbac-moost",
3
+ "version": "0.1.1",
4
+ "description": "Moost RBAC integration for aoothjs (migrated from @moostjs/arbac)",
5
+ "keywords": [
6
+ "abac",
7
+ "access-control",
8
+ "aoothjs",
9
+ "arbac",
10
+ "authorization",
11
+ "moost",
12
+ "permissions",
13
+ "rbac"
14
+ ],
15
+ "homepage": "https://github.com/moostjs/aoothjs/tree/main/packages/arbac-moost#readme",
16
+ "bugs": {
17
+ "url": "https://github.com/moostjs/aoothjs/issues"
18
+ },
19
+ "license": "MIT",
20
+ "author": "Artem Maltsev",
21
+ "repository": {
22
+ "type": "git",
23
+ "url": "git+https://github.com/moostjs/aoothjs.git",
24
+ "directory": "packages/arbac-moost"
25
+ },
26
+ "files": [
27
+ "dist",
28
+ "src/atscript/models/user.as",
29
+ "src/atscript/models/user.as.d.ts"
30
+ ],
31
+ "type": "module",
32
+ "sideEffects": false,
33
+ "main": "dist/index.mjs",
34
+ "module": "./dist/index.mjs",
35
+ "types": "dist/index.d.mts",
36
+ "exports": {
37
+ ".": {
38
+ "types": "./dist/index.d.mts",
39
+ "import": "./dist/index.mjs"
40
+ },
41
+ "./atscript": {
42
+ "types": "./dist/atscript/index.d.mts",
43
+ "import": "./dist/atscript/index.mjs"
44
+ },
45
+ "./atscript/models": "./src/atscript/models/user.as",
46
+ "./atscript/models.as": "./src/atscript/models/user.as",
47
+ "./plugin": {
48
+ "types": "./dist/plugin.d.mts",
49
+ "import": "./dist/plugin.mjs"
50
+ },
51
+ "./package.json": "./package.json"
52
+ },
53
+ "publishConfig": {
54
+ "access": "public"
55
+ },
56
+ "dependencies": {
57
+ "@aooth/arbac": "0.1.1",
58
+ "@aooth/arbac-core": "0.1.1",
59
+ "@aooth/user": "0.1.1"
60
+ },
61
+ "devDependencies": {
62
+ "@atscript/core": "^0.1.56",
63
+ "@atscript/db": "^0.1.80",
64
+ "@atscript/db-sql-tools": "^0.1.80",
65
+ "@atscript/db-sqlite": "^0.1.80",
66
+ "@atscript/moost-db": "^0.1.80",
67
+ "@atscript/typescript": "^0.1.56",
68
+ "@moostjs/event-http": "^0.6.10",
69
+ "@types/better-sqlite3": "^7.6.13",
70
+ "@uniqu/core": "^0.1.6",
71
+ "better-sqlite3": "^12.6.2",
72
+ "unplugin-atscript": "^0.1.56"
73
+ },
74
+ "peerDependencies": {
75
+ "@atscript/db": ">=0.1.79",
76
+ "@atscript/moost-db": ">=0.1.79",
77
+ "@atscript/typescript": ">=0.1.56",
78
+ "@moostjs/event-http": ">=0.6.10",
79
+ "@wooksjs/event-core": ">=0.7.12",
80
+ "@wooksjs/event-http": ">=0.7.12",
81
+ "moost": ">=0.6.10"
82
+ },
83
+ "peerDependenciesMeta": {
84
+ "@atscript/db": {
85
+ "optional": true
86
+ },
87
+ "@atscript/moost-db": {
88
+ "optional": true
89
+ },
90
+ "@atscript/typescript": {
91
+ "optional": true
92
+ }
93
+ },
94
+ "scripts": {
95
+ "gen:atscript": "node --experimental-strip-types scripts/gen-as.mjs",
96
+ "build": "vp pack",
97
+ "dev": "vp pack --watch",
98
+ "test": "vp test",
99
+ "check": "vp check"
100
+ }
101
+ }
@@ -0,0 +1,10 @@
1
+ import { AoothUserCredentials } from '@aooth/user/atscript-db/model'
2
+
3
+ /**
4
+ * Base credential record for ARBAC-enabled atscript users.
5
+ * Pre-applies `@arbac.role` to `roles: string[]` so subclasses inherit it.
6
+ */
7
+ export interface AoothArbacUserCredentials extends AoothUserCredentials {
8
+ @arbac.role
9
+ roles: string[]
10
+ }
@@ -0,0 +1,28 @@
1
+ // prettier-ignore-start
2
+ /* eslint-disable */
3
+ /* oxlint-disable */
4
+ /// <reference path="./user.as" />
5
+ /**
6
+ * 🪄 This file was generated by Atscript
7
+ * Do not edit this file!
8
+ */
9
+
10
+ import type { TAtscriptTypeObject, TAtscriptTypeComplex, TAtscriptTypeFinal, TAtscriptTypeArray, TAtscriptAnnotatedType, TMetadataMap, Validator, TValidatorOptions } from "@atscript/typescript/utils"
11
+ import { AoothUserCredentials } from "@aooth/user/atscript-db/model.as"
12
+
13
+ /**
14
+ * Atscript interface **AoothArbacUserCredentials**
15
+ * @see {@link ./user.as:7:18}
16
+ */
17
+ export declare class AoothArbacUserCredentials extends AoothUserCredentials {
18
+ roles: string[]
19
+ static __is_atscript_annotated_type: true
20
+ static type: TAtscriptTypeObject<keyof AoothArbacUserCredentials, AoothArbacUserCredentials>
21
+ static metadata: TMetadataMap<AtscriptMetadata>
22
+ static validator: (opts?: Partial<TValidatorOptions>) => Validator<typeof AoothArbacUserCredentials>
23
+ /** @deprecated JSON Schema support is disabled. Calling this method will throw a runtime error. To enable, set `jsonSchema: 'lazy'` or `jsonSchema: 'bundle'` in tsPlugin options, or add `@emit.jsonSchema` annotation to individual interfaces. */
24
+ static toJsonSchema: () => any
25
+ /** @deprecated Example Data support is disabled. To enable, set `exampleData: true` in tsPlugin options. */
26
+ static toExampleData?: () => any
27
+ }
28
+ // prettier-ignore-end