diff --git a/packages/plugins/policy/plugin.zmodel b/packages/plugins/policy/plugin.zmodel index ae04a41b..ae5e11cf 100644 --- a/packages/plugins/policy/plugin.zmodel +++ b/packages/plugins/policy/plugin.zmodel @@ -1,7 +1,7 @@ /** * Defines an access policy that allows a set of operations when the given condition is true. * - * @param operation: comma-separated list of "create", "read", "update", "post-update", " "delete". Use "all" to denote all operations. + * @param operation: comma-separated list of "create", "read", "update", "post-update", "delete". Use "all" to denote all operations. * @param condition: a boolean expression that controls if the operation should be allowed. */ attribute @@allow(_ operation: String @@@completionHint(["'create'", "'read'", "'update'", "'post-update'","'delete'", "'all'"]), _ condition: Boolean) diff --git a/packages/testtools/src/utils.ts b/packages/testtools/src/utils.ts index 75f48ee8..1f8119fe 100644 --- a/packages/testtools/src/utils.ts +++ b/packages/testtools/src/utils.ts @@ -1,7 +1,6 @@ import { loadDocument } from '@zenstackhq/language'; -import path from 'node:path'; export function loadDocumentWithPlugins(filePath: string) { - const pluginModelFiles = [path.resolve(__dirname, '../node_modules/@zenstackhq/plugin-policy/plugin.zmodel')]; + const pluginModelFiles = [require.resolve('@zenstackhq/plugin-policy/plugin.zmodel')]; return loadDocument(filePath, pluginModelFiles); }