@thisisagile/easy 15.15.0 → 15.15.2
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/process/Scope.d.ts +2 -1
- package/dist/process/Scope.js +3 -0
- package/dist/process/Scope.js.map +1 -1
- package/dist/process/Scope.mjs +4 -1
- package/dist/process/Scope.mjs.map +1 -1
- package/dist/types/Identity.d.ts +5 -0
- package/dist/types/Identity.js.map +1 -1
- package/package.json +2 -2
- package/src/process/Scope.ts +5 -1
- package/src/types/Identity.ts +2 -0
package/dist/process/Scope.d.ts
CHANGED
package/dist/process/Scope.js
CHANGED
|
@@ -30,6 +30,9 @@ class Scope extends import_types.Enum {
|
|
|
30
30
|
super(name, id.toString());
|
|
31
31
|
this.name = name;
|
|
32
32
|
}
|
|
33
|
+
for(item) {
|
|
34
|
+
return new Scope(`${this.name} ${(0, import_types.isString)(item) ? (0, import_types.text)(item).title : item.name}`, (0, import_types.kebab)(`${this.id} ${(0, import_types.isString)(item) ? item : item.id}`));
|
|
35
|
+
}
|
|
33
36
|
}
|
|
34
37
|
// Annotate the CommonJS export names for ESM import in node:
|
|
35
38
|
0 && (module.exports = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/process/Scope.ts"],"sourcesContent":["import { Enum, Text, text } from '../types';\n\nexport class Scope extends Enum {\n // static readonly Basic = new Scope('Basic');\n // static readonly Auth = new Scope('Authorization', 'auth');\n // static readonly Admin = new Scope('Administration', 'admin');\n\n protected constructor(readonly name: string, id: Text = text(name).kebab) {\n super(name, id.toString());\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,
|
|
1
|
+
{"version":3,"sources":["../../src/process/Scope.ts"],"sourcesContent":["import { Enum, IdName, isString, kebab, Text, text } from '../types';\n\nexport class Scope extends Enum {\n // static readonly Basic = new Scope('Basic');\n // static readonly Auth = new Scope('Authorization', 'auth');\n // static readonly Admin = new Scope('Administration', 'admin');\n\n protected constructor(readonly name: string, id: Text = text(name).kebab) {\n super(name, id.toString());\n }\n\n for(item: string | IdName): Scope {\n return new Scope(`${this.name} ${isString(item) ? text(item).title : item.name}`, kebab(`${this.id} ${isString(item) ? item : item.id}`));\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAA0D;AAEnD,MAAM,cAAc,kBAAK;AAAA;AAAA;AAAA;AAAA,EAKpB,YAAqB,MAAc,SAAW,mBAAK,IAAI,EAAE,OAAO;AACxE,UAAM,MAAM,GAAG,SAAS,CAAC;AADI;AAAA,EAE/B;AAAA,EAEA,IAAI,MAA8B;AAChC,WAAO,IAAI,MAAM,GAAG,KAAK,IAAI,QAAI,uBAAS,IAAI,QAAI,mBAAK,IAAI,EAAE,QAAQ,KAAK,IAAI,QAAI,oBAAM,GAAG,KAAK,EAAE,QAAI,uBAAS,IAAI,IAAI,OAAO,KAAK,EAAE,EAAE,CAAC;AAAA,EAC1I;AACF;","names":[]}
|
package/dist/process/Scope.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "../chunk-4N72FQFX.mjs";
|
|
2
|
-
import { Enum, text } from "../types";
|
|
2
|
+
import { Enum, isString, kebab, text } from "../types";
|
|
3
3
|
class Scope extends Enum {
|
|
4
4
|
// static readonly Basic = new Scope('Basic');
|
|
5
5
|
// static readonly Auth = new Scope('Authorization', 'auth');
|
|
@@ -8,6 +8,9 @@ class Scope extends Enum {
|
|
|
8
8
|
super(name, id.toString());
|
|
9
9
|
this.name = name;
|
|
10
10
|
}
|
|
11
|
+
for(item) {
|
|
12
|
+
return new Scope(`${this.name} ${isString(item) ? text(item).title : item.name}`, kebab(`${this.id} ${isString(item) ? item : item.id}`));
|
|
13
|
+
}
|
|
11
14
|
}
|
|
12
15
|
export {
|
|
13
16
|
Scope
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/process/Scope.ts"],"sourcesContent":["import { Enum, Text, text } from '../types';\n\nexport class Scope extends Enum {\n // static readonly Basic = new Scope('Basic');\n // static readonly Auth = new Scope('Authorization', 'auth');\n // static readonly Admin = new Scope('Administration', 'admin');\n\n protected constructor(readonly name: string, id: Text = text(name).kebab) {\n super(name, id.toString());\n }\n}\n"],"mappings":";AAAA,SAAS,
|
|
1
|
+
{"version":3,"sources":["../../src/process/Scope.ts"],"sourcesContent":["import { Enum, IdName, isString, kebab, Text, text } from '../types';\n\nexport class Scope extends Enum {\n // static readonly Basic = new Scope('Basic');\n // static readonly Auth = new Scope('Authorization', 'auth');\n // static readonly Admin = new Scope('Administration', 'admin');\n\n protected constructor(readonly name: string, id: Text = text(name).kebab) {\n super(name, id.toString());\n }\n\n for(item: string | IdName): Scope {\n return new Scope(`${this.name} ${isString(item) ? text(item).title : item.name}`, kebab(`${this.id} ${isString(item) ? item : item.id}`));\n }\n}\n"],"mappings":";AAAA,SAAS,MAAc,UAAU,OAAa,YAAY;AAEnD,MAAM,cAAc,KAAK;AAAA;AAAA;AAAA;AAAA,EAKpB,YAAqB,MAAc,KAAW,KAAK,IAAI,EAAE,OAAO;AACxE,UAAM,MAAM,GAAG,SAAS,CAAC;AADI;AAAA,EAE/B;AAAA,EAEA,IAAI,MAA8B;AAChC,WAAO,IAAI,MAAM,GAAG,KAAK,IAAI,IAAI,SAAS,IAAI,IAAI,KAAK,IAAI,EAAE,QAAQ,KAAK,IAAI,IAAI,MAAM,GAAG,KAAK,EAAE,IAAI,SAAS,IAAI,IAAI,OAAO,KAAK,EAAE,EAAE,CAAC;AAAA,EAC1I;AACF;","names":[]}
|
package/dist/types/Identity.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/types/Identity.ts"],"sourcesContent":["import { Id } from './Id';\n\nexport type Identity = {\n id: Id;\n user?: string;\n};\n"],"mappings":";;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../src/types/Identity.ts"],"sourcesContent":["import { Id } from './Id';\n\nexport type Identity = {\n id: Id;\n user?: string;\n};\n\nexport type IdName = { id: Id; name: string, slug?: string };\n"],"mappings":";;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thisisagile/easy",
|
|
3
|
-
"version": "15.15.
|
|
3
|
+
"version": "15.15.2",
|
|
4
4
|
"description": "Straightforward library for building domain-driven microservice architectures",
|
|
5
5
|
"author": "Sander Hoogendoorn",
|
|
6
6
|
"license": "MIT",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"access": "public"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
|
-
"@thisisagile/easy-test": "15.15.
|
|
36
|
+
"@thisisagile/easy-test": "15.15.2",
|
|
37
37
|
"@types/form-urlencoded": "^4.4.0",
|
|
38
38
|
"@types/jsonwebtoken": "^9.0.2",
|
|
39
39
|
"@types/luxon": "3.2.0",
|
package/src/process/Scope.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Enum, Text, text } from '../types';
|
|
1
|
+
import { Enum, IdName, isString, kebab, Text, text } from '../types';
|
|
2
2
|
|
|
3
3
|
export class Scope extends Enum {
|
|
4
4
|
// static readonly Basic = new Scope('Basic');
|
|
@@ -8,4 +8,8 @@ export class Scope extends Enum {
|
|
|
8
8
|
protected constructor(readonly name: string, id: Text = text(name).kebab) {
|
|
9
9
|
super(name, id.toString());
|
|
10
10
|
}
|
|
11
|
+
|
|
12
|
+
for(item: string | IdName): Scope {
|
|
13
|
+
return new Scope(`${this.name} ${isString(item) ? text(item).title : item.name}`, kebab(`${this.id} ${isString(item) ? item : item.id}`));
|
|
14
|
+
}
|
|
11
15
|
}
|