@aeriajs/core 0.0.87 → 0.0.88
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/assets.d.ts +3 -3
- package/dist/assets.js +1 -4
- package/dist/assets.mjs +1 -4
- package/dist/collection/define.d.ts +1 -2
- package/package.json +8 -8
package/dist/assets.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Context, Collection, Token } from '@aeriajs/types';
|
|
2
2
|
import { ACError } from '@aeriajs/types';
|
|
3
|
-
export declare const internalGetCollectionAsset: <TCollectionName extends string, TAssetName extends "item" | "description" | "security" | "functions" | "contracts" | "exposedFunctions">(collectionName: TCollectionName, assetName: TAssetName) => Promise<import("@aeriajs/types").Left<ACError.ResourceNotFound> | import("@aeriajs/types").
|
|
4
|
-
export declare const getCollectionAsset: <TCollectionName extends string, TAssetName extends "item" | "description" | "security" | "functions" | "contracts" | "exposedFunctions">(collectionName: TCollectionName, assetName: TAssetName) => Promise<import("@aeriajs/types").Left<ACError.ResourceNotFound> | import("@aeriajs/types").
|
|
3
|
+
export declare const internalGetCollectionAsset: <TCollectionName extends string, TAssetName extends "item" | "description" | "security" | "functions" | "contracts" | "exposedFunctions">(collectionName: TCollectionName, assetName: TAssetName) => Promise<import("@aeriajs/types").Left<ACError.ResourceNotFound> | import("@aeriajs/types").Right<any>>;
|
|
4
|
+
export declare const getCollectionAsset: <TCollectionName extends string, TAssetName extends "item" | "description" | "security" | "functions" | "contracts" | "exposedFunctions">(collectionName: TCollectionName, assetName: TAssetName) => Promise<import("@aeriajs/types").Left<ACError.ResourceNotFound> | import("@aeriajs/types").Right<NonNullable<Collection[TAssetName]>>>;
|
|
5
5
|
export declare const getFunction: <TCollectionName extends string, TFunctionName extends string>(collectionName: TCollectionName, functionName: TFunctionName, token?: Token, options?: {
|
|
6
6
|
exposedOnly: boolean;
|
|
7
|
-
}) => Promise<import("@aeriajs/types").Left<ACError.ResourceNotFound> | import("@aeriajs/types").Left<ACError.
|
|
7
|
+
}) => Promise<import("@aeriajs/types").Left<ACError.ResourceNotFound> | import("@aeriajs/types").Left<ACError.FunctionNotFound> | import("@aeriajs/types").Left<ACError.FunctionNotExposed> | import("@aeriajs/types").Left<ACError.AuthorizationError> | import("@aeriajs/types").Right<(payload: unknown, context: Context) => Promise<any>>>;
|
package/dist/assets.js
CHANGED
|
@@ -13,10 +13,7 @@ const internalGetCollectionAsset = async (collectionName, assetName) => {
|
|
|
13
13
|
const collection = await (0, entrypoint_1.getCollection)(collectionName);
|
|
14
14
|
const asset = collection?.[assetName];
|
|
15
15
|
if (!asset) {
|
|
16
|
-
|
|
17
|
-
return (0, common_1.left)(types_1.ACError.ResourceNotFound);
|
|
18
|
-
}
|
|
19
|
-
return (0, common_1.left)(types_1.ACError.AssetNotFound);
|
|
16
|
+
return (0, common_1.left)(types_1.ACError.ResourceNotFound);
|
|
20
17
|
}
|
|
21
18
|
return (0, common_1.right)(asset);
|
|
22
19
|
};
|
package/dist/assets.mjs
CHANGED
|
@@ -11,10 +11,7 @@ export const internalGetCollectionAsset = async (collectionName, assetName) => {
|
|
|
11
11
|
const collection = await getCollection(collectionName);
|
|
12
12
|
const asset = collection?.[assetName];
|
|
13
13
|
if (!asset) {
|
|
14
|
-
|
|
15
|
-
return left(ACError.ResourceNotFound);
|
|
16
|
-
}
|
|
17
|
-
return left(ACError.AssetNotFound);
|
|
14
|
+
return left(ACError.ResourceNotFound);
|
|
18
15
|
}
|
|
19
16
|
return right(asset);
|
|
20
17
|
};
|
|
@@ -8,8 +8,7 @@ export declare const defineCollection: <TCollection extends Omit<Collection<TCol
|
|
|
8
8
|
contracts?: TContracts;
|
|
9
9
|
exposedFunctions?: TExposedFunctions;
|
|
10
10
|
security?: CollectionSecurityPolicy<{
|
|
11
|
-
|
|
12
|
-
functions: NoInfer<TFunctions>;
|
|
11
|
+
functions: TFunctions;
|
|
13
12
|
}>;
|
|
14
13
|
}) => TCollection & {
|
|
15
14
|
item: SchemaWithId<TDescription>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aeriajs/core",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.88",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -41,13 +41,13 @@
|
|
|
41
41
|
"mongodb-memory-server": "^9.2.0"
|
|
42
42
|
},
|
|
43
43
|
"peerDependencies": {
|
|
44
|
-
"@aeriajs/builtins": "^0.0.
|
|
45
|
-
"@aeriajs/common": "^0.0.
|
|
46
|
-
"@aeriajs/entrypoint": "^0.0.
|
|
47
|
-
"@aeriajs/http": "^0.0.
|
|
48
|
-
"@aeriajs/security": "^0.0.
|
|
49
|
-
"@aeriajs/types": "^0.0.
|
|
50
|
-
"@aeriajs/validation": "^0.0.
|
|
44
|
+
"@aeriajs/builtins": "^0.0.88",
|
|
45
|
+
"@aeriajs/common": "^0.0.54",
|
|
46
|
+
"@aeriajs/entrypoint": "^0.0.54",
|
|
47
|
+
"@aeriajs/http": "^0.0.62",
|
|
48
|
+
"@aeriajs/security": "^0.0.88",
|
|
49
|
+
"@aeriajs/types": "^0.0.51",
|
|
50
|
+
"@aeriajs/validation": "^0.0.57"
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {
|
|
53
53
|
"mongodb": "^6.5.0",
|