@rnaga/wp-node 1.3.1 → 1.3.3
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
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"query-builders.d.ts","sourceRoot":"","sources":["../../src/query-builder/query-builders.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAQ,MAAM,MAAM,CAAC;AAGlC,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACxC,OAAO,QAAQ,MAAM,aAAa,CAAC;AAEnC,OAAO,KAAK,KAAK,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"query-builders.d.ts","sourceRoot":"","sources":["../../src/query-builder/query-builders.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAQ,MAAM,MAAM,CAAC;AAGlC,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACxC,OAAO,QAAQ,MAAM,aAAa,CAAC;AAEnC,OAAO,KAAK,KAAK,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAUhC,qBACa,aAAa;;IAGf,QAAQ,EAAE,QAAQ;IACzB,OAAO,CAAC,UAAU;IACX,MAAM,EAAE,MAAM;gBAFd,QAAQ,EAAE,QAAQ,EACjB,UAAU,EAAE,UAAU,EACvB,MAAM,EAAE,MAAM;IAMvB,IAAI,YAAY,kCAEf;IAED,YAAY,CAAC,KAAK,EAAE,MAAM;IAI1B,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,CAAC,EAAE,GAAG;IAIxB,GAAG,CAAC,CAAC,EACH,MAAM,EAAE,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,EAC5B,OAAO,CAAC,EAAE,IAAI,CAAC,YAAY,EAC3B,KAAK,CAAC,EAAE,KAAK,GACZ,CAAC;CAUL"}
|
|
@@ -20,9 +20,14 @@ const components_1 = require("../core/components");
|
|
|
20
20
|
const tables_1 = require("../core/tables");
|
|
21
21
|
const database_1 = __importDefault(require("../database"));
|
|
22
22
|
const component_1 = require("../decorators/component");
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
try {
|
|
24
|
+
knex_1.knex.QueryBuilder.extend("__ref", function (ref) {
|
|
25
|
+
return ref;
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
catch (e) {
|
|
29
|
+
// console.warn("knex.QueryBuilder.extend error:", e);
|
|
30
|
+
}
|
|
26
31
|
let QueryBuilders = QueryBuilders_1 = class QueryBuilders {
|
|
27
32
|
database;
|
|
28
33
|
components;
|
package/types/crud.d.ts
CHANGED
|
@@ -1,17 +1,18 @@
|
|
|
1
|
+
import { CrudUtil } from "../core/utils/crud.util";
|
|
2
|
+
import { ApplicationPasswordsCrud } from "../crud/application-passwords.crud";
|
|
1
3
|
import { BlogCrud } from "../crud/blog.crud";
|
|
2
4
|
import { CommentCrud } from "../crud/comment.crud";
|
|
5
|
+
import { Crud } from "../crud/crud";
|
|
3
6
|
import { MetaCrud } from "../crud/meta.crud";
|
|
4
7
|
import { OptionsCrud } from "../crud/options.crud";
|
|
5
8
|
import { PostCrud } from "../crud/post.crud";
|
|
6
|
-
import { SiteCrud } from "../crud/site.crud";
|
|
7
|
-
import { SettingsCrud } from "../crud/settings.crud";
|
|
8
|
-
import { TermCrud } from "../crud/term.crud";
|
|
9
|
-
import { UserCrud } from "../crud/user.crud";
|
|
10
|
-
import { CrudUtil } from "../core/utils/crud.util";
|
|
11
|
-
import { Crud } from "../crud/crud";
|
|
12
9
|
import { RevisionCrud } from "../crud/revision.crud";
|
|
13
10
|
import { RolesCrud } from "../crud/roles.crud";
|
|
11
|
+
import { SettingsCrud } from "../crud/settings.crud";
|
|
12
|
+
import { SiteCrud } from "../crud/site.crud";
|
|
13
|
+
import { TermCrud } from "../crud/term.crud";
|
|
14
14
|
import { UserSelfRegistrationCrud } from "../crud/user-self-registration.crud";
|
|
15
|
+
import { UserCrud } from "../crud/user.crud";
|
|
15
16
|
|
|
16
17
|
export type ParseError = ReturnType<CrudUtil["parseError"]>;
|
|
17
18
|
|
|
@@ -39,6 +40,7 @@ export type CrudKeys =
|
|
|
39
40
|
type Context = "view" | "edit" | "embed";
|
|
40
41
|
|
|
41
42
|
interface CrudComponents {
|
|
43
|
+
applicationPasswords: ApplicationPasswordsCrud;
|
|
42
44
|
blog: BlogCrud;
|
|
43
45
|
comment: CommentCrud;
|
|
44
46
|
meta: MetaCrud;
|
|
@@ -97,6 +99,26 @@ export type BlogParams<T extends BlogOperations> = {
|
|
|
97
99
|
delete: Parameters<BlogCrud["delete"]>;
|
|
98
100
|
}[T];
|
|
99
101
|
|
|
102
|
+
export type ApplicationPasswordsOperations = Extract<
|
|
103
|
+
Operation,
|
|
104
|
+
"get" | "list" | "update" | "create" | "delete"
|
|
105
|
+
>;
|
|
106
|
+
|
|
107
|
+
export type ApplicationPasswordsParams<
|
|
108
|
+
T extends ApplicationPasswordsOperations
|
|
109
|
+
> = {
|
|
110
|
+
get: Parameters<ApplicationPasswordsCrud["get"]>;
|
|
111
|
+
update: Parameters<ApplicationPasswordsCrud["update"]>;
|
|
112
|
+
list: Parameters<ApplicationPasswordsCrud["list"]>;
|
|
113
|
+
create: Parameters<ApplicationPasswordsCrud["create"]>;
|
|
114
|
+
delete: Parameters<ApplicationPasswordsCrud["delete"]>;
|
|
115
|
+
}[T];
|
|
116
|
+
|
|
117
|
+
export type SettingsParams<T extends SettingsOperations> = {
|
|
118
|
+
get: Parameters<SettingsCrud["get"]>;
|
|
119
|
+
update: Parameters<SettingsCrud["update"]>;
|
|
120
|
+
}[T];
|
|
121
|
+
|
|
100
122
|
export type CommentOperations = Operation;
|
|
101
123
|
|
|
102
124
|
export type CommentParams<T extends CommentOperations> = {
|