@constructive-sdk/cli 0.3.0 → 0.7.0
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/admin/cli/commands/app-admin-grant.js +2 -2
- package/admin/cli/commands/app-grant.js +2 -2
- package/admin/cli/commands/app-membership-default.js +4 -4
- package/admin/cli/commands/app-membership.js +14 -14
- package/admin/cli/commands/app-owner-grant.js +2 -2
- package/admin/cli/commands/claimed-invite.js +2 -2
- package/admin/cli/commands/invite.js +6 -6
- package/admin/cli/commands/org-admin-grant.js +2 -2
- package/admin/cli/commands/org-chart-edge-grant.js +2 -2
- package/admin/cli/commands/org-claimed-invite.js +2 -2
- package/admin/cli/commands/org-grant.js +2 -2
- package/admin/cli/commands/org-invite.js +6 -6
- package/admin/cli/commands/org-member.js +2 -2
- package/admin/cli/commands/org-membership-default.js +6 -6
- package/admin/cli/commands/org-membership.js +12 -12
- package/admin/cli/commands/org-owner-grant.js +2 -2
- package/admin/cli/commands/submit-invite-code.js +1 -1
- package/admin/cli/commands/submit-org-invite-code.js +1 -1
- package/admin/cli/index.js +2 -2
- package/admin/cli/utils.d.ts +13 -0
- package/admin/cli/utils.js +25 -0
- package/admin/orm/input-types.d.ts +7 -280
- package/admin/orm/query-builder.d.ts +6 -4
- package/admin/orm/query-builder.js +13 -3
- package/admin/orm/select-types.d.ts +4 -2
- package/auth/cli/commands/audit-log.js +2 -2
- package/auth/cli/commands/check-password.js +1 -1
- package/auth/cli/commands/confirm-delete-account.js +1 -1
- package/auth/cli/commands/connected-account.js +4 -4
- package/auth/cli/commands/crypto-address.js +4 -4
- package/auth/cli/commands/email.js +4 -4
- package/auth/cli/commands/extend-token-expires.js +1 -1
- package/auth/cli/commands/forgot-password.js +1 -1
- package/auth/cli/commands/one-time-token.js +1 -1
- package/auth/cli/commands/phone-number.js +4 -4
- package/auth/cli/commands/reset-password.js +1 -1
- package/auth/cli/commands/send-account-deletion-email.js +1 -1
- package/auth/cli/commands/send-verification-email.js +1 -1
- package/auth/cli/commands/set-password.js +1 -1
- package/auth/cli/commands/sign-in-one-time-token.js +1 -1
- package/auth/cli/commands/sign-in.js +1 -1
- package/auth/cli/commands/sign-out.js +1 -1
- package/auth/cli/commands/sign-up.js +1 -1
- package/auth/cli/commands/verify-email.js +1 -1
- package/auth/cli/commands/verify-password.js +1 -1
- package/auth/cli/commands/verify-totp.js +1 -1
- package/auth/cli/index.js +2 -2
- package/auth/cli/utils.d.ts +13 -0
- package/auth/cli/utils.js +25 -0
- package/auth/orm/input-types.d.ts +7 -63
- package/auth/orm/query-builder.d.ts +6 -4
- package/auth/orm/query-builder.js +13 -3
- package/auth/orm/select-types.d.ts +4 -2
- package/esm/admin/cli/commands/app-admin-grant.js +2 -2
- package/esm/admin/cli/commands/app-grant.js +2 -2
- package/esm/admin/cli/commands/app-membership-default.js +4 -4
- package/esm/admin/cli/commands/app-membership.js +14 -14
- package/esm/admin/cli/commands/app-owner-grant.js +2 -2
- package/esm/admin/cli/commands/claimed-invite.js +2 -2
- package/esm/admin/cli/commands/invite.js +6 -6
- package/esm/admin/cli/commands/org-admin-grant.js +2 -2
- package/esm/admin/cli/commands/org-chart-edge-grant.js +2 -2
- package/esm/admin/cli/commands/org-claimed-invite.js +2 -2
- package/esm/admin/cli/commands/org-grant.js +2 -2
- package/esm/admin/cli/commands/org-invite.js +6 -6
- package/esm/admin/cli/commands/org-member.js +2 -2
- package/esm/admin/cli/commands/org-membership-default.js +6 -6
- package/esm/admin/cli/commands/org-membership.js +12 -12
- package/esm/admin/cli/commands/org-owner-grant.js +2 -2
- package/esm/admin/cli/commands/submit-invite-code.js +2 -2
- package/esm/admin/cli/commands/submit-org-invite-code.js +2 -2
- package/esm/admin/cli/index.js +2 -2
- package/esm/admin/cli/utils.d.ts +13 -0
- package/esm/admin/cli/utils.js +24 -0
- package/esm/admin/orm/input-types.d.ts +7 -280
- package/esm/admin/orm/query-builder.d.ts +6 -4
- package/esm/admin/orm/query-builder.js +13 -3
- package/esm/admin/orm/select-types.d.ts +4 -2
- package/esm/auth/cli/commands/audit-log.js +2 -2
- package/esm/auth/cli/commands/check-password.js +2 -2
- package/esm/auth/cli/commands/confirm-delete-account.js +2 -2
- package/esm/auth/cli/commands/connected-account.js +4 -4
- package/esm/auth/cli/commands/crypto-address.js +4 -4
- package/esm/auth/cli/commands/email.js +4 -4
- package/esm/auth/cli/commands/extend-token-expires.js +2 -2
- package/esm/auth/cli/commands/forgot-password.js +2 -2
- package/esm/auth/cli/commands/one-time-token.js +2 -2
- package/esm/auth/cli/commands/phone-number.js +4 -4
- package/esm/auth/cli/commands/reset-password.js +2 -2
- package/esm/auth/cli/commands/send-account-deletion-email.js +2 -2
- package/esm/auth/cli/commands/send-verification-email.js +2 -2
- package/esm/auth/cli/commands/set-password.js +2 -2
- package/esm/auth/cli/commands/sign-in-one-time-token.js +2 -2
- package/esm/auth/cli/commands/sign-in.js +2 -2
- package/esm/auth/cli/commands/sign-out.js +2 -2
- package/esm/auth/cli/commands/sign-up.js +2 -2
- package/esm/auth/cli/commands/verify-email.js +2 -2
- package/esm/auth/cli/commands/verify-password.js +2 -2
- package/esm/auth/cli/commands/verify-totp.js +2 -2
- package/esm/auth/cli/index.js +2 -2
- package/esm/auth/cli/utils.d.ts +13 -0
- package/esm/auth/cli/utils.js +24 -0
- package/esm/auth/orm/input-types.d.ts +7 -63
- package/esm/auth/orm/query-builder.d.ts +6 -4
- package/esm/auth/orm/query-builder.js +13 -3
- package/esm/auth/orm/select-types.d.ts +4 -2
- package/esm/objects/cli/commands/freeze-objects.js +2 -2
- package/esm/objects/cli/commands/get-all-record.js +1 -1
- package/esm/objects/cli/commands/init-empty-repo.js +2 -2
- package/esm/objects/cli/commands/insert-node-at-path.js +2 -2
- package/esm/objects/cli/commands/object.js +4 -4
- package/esm/objects/cli/commands/remove-node-at-path.js +2 -2
- package/esm/objects/cli/commands/set-and-commit.js +2 -2
- package/esm/objects/cli/commands/set-data-at-path.js +2 -2
- package/esm/objects/cli/commands/set-props-and-commit.js +2 -2
- package/esm/objects/cli/commands/update-node-at-path.js +2 -2
- package/esm/objects/cli/index.js +2 -2
- package/esm/objects/cli/utils.d.ts +13 -0
- package/esm/objects/cli/utils.js +24 -0
- package/esm/objects/orm/input-types.d.ts +7 -39
- package/esm/objects/orm/query-builder.d.ts +6 -4
- package/esm/objects/orm/query-builder.js +13 -3
- package/esm/objects/orm/select-types.d.ts +4 -2
- package/esm/public/cli/commands/api-module.js +2 -2
- package/esm/public/cli/commands/api.js +2 -2
- package/esm/public/cli/commands/app-admin-grant.js +2 -2
- package/esm/public/cli/commands/app-grant.js +2 -2
- package/esm/public/cli/commands/app-membership-default.js +4 -4
- package/esm/public/cli/commands/app-membership.js +14 -14
- package/esm/public/cli/commands/app-owner-grant.js +2 -2
- package/esm/public/cli/commands/apply-rls.js +2 -2
- package/esm/public/cli/commands/ast-migration.js +4 -4
- package/esm/public/cli/commands/audit-log.js +2 -2
- package/esm/public/cli/commands/bootstrap-user.js +2 -2
- package/esm/public/cli/commands/check-constraint.js +4 -4
- package/esm/public/cli/commands/check-password.js +2 -2
- package/esm/public/cli/commands/claimed-invite.js +2 -2
- package/esm/public/cli/commands/confirm-delete-account.js +2 -2
- package/esm/public/cli/commands/connected-account.js +4 -4
- package/esm/public/cli/commands/create-user-database.js +2 -2
- package/esm/public/cli/commands/crypto-address.js +4 -4
- package/esm/public/cli/commands/database-provision-module.js +4 -4
- package/esm/public/cli/commands/default-privilege.js +2 -2
- package/esm/public/cli/commands/denormalized-table-field.js +4 -4
- package/esm/public/cli/commands/email.js +4 -4
- package/esm/public/cli/commands/extend-token-expires.js +2 -2
- package/esm/public/cli/commands/field-module.js +2 -2
- package/esm/public/cli/commands/field.js +12 -12
- package/esm/public/cli/commands/foreign-key-constraint.js +2 -2
- package/esm/public/cli/commands/forgot-password.js +2 -2
- package/esm/public/cli/commands/freeze-objects.js +2 -2
- package/esm/public/cli/commands/get-all-record.js +1 -1
- package/esm/public/cli/commands/index.js +8 -8
- package/esm/public/cli/commands/init-empty-repo.js +2 -2
- package/esm/public/cli/commands/insert-node-at-path.js +2 -2
- package/esm/public/cli/commands/invite.js +6 -6
- package/esm/public/cli/commands/node-type-registry.js +2 -2
- package/esm/public/cli/commands/object.js +4 -4
- package/esm/public/cli/commands/one-time-token.js +2 -2
- package/esm/public/cli/commands/org-admin-grant.js +2 -2
- package/esm/public/cli/commands/org-chart-edge-grant.js +2 -2
- package/esm/public/cli/commands/org-claimed-invite.js +2 -2
- package/esm/public/cli/commands/org-grant.js +2 -2
- package/esm/public/cli/commands/org-invite.js +6 -6
- package/esm/public/cli/commands/org-member.js +2 -2
- package/esm/public/cli/commands/org-membership-default.js +6 -6
- package/esm/public/cli/commands/org-membership.js +12 -12
- package/esm/public/cli/commands/org-owner-grant.js +2 -2
- package/esm/public/cli/commands/phone-number.js +4 -4
- package/esm/public/cli/commands/policy.js +8 -8
- package/esm/public/cli/commands/primary-key-constraint.js +2 -2
- package/esm/public/cli/commands/provision-database-with-user.js +2 -2
- package/esm/public/cli/commands/relation-provision.js +12 -12
- package/esm/public/cli/commands/remove-node-at-path.js +2 -2
- package/esm/public/cli/commands/reset-password.js +2 -2
- package/esm/public/cli/commands/schema.js +4 -4
- package/esm/public/cli/commands/secure-table-provision.js +10 -10
- package/esm/public/cli/commands/send-account-deletion-email.js +2 -2
- package/esm/public/cli/commands/send-verification-email.js +2 -2
- package/esm/public/cli/commands/set-and-commit.js +2 -2
- package/esm/public/cli/commands/set-data-at-path.js +2 -2
- package/esm/public/cli/commands/set-field-order.js +2 -2
- package/esm/public/cli/commands/set-password.js +2 -2
- package/esm/public/cli/commands/set-props-and-commit.js +2 -2
- package/esm/public/cli/commands/sign-in-one-time-token.js +2 -2
- package/esm/public/cli/commands/sign-in.js +2 -2
- package/esm/public/cli/commands/sign-out.js +2 -2
- package/esm/public/cli/commands/sign-up.js +2 -2
- package/esm/public/cli/commands/site-module.js +2 -2
- package/esm/public/cli/commands/site-theme.js +2 -2
- package/esm/public/cli/commands/sql-migration.js +1 -1
- package/esm/public/cli/commands/submit-invite-code.js +2 -2
- package/esm/public/cli/commands/submit-org-invite-code.js +2 -2
- package/esm/public/cli/commands/table-grant.js +2 -2
- package/esm/public/cli/commands/table-module.js +4 -4
- package/esm/public/cli/commands/table-template-module.js +2 -2
- package/esm/public/cli/commands/table.js +8 -8
- package/esm/public/cli/commands/trigger.js +2 -2
- package/esm/public/cli/commands/unique-constraint.js +2 -2
- package/esm/public/cli/commands/update-node-at-path.js +2 -2
- package/esm/public/cli/commands/verify-email.js +2 -2
- package/esm/public/cli/commands/verify-password.js +2 -2
- package/esm/public/cli/commands/verify-totp.js +2 -2
- package/esm/public/cli/commands/view-grant.js +4 -4
- package/esm/public/cli/commands/view.js +10 -10
- package/esm/public/cli/index.js +2 -2
- package/esm/public/cli/utils.d.ts +13 -0
- package/esm/public/cli/utils.js +24 -0
- package/esm/public/orm/input-types.d.ts +7 -1196
- package/esm/public/orm/query-builder.d.ts +6 -4
- package/esm/public/orm/query-builder.js +13 -3
- package/esm/public/orm/select-types.d.ts +4 -2
- package/objects/cli/commands/freeze-objects.js +1 -1
- package/objects/cli/commands/get-all-record.js +1 -1
- package/objects/cli/commands/init-empty-repo.js +1 -1
- package/objects/cli/commands/insert-node-at-path.js +1 -1
- package/objects/cli/commands/object.js +4 -4
- package/objects/cli/commands/remove-node-at-path.js +1 -1
- package/objects/cli/commands/set-and-commit.js +1 -1
- package/objects/cli/commands/set-data-at-path.js +1 -1
- package/objects/cli/commands/set-props-and-commit.js +1 -1
- package/objects/cli/commands/update-node-at-path.js +1 -1
- package/objects/cli/index.js +2 -2
- package/objects/cli/utils.d.ts +13 -0
- package/objects/cli/utils.js +25 -0
- package/objects/orm/input-types.d.ts +7 -39
- package/objects/orm/query-builder.d.ts +6 -4
- package/objects/orm/query-builder.js +13 -3
- package/objects/orm/select-types.d.ts +4 -2
- package/package.json +6 -6
- package/public/cli/commands/api-module.js +2 -2
- package/public/cli/commands/api.js +2 -2
- package/public/cli/commands/app-admin-grant.js +2 -2
- package/public/cli/commands/app-grant.js +2 -2
- package/public/cli/commands/app-membership-default.js +4 -4
- package/public/cli/commands/app-membership.js +14 -14
- package/public/cli/commands/app-owner-grant.js +2 -2
- package/public/cli/commands/apply-rls.js +1 -1
- package/public/cli/commands/ast-migration.js +4 -4
- package/public/cli/commands/audit-log.js +2 -2
- package/public/cli/commands/bootstrap-user.js +1 -1
- package/public/cli/commands/check-constraint.js +4 -4
- package/public/cli/commands/check-password.js +1 -1
- package/public/cli/commands/claimed-invite.js +2 -2
- package/public/cli/commands/confirm-delete-account.js +1 -1
- package/public/cli/commands/connected-account.js +4 -4
- package/public/cli/commands/create-user-database.js +1 -1
- package/public/cli/commands/crypto-address.js +4 -4
- package/public/cli/commands/database-provision-module.js +4 -4
- package/public/cli/commands/default-privilege.js +2 -2
- package/public/cli/commands/denormalized-table-field.js +4 -4
- package/public/cli/commands/email.js +4 -4
- package/public/cli/commands/extend-token-expires.js +1 -1
- package/public/cli/commands/field-module.js +2 -2
- package/public/cli/commands/field.js +12 -12
- package/public/cli/commands/foreign-key-constraint.js +2 -2
- package/public/cli/commands/forgot-password.js +1 -1
- package/public/cli/commands/freeze-objects.js +1 -1
- package/public/cli/commands/get-all-record.js +1 -1
- package/public/cli/commands/index.js +8 -8
- package/public/cli/commands/init-empty-repo.js +1 -1
- package/public/cli/commands/insert-node-at-path.js +1 -1
- package/public/cli/commands/invite.js +6 -6
- package/public/cli/commands/node-type-registry.js +2 -2
- package/public/cli/commands/object.js +4 -4
- package/public/cli/commands/one-time-token.js +1 -1
- package/public/cli/commands/org-admin-grant.js +2 -2
- package/public/cli/commands/org-chart-edge-grant.js +2 -2
- package/public/cli/commands/org-claimed-invite.js +2 -2
- package/public/cli/commands/org-grant.js +2 -2
- package/public/cli/commands/org-invite.js +6 -6
- package/public/cli/commands/org-member.js +2 -2
- package/public/cli/commands/org-membership-default.js +6 -6
- package/public/cli/commands/org-membership.js +12 -12
- package/public/cli/commands/org-owner-grant.js +2 -2
- package/public/cli/commands/phone-number.js +4 -4
- package/public/cli/commands/policy.js +8 -8
- package/public/cli/commands/primary-key-constraint.js +2 -2
- package/public/cli/commands/provision-database-with-user.js +1 -1
- package/public/cli/commands/relation-provision.js +12 -12
- package/public/cli/commands/remove-node-at-path.js +1 -1
- package/public/cli/commands/reset-password.js +1 -1
- package/public/cli/commands/schema.js +4 -4
- package/public/cli/commands/secure-table-provision.js +10 -10
- package/public/cli/commands/send-account-deletion-email.js +1 -1
- package/public/cli/commands/send-verification-email.js +1 -1
- package/public/cli/commands/set-and-commit.js +1 -1
- package/public/cli/commands/set-data-at-path.js +1 -1
- package/public/cli/commands/set-field-order.js +1 -1
- package/public/cli/commands/set-password.js +1 -1
- package/public/cli/commands/set-props-and-commit.js +1 -1
- package/public/cli/commands/sign-in-one-time-token.js +1 -1
- package/public/cli/commands/sign-in.js +1 -1
- package/public/cli/commands/sign-out.js +1 -1
- package/public/cli/commands/sign-up.js +1 -1
- package/public/cli/commands/site-module.js +2 -2
- package/public/cli/commands/site-theme.js +2 -2
- package/public/cli/commands/sql-migration.js +1 -1
- package/public/cli/commands/submit-invite-code.js +1 -1
- package/public/cli/commands/submit-org-invite-code.js +1 -1
- package/public/cli/commands/table-grant.js +2 -2
- package/public/cli/commands/table-module.js +4 -4
- package/public/cli/commands/table-template-module.js +2 -2
- package/public/cli/commands/table.js +8 -8
- package/public/cli/commands/trigger.js +2 -2
- package/public/cli/commands/unique-constraint.js +2 -2
- package/public/cli/commands/update-node-at-path.js +1 -1
- package/public/cli/commands/verify-email.js +1 -1
- package/public/cli/commands/verify-password.js +1 -1
- package/public/cli/commands/verify-totp.js +1 -1
- package/public/cli/commands/view-grant.js +4 -4
- package/public/cli/commands/view.js +10 -10
- package/public/cli/index.js +2 -2
- package/public/cli/utils.d.ts +13 -0
- package/public/cli/utils.js +25 -0
- package/public/orm/input-types.d.ts +7 -1196
- package/public/orm/query-builder.d.ts +6 -4
- package/public/orm/query-builder.js +13 -3
- package/public/orm/select-types.d.ts +4 -2
|
@@ -34,21 +34,23 @@ export declare class QueryBuilder<TResult> {
|
|
|
34
34
|
getVariables(): Record<string, unknown> | undefined;
|
|
35
35
|
}
|
|
36
36
|
export declare function buildSelections(select: Record<string, unknown> | undefined, connectionFieldsMap?: Record<string, Record<string, string>>, entityType?: string): FieldNode[];
|
|
37
|
-
export declare function buildFindManyDocument<TSelect, TWhere>(operationName: string, queryField: string, select: TSelect, args: {
|
|
37
|
+
export declare function buildFindManyDocument<TSelect, TWhere, TCondition = never>(operationName: string, queryField: string, select: TSelect, args: {
|
|
38
38
|
where?: TWhere;
|
|
39
|
+
condition?: TCondition;
|
|
39
40
|
orderBy?: string[];
|
|
40
41
|
first?: number;
|
|
41
42
|
last?: number;
|
|
42
43
|
after?: string;
|
|
43
44
|
before?: string;
|
|
44
45
|
offset?: number;
|
|
45
|
-
}, filterTypeName: string, orderByTypeName: string, connectionFieldsMap?: Record<string, Record<string, string
|
|
46
|
+
}, filterTypeName: string, orderByTypeName: string, connectionFieldsMap?: Record<string, Record<string, string>>, conditionTypeName?: string): {
|
|
46
47
|
document: string;
|
|
47
48
|
variables: Record<string, unknown>;
|
|
48
49
|
};
|
|
49
|
-
export declare function buildFindFirstDocument<TSelect, TWhere>(operationName: string, queryField: string, select: TSelect, args: {
|
|
50
|
+
export declare function buildFindFirstDocument<TSelect, TWhere, TCondition = never>(operationName: string, queryField: string, select: TSelect, args: {
|
|
50
51
|
where?: TWhere;
|
|
51
|
-
|
|
52
|
+
condition?: TCondition;
|
|
53
|
+
}, filterTypeName: string, connectionFieldsMap?: Record<string, Record<string, string>>, conditionTypeName?: string): {
|
|
52
54
|
document: string;
|
|
53
55
|
variables: Record<string, unknown>;
|
|
54
56
|
};
|
|
@@ -131,13 +131,18 @@ export function buildSelections(select, connectionFieldsMap, entityType) {
|
|
|
131
131
|
// ============================================================================
|
|
132
132
|
// Document Builders
|
|
133
133
|
// ============================================================================
|
|
134
|
-
export function buildFindManyDocument(operationName, queryField, select, args, filterTypeName, orderByTypeName, connectionFieldsMap) {
|
|
134
|
+
export function buildFindManyDocument(operationName, queryField, select, args, filterTypeName, orderByTypeName, connectionFieldsMap, conditionTypeName) {
|
|
135
135
|
const selections = select
|
|
136
136
|
? buildSelections(select, connectionFieldsMap, operationName)
|
|
137
137
|
: [t.field({ name: 'id' })];
|
|
138
138
|
const variableDefinitions = [];
|
|
139
139
|
const queryArgs = [];
|
|
140
140
|
const variables = {};
|
|
141
|
+
addVariable({
|
|
142
|
+
varName: 'condition',
|
|
143
|
+
typeName: conditionTypeName,
|
|
144
|
+
value: args.condition,
|
|
145
|
+
}, variableDefinitions, queryArgs, variables);
|
|
141
146
|
addVariable({
|
|
142
147
|
varName: 'where',
|
|
143
148
|
argName: 'filter',
|
|
@@ -176,7 +181,7 @@ export function buildFindManyDocument(operationName, queryField, select, args, f
|
|
|
176
181
|
});
|
|
177
182
|
return { document: print(document), variables };
|
|
178
183
|
}
|
|
179
|
-
export function buildFindFirstDocument(operationName, queryField, select, args, filterTypeName, connectionFieldsMap) {
|
|
184
|
+
export function buildFindFirstDocument(operationName, queryField, select, args, filterTypeName, connectionFieldsMap, conditionTypeName) {
|
|
180
185
|
const selections = select
|
|
181
186
|
? buildSelections(select, connectionFieldsMap, operationName)
|
|
182
187
|
: [t.field({ name: 'id' })];
|
|
@@ -185,6 +190,11 @@ export function buildFindFirstDocument(operationName, queryField, select, args,
|
|
|
185
190
|
const variables = {};
|
|
186
191
|
// Always add first: 1 for findFirst
|
|
187
192
|
addVariable({ varName: 'first', typeName: 'Int', value: 1 }, variableDefinitions, queryArgs, variables);
|
|
193
|
+
addVariable({
|
|
194
|
+
varName: 'condition',
|
|
195
|
+
typeName: conditionTypeName,
|
|
196
|
+
value: args.condition,
|
|
197
|
+
}, variableDefinitions, queryArgs, variables);
|
|
188
198
|
addVariable({
|
|
189
199
|
varName: 'where',
|
|
190
200
|
argName: 'filter',
|
|
@@ -519,7 +529,7 @@ function buildInputMutationDocument(config) {
|
|
|
519
529
|
return print(document);
|
|
520
530
|
}
|
|
521
531
|
function addVariable(spec, definitions, args, variables) {
|
|
522
|
-
if (spec.value === undefined)
|
|
532
|
+
if (spec.value === undefined || !spec.typeName)
|
|
523
533
|
return;
|
|
524
534
|
definitions.push(t.variableDefinition({
|
|
525
535
|
variable: t.variable({ name: spec.varName }),
|
|
@@ -14,9 +14,10 @@ export interface PageInfo {
|
|
|
14
14
|
startCursor?: string | null;
|
|
15
15
|
endCursor?: string | null;
|
|
16
16
|
}
|
|
17
|
-
export interface FindManyArgs<TSelect, TWhere, TOrderBy> {
|
|
17
|
+
export interface FindManyArgs<TSelect, TWhere, TCondition = never, TOrderBy = never> {
|
|
18
18
|
select?: TSelect;
|
|
19
19
|
where?: TWhere;
|
|
20
|
+
condition?: TCondition;
|
|
20
21
|
orderBy?: TOrderBy[];
|
|
21
22
|
first?: number;
|
|
22
23
|
last?: number;
|
|
@@ -24,9 +25,10 @@ export interface FindManyArgs<TSelect, TWhere, TOrderBy> {
|
|
|
24
25
|
before?: string;
|
|
25
26
|
offset?: number;
|
|
26
27
|
}
|
|
27
|
-
export interface FindFirstArgs<TSelect, TWhere> {
|
|
28
|
+
export interface FindFirstArgs<TSelect, TWhere, TCondition = never> {
|
|
28
29
|
select?: TSelect;
|
|
29
30
|
where?: TWhere;
|
|
31
|
+
condition?: TCondition;
|
|
30
32
|
}
|
|
31
33
|
export interface CreateArgs<TSelect, TData> {
|
|
32
34
|
data: TData;
|
|
@@ -17,7 +17,7 @@ exports.default = async (argv, prompter, _options) => {
|
|
|
17
17
|
},
|
|
18
18
|
]);
|
|
19
19
|
const client = (0, executor_1.getClient)();
|
|
20
|
-
const parsedAnswers = (0, utils_1.
|
|
20
|
+
const parsedAnswers = (0, utils_1.unflattenDotNotation)(answers);
|
|
21
21
|
const selectFields = (0, utils_1.buildSelectFromPaths)(argv.select ?? 'clientMutationId');
|
|
22
22
|
const result = await client.mutation
|
|
23
23
|
.freezeObjects(parsedAnswers, {
|
|
@@ -17,7 +17,7 @@ exports.default = async (argv, prompter, _options) => {
|
|
|
17
17
|
},
|
|
18
18
|
]);
|
|
19
19
|
const client = (0, executor_1.getClient)();
|
|
20
|
-
const parsedAnswers = (0, utils_1.
|
|
20
|
+
const parsedAnswers = (0, utils_1.unflattenDotNotation)(answers);
|
|
21
21
|
const selectFields = (0, utils_1.buildSelectFromPaths)(argv.select ?? 'clientMutationId');
|
|
22
22
|
const result = await client.mutation
|
|
23
23
|
.initEmptyRepo(parsedAnswers, {
|
|
@@ -17,7 +17,7 @@ exports.default = async (argv, prompter, _options) => {
|
|
|
17
17
|
},
|
|
18
18
|
]);
|
|
19
19
|
const client = (0, executor_1.getClient)();
|
|
20
|
-
const parsedAnswers = (0, utils_1.
|
|
20
|
+
const parsedAnswers = (0, utils_1.unflattenDotNotation)(answers);
|
|
21
21
|
const selectFields = (0, utils_1.buildSelectFromPaths)(argv.select ?? 'clientMutationId');
|
|
22
22
|
const result = await client.mutation
|
|
23
23
|
.insertNodeAtPath(parsedAnswers, {
|
|
@@ -142,14 +142,14 @@ async function handleCreate(argv, prompter) {
|
|
|
142
142
|
skipPrompt: true,
|
|
143
143
|
},
|
|
144
144
|
{
|
|
145
|
-
type: '
|
|
145
|
+
type: 'json',
|
|
146
146
|
name: 'data',
|
|
147
147
|
message: 'data',
|
|
148
148
|
required: false,
|
|
149
149
|
skipPrompt: true,
|
|
150
150
|
},
|
|
151
151
|
{
|
|
152
|
-
type: '
|
|
152
|
+
type: 'boolean',
|
|
153
153
|
name: 'frzn',
|
|
154
154
|
message: 'frzn',
|
|
155
155
|
required: false,
|
|
@@ -220,14 +220,14 @@ async function handleUpdate(argv, prompter) {
|
|
|
220
220
|
skipPrompt: true,
|
|
221
221
|
},
|
|
222
222
|
{
|
|
223
|
-
type: '
|
|
223
|
+
type: 'json',
|
|
224
224
|
name: 'data',
|
|
225
225
|
message: 'data',
|
|
226
226
|
required: false,
|
|
227
227
|
skipPrompt: true,
|
|
228
228
|
},
|
|
229
229
|
{
|
|
230
|
-
type: '
|
|
230
|
+
type: 'boolean',
|
|
231
231
|
name: 'frzn',
|
|
232
232
|
message: 'frzn',
|
|
233
233
|
required: false,
|
|
@@ -17,7 +17,7 @@ exports.default = async (argv, prompter, _options) => {
|
|
|
17
17
|
},
|
|
18
18
|
]);
|
|
19
19
|
const client = (0, executor_1.getClient)();
|
|
20
|
-
const parsedAnswers = (0, utils_1.
|
|
20
|
+
const parsedAnswers = (0, utils_1.unflattenDotNotation)(answers);
|
|
21
21
|
const selectFields = (0, utils_1.buildSelectFromPaths)(argv.select ?? 'clientMutationId');
|
|
22
22
|
const result = await client.mutation
|
|
23
23
|
.removeNodeAtPath(parsedAnswers, {
|
|
@@ -17,7 +17,7 @@ exports.default = async (argv, prompter, _options) => {
|
|
|
17
17
|
},
|
|
18
18
|
]);
|
|
19
19
|
const client = (0, executor_1.getClient)();
|
|
20
|
-
const parsedAnswers = (0, utils_1.
|
|
20
|
+
const parsedAnswers = (0, utils_1.unflattenDotNotation)(answers);
|
|
21
21
|
const selectFields = (0, utils_1.buildSelectFromPaths)(argv.select ?? 'clientMutationId');
|
|
22
22
|
const result = await client.mutation
|
|
23
23
|
.setAndCommit(parsedAnswers, {
|
|
@@ -17,7 +17,7 @@ exports.default = async (argv, prompter, _options) => {
|
|
|
17
17
|
},
|
|
18
18
|
]);
|
|
19
19
|
const client = (0, executor_1.getClient)();
|
|
20
|
-
const parsedAnswers = (0, utils_1.
|
|
20
|
+
const parsedAnswers = (0, utils_1.unflattenDotNotation)(answers);
|
|
21
21
|
const selectFields = (0, utils_1.buildSelectFromPaths)(argv.select ?? 'clientMutationId');
|
|
22
22
|
const result = await client.mutation
|
|
23
23
|
.setDataAtPath(parsedAnswers, {
|
|
@@ -17,7 +17,7 @@ exports.default = async (argv, prompter, _options) => {
|
|
|
17
17
|
},
|
|
18
18
|
]);
|
|
19
19
|
const client = (0, executor_1.getClient)();
|
|
20
|
-
const parsedAnswers = (0, utils_1.
|
|
20
|
+
const parsedAnswers = (0, utils_1.unflattenDotNotation)(answers);
|
|
21
21
|
const selectFields = (0, utils_1.buildSelectFromPaths)(argv.select ?? 'clientMutationId');
|
|
22
22
|
const result = await client.mutation
|
|
23
23
|
.setPropsAndCommit(parsedAnswers, {
|
|
@@ -17,7 +17,7 @@ exports.default = async (argv, prompter, _options) => {
|
|
|
17
17
|
},
|
|
18
18
|
]);
|
|
19
19
|
const client = (0, executor_1.getClient)();
|
|
20
|
-
const parsedAnswers = (0, utils_1.
|
|
20
|
+
const parsedAnswers = (0, utils_1.unflattenDotNotation)(answers);
|
|
21
21
|
const selectFields = (0, utils_1.buildSelectFromPaths)(argv.select ?? 'clientMutationId');
|
|
22
22
|
const result = await client.mutation
|
|
23
23
|
.updateNodeAtPath(parsedAnswers, {
|
package/objects/cli/index.js
CHANGED
|
@@ -12,9 +12,9 @@ if (process.argv.includes('--version') || process.argv.includes('-v')) {
|
|
|
12
12
|
console.log(pkg.version);
|
|
13
13
|
process.exit(0);
|
|
14
14
|
}
|
|
15
|
-
// Check for --tty false to enable non-interactive mode (noTty)
|
|
15
|
+
// Check for --tty false or --no-tty to enable non-interactive mode (noTty)
|
|
16
16
|
const ttyIdx = process.argv.indexOf('--tty');
|
|
17
|
-
const noTty = ttyIdx !== -1 && process.argv[ttyIdx + 1] === 'false';
|
|
17
|
+
const noTty = (ttyIdx !== -1 && process.argv[ttyIdx + 1] === 'false') || process.argv.includes('--no-tty');
|
|
18
18
|
const options = {
|
|
19
19
|
noTty,
|
|
20
20
|
minimistOpts: { alias: { v: 'version', h: 'help' } },
|
package/objects/cli/utils.d.ts
CHANGED
|
@@ -20,6 +20,19 @@ export declare function stripUndefined(obj: Record<string, unknown>, schema?: Fi
|
|
|
20
20
|
* from the CLI prompt. This parses it into a proper object.
|
|
21
21
|
*/
|
|
22
22
|
export declare function parseMutationInput(answers: Record<string, unknown>): Record<string, unknown>;
|
|
23
|
+
/**
|
|
24
|
+
* Reconstruct nested objects from dot-notation CLI answers.
|
|
25
|
+
* When INPUT_OBJECT args are flattened to dot-notation questions
|
|
26
|
+
* (e.g. `--input.email foo --input.password bar`), this function
|
|
27
|
+
* rebuilds the nested structure expected by the ORM:
|
|
28
|
+
*
|
|
29
|
+
* { 'input.email': 'foo', 'input.password': 'bar' }
|
|
30
|
+
* → { input: { email: 'foo', password: 'bar' } }
|
|
31
|
+
*
|
|
32
|
+
* Non-dotted keys are passed through unchanged.
|
|
33
|
+
* Uses `nested-obj` for safe nested property setting.
|
|
34
|
+
*/
|
|
35
|
+
export declare function unflattenDotNotation(answers: Record<string, unknown>): Record<string, unknown>;
|
|
23
36
|
/**
|
|
24
37
|
* Build a select object from a comma-separated list of dot-notation paths.
|
|
25
38
|
* Uses `nested-obj` to parse paths like 'clientMutationId,result.accessToken,result.userId'
|
package/objects/cli/utils.js
CHANGED
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.coerceAnswers = coerceAnswers;
|
|
7
7
|
exports.stripUndefined = stripUndefined;
|
|
8
8
|
exports.parseMutationInput = parseMutationInput;
|
|
9
|
+
exports.unflattenDotNotation = unflattenDotNotation;
|
|
9
10
|
exports.buildSelectFromPaths = buildSelectFromPaths;
|
|
10
11
|
/**
|
|
11
12
|
* CLI utility functions for type coercion and input handling
|
|
@@ -124,6 +125,30 @@ function parseMutationInput(answers) {
|
|
|
124
125
|
}
|
|
125
126
|
return answers;
|
|
126
127
|
}
|
|
128
|
+
/**
|
|
129
|
+
* Reconstruct nested objects from dot-notation CLI answers.
|
|
130
|
+
* When INPUT_OBJECT args are flattened to dot-notation questions
|
|
131
|
+
* (e.g. `--input.email foo --input.password bar`), this function
|
|
132
|
+
* rebuilds the nested structure expected by the ORM:
|
|
133
|
+
*
|
|
134
|
+
* { 'input.email': 'foo', 'input.password': 'bar' }
|
|
135
|
+
* → { input: { email: 'foo', password: 'bar' } }
|
|
136
|
+
*
|
|
137
|
+
* Non-dotted keys are passed through unchanged.
|
|
138
|
+
* Uses `nested-obj` for safe nested property setting.
|
|
139
|
+
*/
|
|
140
|
+
function unflattenDotNotation(answers) {
|
|
141
|
+
const result = {};
|
|
142
|
+
for (const [key, value] of Object.entries(answers)) {
|
|
143
|
+
if (key.includes('.')) {
|
|
144
|
+
nested_obj_1.default.set(result, key, value);
|
|
145
|
+
}
|
|
146
|
+
else {
|
|
147
|
+
result[key] = value;
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
return result;
|
|
151
|
+
}
|
|
127
152
|
/**
|
|
128
153
|
* Build a select object from a comma-separated list of dot-notation paths.
|
|
129
154
|
* Uses `nested-obj` to parse paths like 'clientMutationId,result.accessToken,result.userId'
|
|
@@ -162,6 +162,13 @@ export interface InternetAddressFilter {
|
|
|
162
162
|
export interface FullTextFilter {
|
|
163
163
|
matches?: string;
|
|
164
164
|
}
|
|
165
|
+
export interface VectorFilter {
|
|
166
|
+
isNull?: boolean;
|
|
167
|
+
equalTo?: number[];
|
|
168
|
+
notEqualTo?: number[];
|
|
169
|
+
distinctFrom?: number[];
|
|
170
|
+
notDistinctFrom?: number[];
|
|
171
|
+
}
|
|
165
172
|
export interface StringListFilter {
|
|
166
173
|
isNull?: boolean;
|
|
167
174
|
equalTo?: string[];
|
|
@@ -396,45 +403,6 @@ export interface CommitFilter {
|
|
|
396
403
|
or?: CommitFilter[];
|
|
397
404
|
not?: CommitFilter;
|
|
398
405
|
}
|
|
399
|
-
export interface GetAllRecordCondition {
|
|
400
|
-
path?: string | null;
|
|
401
|
-
data?: unknown | null;
|
|
402
|
-
}
|
|
403
|
-
export interface ObjectCondition {
|
|
404
|
-
hashUuid?: string | null;
|
|
405
|
-
id?: string | null;
|
|
406
|
-
databaseId?: string | null;
|
|
407
|
-
kids?: string | null;
|
|
408
|
-
ktree?: string | null;
|
|
409
|
-
data?: unknown | null;
|
|
410
|
-
frzn?: boolean | null;
|
|
411
|
-
createdAt?: string | null;
|
|
412
|
-
}
|
|
413
|
-
export interface RefCondition {
|
|
414
|
-
id?: string | null;
|
|
415
|
-
name?: string | null;
|
|
416
|
-
databaseId?: string | null;
|
|
417
|
-
storeId?: string | null;
|
|
418
|
-
commitId?: string | null;
|
|
419
|
-
}
|
|
420
|
-
export interface StoreCondition {
|
|
421
|
-
id?: string | null;
|
|
422
|
-
name?: string | null;
|
|
423
|
-
databaseId?: string | null;
|
|
424
|
-
hash?: string | null;
|
|
425
|
-
createdAt?: string | null;
|
|
426
|
-
}
|
|
427
|
-
export interface CommitCondition {
|
|
428
|
-
id?: string | null;
|
|
429
|
-
message?: string | null;
|
|
430
|
-
databaseId?: string | null;
|
|
431
|
-
storeId?: string | null;
|
|
432
|
-
parentIds?: string | null;
|
|
433
|
-
authorId?: string | null;
|
|
434
|
-
committerId?: string | null;
|
|
435
|
-
treeId?: string | null;
|
|
436
|
-
date?: string | null;
|
|
437
|
-
}
|
|
438
406
|
export type GetAllRecordsOrderBy = 'PRIMARY_KEY_ASC' | 'PRIMARY_KEY_DESC' | 'NATURAL' | 'PATH_ASC' | 'PATH_DESC' | 'DATA_ASC' | 'DATA_DESC';
|
|
439
407
|
export type ObjectOrderBy = 'PRIMARY_KEY_ASC' | 'PRIMARY_KEY_DESC' | 'NATURAL' | 'HASH_UUID_ASC' | 'HASH_UUID_DESC' | 'ID_ASC' | 'ID_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' | 'KIDS_ASC' | 'KIDS_DESC' | 'KTREE_ASC' | 'KTREE_DESC' | 'DATA_ASC' | 'DATA_DESC' | 'FRZN_ASC' | 'FRZN_DESC' | 'CREATED_AT_ASC' | 'CREATED_AT_DESC';
|
|
440
408
|
export type RefOrderBy = 'PRIMARY_KEY_ASC' | 'PRIMARY_KEY_DESC' | 'NATURAL' | 'ID_ASC' | 'ID_DESC' | 'NAME_ASC' | 'NAME_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' | 'STORE_ID_ASC' | 'STORE_ID_DESC' | 'COMMIT_ID_ASC' | 'COMMIT_ID_DESC';
|
|
@@ -34,21 +34,23 @@ export declare class QueryBuilder<TResult> {
|
|
|
34
34
|
getVariables(): Record<string, unknown> | undefined;
|
|
35
35
|
}
|
|
36
36
|
export declare function buildSelections(select: Record<string, unknown> | undefined, connectionFieldsMap?: Record<string, Record<string, string>>, entityType?: string): FieldNode[];
|
|
37
|
-
export declare function buildFindManyDocument<TSelect, TWhere>(operationName: string, queryField: string, select: TSelect, args: {
|
|
37
|
+
export declare function buildFindManyDocument<TSelect, TWhere, TCondition = never>(operationName: string, queryField: string, select: TSelect, args: {
|
|
38
38
|
where?: TWhere;
|
|
39
|
+
condition?: TCondition;
|
|
39
40
|
orderBy?: string[];
|
|
40
41
|
first?: number;
|
|
41
42
|
last?: number;
|
|
42
43
|
after?: string;
|
|
43
44
|
before?: string;
|
|
44
45
|
offset?: number;
|
|
45
|
-
}, filterTypeName: string, orderByTypeName: string, connectionFieldsMap?: Record<string, Record<string, string
|
|
46
|
+
}, filterTypeName: string, orderByTypeName: string, connectionFieldsMap?: Record<string, Record<string, string>>, conditionTypeName?: string): {
|
|
46
47
|
document: string;
|
|
47
48
|
variables: Record<string, unknown>;
|
|
48
49
|
};
|
|
49
|
-
export declare function buildFindFirstDocument<TSelect, TWhere>(operationName: string, queryField: string, select: TSelect, args: {
|
|
50
|
+
export declare function buildFindFirstDocument<TSelect, TWhere, TCondition = never>(operationName: string, queryField: string, select: TSelect, args: {
|
|
50
51
|
where?: TWhere;
|
|
51
|
-
|
|
52
|
+
condition?: TCondition;
|
|
53
|
+
}, filterTypeName: string, connectionFieldsMap?: Record<string, Record<string, string>>, conditionTypeName?: string): {
|
|
52
54
|
document: string;
|
|
53
55
|
variables: Record<string, unknown>;
|
|
54
56
|
};
|
|
@@ -178,13 +178,18 @@ function buildSelections(select, connectionFieldsMap, entityType) {
|
|
|
178
178
|
// ============================================================================
|
|
179
179
|
// Document Builders
|
|
180
180
|
// ============================================================================
|
|
181
|
-
function buildFindManyDocument(operationName, queryField, select, args, filterTypeName, orderByTypeName, connectionFieldsMap) {
|
|
181
|
+
function buildFindManyDocument(operationName, queryField, select, args, filterTypeName, orderByTypeName, connectionFieldsMap, conditionTypeName) {
|
|
182
182
|
const selections = select
|
|
183
183
|
? buildSelections(select, connectionFieldsMap, operationName)
|
|
184
184
|
: [t.field({ name: 'id' })];
|
|
185
185
|
const variableDefinitions = [];
|
|
186
186
|
const queryArgs = [];
|
|
187
187
|
const variables = {};
|
|
188
|
+
addVariable({
|
|
189
|
+
varName: 'condition',
|
|
190
|
+
typeName: conditionTypeName,
|
|
191
|
+
value: args.condition,
|
|
192
|
+
}, variableDefinitions, queryArgs, variables);
|
|
188
193
|
addVariable({
|
|
189
194
|
varName: 'where',
|
|
190
195
|
argName: 'filter',
|
|
@@ -223,7 +228,7 @@ function buildFindManyDocument(operationName, queryField, select, args, filterTy
|
|
|
223
228
|
});
|
|
224
229
|
return { document: (0, graphql_web_1.print)(document), variables };
|
|
225
230
|
}
|
|
226
|
-
function buildFindFirstDocument(operationName, queryField, select, args, filterTypeName, connectionFieldsMap) {
|
|
231
|
+
function buildFindFirstDocument(operationName, queryField, select, args, filterTypeName, connectionFieldsMap, conditionTypeName) {
|
|
227
232
|
const selections = select
|
|
228
233
|
? buildSelections(select, connectionFieldsMap, operationName)
|
|
229
234
|
: [t.field({ name: 'id' })];
|
|
@@ -232,6 +237,11 @@ function buildFindFirstDocument(operationName, queryField, select, args, filterT
|
|
|
232
237
|
const variables = {};
|
|
233
238
|
// Always add first: 1 for findFirst
|
|
234
239
|
addVariable({ varName: 'first', typeName: 'Int', value: 1 }, variableDefinitions, queryArgs, variables);
|
|
240
|
+
addVariable({
|
|
241
|
+
varName: 'condition',
|
|
242
|
+
typeName: conditionTypeName,
|
|
243
|
+
value: args.condition,
|
|
244
|
+
}, variableDefinitions, queryArgs, variables);
|
|
235
245
|
addVariable({
|
|
236
246
|
varName: 'where',
|
|
237
247
|
argName: 'filter',
|
|
@@ -566,7 +576,7 @@ function buildInputMutationDocument(config) {
|
|
|
566
576
|
return (0, graphql_web_1.print)(document);
|
|
567
577
|
}
|
|
568
578
|
function addVariable(spec, definitions, args, variables) {
|
|
569
|
-
if (spec.value === undefined)
|
|
579
|
+
if (spec.value === undefined || !spec.typeName)
|
|
570
580
|
return;
|
|
571
581
|
definitions.push(t.variableDefinition({
|
|
572
582
|
variable: t.variable({ name: spec.varName }),
|
|
@@ -14,9 +14,10 @@ export interface PageInfo {
|
|
|
14
14
|
startCursor?: string | null;
|
|
15
15
|
endCursor?: string | null;
|
|
16
16
|
}
|
|
17
|
-
export interface FindManyArgs<TSelect, TWhere, TOrderBy> {
|
|
17
|
+
export interface FindManyArgs<TSelect, TWhere, TCondition = never, TOrderBy = never> {
|
|
18
18
|
select?: TSelect;
|
|
19
19
|
where?: TWhere;
|
|
20
|
+
condition?: TCondition;
|
|
20
21
|
orderBy?: TOrderBy[];
|
|
21
22
|
first?: number;
|
|
22
23
|
last?: number;
|
|
@@ -24,9 +25,10 @@ export interface FindManyArgs<TSelect, TWhere, TOrderBy> {
|
|
|
24
25
|
before?: string;
|
|
25
26
|
offset?: number;
|
|
26
27
|
}
|
|
27
|
-
export interface FindFirstArgs<TSelect, TWhere> {
|
|
28
|
+
export interface FindFirstArgs<TSelect, TWhere, TCondition = never> {
|
|
28
29
|
select?: TSelect;
|
|
29
30
|
where?: TWhere;
|
|
31
|
+
condition?: TCondition;
|
|
30
32
|
}
|
|
31
33
|
export interface CreateArgs<TSelect, TData> {
|
|
32
34
|
data: TData;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@constructive-sdk/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"author": "Constructive <developers@constructive.io>",
|
|
5
5
|
"description": "Constructive CLI SDK - Auto-generated GraphQL CLI with ORM client, context management, and interactive prompts",
|
|
6
6
|
"main": "index.js",
|
|
@@ -45,20 +45,20 @@
|
|
|
45
45
|
],
|
|
46
46
|
"dependencies": {
|
|
47
47
|
"@0no-co/graphql.web": "^1.1.2",
|
|
48
|
-
"@constructive-io/graphql-types": "^3.
|
|
48
|
+
"@constructive-io/graphql-types": "^3.3.2",
|
|
49
49
|
"appstash": "^0.5.0",
|
|
50
|
-
"gql-ast": "^3.
|
|
50
|
+
"gql-ast": "^3.3.2",
|
|
51
51
|
"graphql": "^16.13.0",
|
|
52
|
-
"inquirerer": "^4.
|
|
52
|
+
"inquirerer": "^4.7.0",
|
|
53
53
|
"nested-obj": "^0.2.1",
|
|
54
54
|
"yanse": "^0.2.1"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
|
-
"@constructive-io/graphql-codegen": "^4.
|
|
57
|
+
"@constructive-io/graphql-codegen": "^4.13.0",
|
|
58
58
|
"@types/node": "^22.19.11",
|
|
59
59
|
"makage": "^0.1.12",
|
|
60
60
|
"tsx": "^4.19.0",
|
|
61
61
|
"typescript": "^5.9.3"
|
|
62
62
|
},
|
|
63
|
-
"gitHead": "
|
|
63
|
+
"gitHead": "67218366027bc6370e07a1b96d8bf25adba18f42"
|
|
64
64
|
}
|
|
@@ -131,7 +131,7 @@ async function handleCreate(argv, prompter) {
|
|
|
131
131
|
required: true,
|
|
132
132
|
},
|
|
133
133
|
{
|
|
134
|
-
type: '
|
|
134
|
+
type: 'json',
|
|
135
135
|
name: 'data',
|
|
136
136
|
message: 'data',
|
|
137
137
|
required: true,
|
|
@@ -195,7 +195,7 @@ async function handleUpdate(argv, prompter) {
|
|
|
195
195
|
required: false,
|
|
196
196
|
},
|
|
197
197
|
{
|
|
198
|
-
type: '
|
|
198
|
+
type: 'json',
|
|
199
199
|
name: 'data',
|
|
200
200
|
message: 'data',
|
|
201
201
|
required: false,
|
|
@@ -152,7 +152,7 @@ async function handleCreate(argv, prompter) {
|
|
|
152
152
|
skipPrompt: true,
|
|
153
153
|
},
|
|
154
154
|
{
|
|
155
|
-
type: '
|
|
155
|
+
type: 'boolean',
|
|
156
156
|
name: 'isPublic',
|
|
157
157
|
message: 'isPublic',
|
|
158
158
|
required: false,
|
|
@@ -236,7 +236,7 @@ async function handleUpdate(argv, prompter) {
|
|
|
236
236
|
skipPrompt: true,
|
|
237
237
|
},
|
|
238
238
|
{
|
|
239
|
-
type: '
|
|
239
|
+
type: 'boolean',
|
|
240
240
|
name: 'isPublic',
|
|
241
241
|
message: 'isPublic',
|
|
242
242
|
required: false,
|
|
@@ -116,7 +116,7 @@ async function handleCreate(argv, prompter) {
|
|
|
116
116
|
try {
|
|
117
117
|
const rawAnswers = await prompter.prompt(argv, [
|
|
118
118
|
{
|
|
119
|
-
type: '
|
|
119
|
+
type: 'boolean',
|
|
120
120
|
name: 'isGrant',
|
|
121
121
|
message: 'isGrant',
|
|
122
122
|
required: false,
|
|
@@ -176,7 +176,7 @@ async function handleUpdate(argv, prompter) {
|
|
|
176
176
|
required: true,
|
|
177
177
|
},
|
|
178
178
|
{
|
|
179
|
-
type: '
|
|
179
|
+
type: 'boolean',
|
|
180
180
|
name: 'isGrant',
|
|
181
181
|
message: 'isGrant',
|
|
182
182
|
required: false,
|
|
@@ -126,7 +126,7 @@ async function handleCreate(argv, prompter) {
|
|
|
126
126
|
skipPrompt: true,
|
|
127
127
|
},
|
|
128
128
|
{
|
|
129
|
-
type: '
|
|
129
|
+
type: 'boolean',
|
|
130
130
|
name: 'isGrant',
|
|
131
131
|
message: 'isGrant',
|
|
132
132
|
required: false,
|
|
@@ -195,7 +195,7 @@ async function handleUpdate(argv, prompter) {
|
|
|
195
195
|
skipPrompt: true,
|
|
196
196
|
},
|
|
197
197
|
{
|
|
198
|
-
type: '
|
|
198
|
+
type: 'boolean',
|
|
199
199
|
name: 'isGrant',
|
|
200
200
|
message: 'isGrant',
|
|
201
201
|
required: false,
|
|
@@ -133,14 +133,14 @@ async function handleCreate(argv, prompter) {
|
|
|
133
133
|
skipPrompt: true,
|
|
134
134
|
},
|
|
135
135
|
{
|
|
136
|
-
type: '
|
|
136
|
+
type: 'boolean',
|
|
137
137
|
name: 'isApproved',
|
|
138
138
|
message: 'isApproved',
|
|
139
139
|
required: false,
|
|
140
140
|
skipPrompt: true,
|
|
141
141
|
},
|
|
142
142
|
{
|
|
143
|
-
type: '
|
|
143
|
+
type: 'boolean',
|
|
144
144
|
name: 'isVerified',
|
|
145
145
|
message: 'isVerified',
|
|
146
146
|
required: false,
|
|
@@ -203,14 +203,14 @@ async function handleUpdate(argv, prompter) {
|
|
|
203
203
|
skipPrompt: true,
|
|
204
204
|
},
|
|
205
205
|
{
|
|
206
|
-
type: '
|
|
206
|
+
type: 'boolean',
|
|
207
207
|
name: 'isApproved',
|
|
208
208
|
message: 'isApproved',
|
|
209
209
|
required: false,
|
|
210
210
|
skipPrompt: true,
|
|
211
211
|
},
|
|
212
212
|
{
|
|
213
|
-
type: '
|
|
213
|
+
type: 'boolean',
|
|
214
214
|
name: 'isVerified',
|
|
215
215
|
message: 'isVerified',
|
|
216
216
|
required: false,
|