@constructive-sdk/cli 0.3.0 → 0.6.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/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/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/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/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/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/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/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/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
|
@@ -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'
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@constructive-sdk/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.2",
|
|
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.12.2",
|
|
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": "4fd2c9be786ad9ae2213453276a69723435d5315"
|
|
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,
|
|
@@ -160,49 +160,49 @@ async function handleCreate(argv, prompter) {
|
|
|
160
160
|
skipPrompt: true,
|
|
161
161
|
},
|
|
162
162
|
{
|
|
163
|
-
type: '
|
|
163
|
+
type: 'boolean',
|
|
164
164
|
name: 'isApproved',
|
|
165
165
|
message: 'isApproved',
|
|
166
166
|
required: false,
|
|
167
167
|
skipPrompt: true,
|
|
168
168
|
},
|
|
169
169
|
{
|
|
170
|
-
type: '
|
|
170
|
+
type: 'boolean',
|
|
171
171
|
name: 'isBanned',
|
|
172
172
|
message: 'isBanned',
|
|
173
173
|
required: false,
|
|
174
174
|
skipPrompt: true,
|
|
175
175
|
},
|
|
176
176
|
{
|
|
177
|
-
type: '
|
|
177
|
+
type: 'boolean',
|
|
178
178
|
name: 'isDisabled',
|
|
179
179
|
message: 'isDisabled',
|
|
180
180
|
required: false,
|
|
181
181
|
skipPrompt: true,
|
|
182
182
|
},
|
|
183
183
|
{
|
|
184
|
-
type: '
|
|
184
|
+
type: 'boolean',
|
|
185
185
|
name: 'isVerified',
|
|
186
186
|
message: 'isVerified',
|
|
187
187
|
required: false,
|
|
188
188
|
skipPrompt: true,
|
|
189
189
|
},
|
|
190
190
|
{
|
|
191
|
-
type: '
|
|
191
|
+
type: 'boolean',
|
|
192
192
|
name: 'isActive',
|
|
193
193
|
message: 'isActive',
|
|
194
194
|
required: false,
|
|
195
195
|
skipPrompt: true,
|
|
196
196
|
},
|
|
197
197
|
{
|
|
198
|
-
type: '
|
|
198
|
+
type: 'boolean',
|
|
199
199
|
name: 'isOwner',
|
|
200
200
|
message: 'isOwner',
|
|
201
201
|
required: false,
|
|
202
202
|
skipPrompt: true,
|
|
203
203
|
},
|
|
204
204
|
{
|
|
205
|
-
type: '
|
|
205
|
+
type: 'boolean',
|
|
206
206
|
name: 'isAdmin',
|
|
207
207
|
message: 'isAdmin',
|
|
208
208
|
required: false,
|
|
@@ -310,49 +310,49 @@ async function handleUpdate(argv, prompter) {
|
|
|
310
310
|
skipPrompt: true,
|
|
311
311
|
},
|
|
312
312
|
{
|
|
313
|
-
type: '
|
|
313
|
+
type: 'boolean',
|
|
314
314
|
name: 'isApproved',
|
|
315
315
|
message: 'isApproved',
|
|
316
316
|
required: false,
|
|
317
317
|
skipPrompt: true,
|
|
318
318
|
},
|
|
319
319
|
{
|
|
320
|
-
type: '
|
|
320
|
+
type: 'boolean',
|
|
321
321
|
name: 'isBanned',
|
|
322
322
|
message: 'isBanned',
|
|
323
323
|
required: false,
|
|
324
324
|
skipPrompt: true,
|
|
325
325
|
},
|
|
326
326
|
{
|
|
327
|
-
type: '
|
|
327
|
+
type: 'boolean',
|
|
328
328
|
name: 'isDisabled',
|
|
329
329
|
message: 'isDisabled',
|
|
330
330
|
required: false,
|
|
331
331
|
skipPrompt: true,
|
|
332
332
|
},
|
|
333
333
|
{
|
|
334
|
-
type: '
|
|
334
|
+
type: 'boolean',
|
|
335
335
|
name: 'isVerified',
|
|
336
336
|
message: 'isVerified',
|
|
337
337
|
required: false,
|
|
338
338
|
skipPrompt: true,
|
|
339
339
|
},
|
|
340
340
|
{
|
|
341
|
-
type: '
|
|
341
|
+
type: 'boolean',
|
|
342
342
|
name: 'isActive',
|
|
343
343
|
message: 'isActive',
|
|
344
344
|
required: false,
|
|
345
345
|
skipPrompt: true,
|
|
346
346
|
},
|
|
347
347
|
{
|
|
348
|
-
type: '
|
|
348
|
+
type: 'boolean',
|
|
349
349
|
name: 'isOwner',
|
|
350
350
|
message: 'isOwner',
|
|
351
351
|
required: false,
|
|
352
352
|
skipPrompt: true,
|
|
353
353
|
},
|
|
354
354
|
{
|
|
355
|
-
type: '
|
|
355
|
+
type: 'boolean',
|
|
356
356
|
name: 'isAdmin',
|
|
357
357
|
message: 'isAdmin',
|
|
358
358
|
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,
|
|
@@ -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
|
.applyRls(parsedAnswers, {
|
|
@@ -111,7 +111,7 @@ async function handleCreate(argv, prompter) {
|
|
|
111
111
|
skipPrompt: true,
|
|
112
112
|
},
|
|
113
113
|
{
|
|
114
|
-
type: '
|
|
114
|
+
type: 'json',
|
|
115
115
|
name: 'payload',
|
|
116
116
|
message: 'payload',
|
|
117
117
|
required: false,
|
|
@@ -125,21 +125,21 @@ async function handleCreate(argv, prompter) {
|
|
|
125
125
|
skipPrompt: true,
|
|
126
126
|
},
|
|
127
127
|
{
|
|
128
|
-
type: '
|
|
128
|
+
type: 'json',
|
|
129
129
|
name: 'deploy',
|
|
130
130
|
message: 'deploy',
|
|
131
131
|
required: false,
|
|
132
132
|
skipPrompt: true,
|
|
133
133
|
},
|
|
134
134
|
{
|
|
135
|
-
type: '
|
|
135
|
+
type: 'json',
|
|
136
136
|
name: 'revert',
|
|
137
137
|
message: 'revert',
|
|
138
138
|
required: false,
|
|
139
139
|
skipPrompt: true,
|
|
140
140
|
},
|
|
141
141
|
{
|
|
142
|
-
type: '
|
|
142
|
+
type: 'json',
|
|
143
143
|
name: 'verify',
|
|
144
144
|
message: 'verify',
|
|
145
145
|
required: false,
|
|
@@ -156,7 +156,7 @@ async function handleCreate(argv, prompter) {
|
|
|
156
156
|
skipPrompt: true,
|
|
157
157
|
},
|
|
158
158
|
{
|
|
159
|
-
type: '
|
|
159
|
+
type: 'boolean',
|
|
160
160
|
name: 'success',
|
|
161
161
|
message: 'success',
|
|
162
162
|
required: true,
|
|
@@ -241,7 +241,7 @@ async function handleUpdate(argv, prompter) {
|
|
|
241
241
|
skipPrompt: true,
|
|
242
242
|
},
|
|
243
243
|
{
|
|
244
|
-
type: '
|
|
244
|
+
type: 'boolean',
|
|
245
245
|
name: 'success',
|
|
246
246
|
message: 'success',
|
|
247
247
|
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
|
.bootstrapUser(parsedAnswers, {
|
|
@@ -173,14 +173,14 @@ async function handleCreate(argv, prompter) {
|
|
|
173
173
|
required: true,
|
|
174
174
|
},
|
|
175
175
|
{
|
|
176
|
-
type: '
|
|
176
|
+
type: 'json',
|
|
177
177
|
name: 'expr',
|
|
178
178
|
message: 'expr',
|
|
179
179
|
required: false,
|
|
180
180
|
skipPrompt: true,
|
|
181
181
|
},
|
|
182
182
|
{
|
|
183
|
-
type: '
|
|
183
|
+
type: 'json',
|
|
184
184
|
name: 'smartTags',
|
|
185
185
|
message: 'smartTags',
|
|
186
186
|
required: false,
|
|
@@ -304,14 +304,14 @@ async function handleUpdate(argv, prompter) {
|
|
|
304
304
|
required: false,
|
|
305
305
|
},
|
|
306
306
|
{
|
|
307
|
-
type: '
|
|
307
|
+
type: 'json',
|
|
308
308
|
name: 'expr',
|
|
309
309
|
message: 'expr',
|
|
310
310
|
required: false,
|
|
311
311
|
skipPrompt: true,
|
|
312
312
|
},
|
|
313
313
|
{
|
|
314
|
-
type: '
|
|
314
|
+
type: 'json',
|
|
315
315
|
name: 'smartTags',
|
|
316
316
|
message: 'smartTags',
|
|
317
317
|
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
|
.checkPassword(parsedAnswers, {
|
|
@@ -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: 'json',
|
|
120
120
|
name: 'data',
|
|
121
121
|
message: 'data',
|
|
122
122
|
required: false,
|
|
@@ -177,7 +177,7 @@ async function handleUpdate(argv, prompter) {
|
|
|
177
177
|
required: true,
|
|
178
178
|
},
|
|
179
179
|
{
|
|
180
|
-
type: '
|
|
180
|
+
type: 'json',
|
|
181
181
|
name: 'data',
|
|
182
182
|
message: 'data',
|
|
183
183
|
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
|
.confirmDeleteAccount(parsedAnswers, {
|
|
@@ -141,13 +141,13 @@ async function handleCreate(argv, prompter) {
|
|
|
141
141
|
required: true,
|
|
142
142
|
},
|
|
143
143
|
{
|
|
144
|
-
type: '
|
|
144
|
+
type: 'json',
|
|
145
145
|
name: 'details',
|
|
146
146
|
message: 'details',
|
|
147
147
|
required: true,
|
|
148
148
|
},
|
|
149
149
|
{
|
|
150
|
-
type: '
|
|
150
|
+
type: 'boolean',
|
|
151
151
|
name: 'isVerified',
|
|
152
152
|
message: 'isVerified',
|
|
153
153
|
required: false,
|
|
@@ -217,13 +217,13 @@ async function handleUpdate(argv, prompter) {
|
|
|
217
217
|
required: false,
|
|
218
218
|
},
|
|
219
219
|
{
|
|
220
|
-
type: '
|
|
220
|
+
type: 'json',
|
|
221
221
|
name: 'details',
|
|
222
222
|
message: 'details',
|
|
223
223
|
required: false,
|
|
224
224
|
},
|
|
225
225
|
{
|
|
226
|
-
type: '
|
|
226
|
+
type: 'boolean',
|
|
227
227
|
name: 'isVerified',
|
|
228
228
|
message: 'isVerified',
|
|
229
229
|
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
|
.createUserDatabase(parsedAnswers, {
|
|
@@ -132,14 +132,14 @@ async function handleCreate(argv, prompter) {
|
|
|
132
132
|
required: true,
|
|
133
133
|
},
|
|
134
134
|
{
|
|
135
|
-
type: '
|
|
135
|
+
type: 'boolean',
|
|
136
136
|
name: 'isVerified',
|
|
137
137
|
message: 'isVerified',
|
|
138
138
|
required: false,
|
|
139
139
|
skipPrompt: true,
|
|
140
140
|
},
|
|
141
141
|
{
|
|
142
|
-
type: '
|
|
142
|
+
type: 'boolean',
|
|
143
143
|
name: 'isPrimary',
|
|
144
144
|
message: 'isPrimary',
|
|
145
145
|
required: false,
|
|
@@ -201,14 +201,14 @@ async function handleUpdate(argv, prompter) {
|
|
|
201
201
|
required: false,
|
|
202
202
|
},
|
|
203
203
|
{
|
|
204
|
-
type: '
|
|
204
|
+
type: 'boolean',
|
|
205
205
|
name: 'isVerified',
|
|
206
206
|
message: 'isVerified',
|
|
207
207
|
required: false,
|
|
208
208
|
skipPrompt: true,
|
|
209
209
|
},
|
|
210
210
|
{
|
|
211
|
-
type: '
|
|
211
|
+
type: 'boolean',
|
|
212
212
|
name: 'isPrimary',
|
|
213
213
|
message: 'isPrimary',
|
|
214
214
|
required: false,
|
|
@@ -172,14 +172,14 @@ async function handleCreate(argv, prompter) {
|
|
|
172
172
|
skipPrompt: true,
|
|
173
173
|
},
|
|
174
174
|
{
|
|
175
|
-
type: '
|
|
175
|
+
type: 'json',
|
|
176
176
|
name: 'options',
|
|
177
177
|
message: 'options',
|
|
178
178
|
required: false,
|
|
179
179
|
skipPrompt: true,
|
|
180
180
|
},
|
|
181
181
|
{
|
|
182
|
-
type: '
|
|
182
|
+
type: 'boolean',
|
|
183
183
|
name: 'bootstrapUser',
|
|
184
184
|
message: 'bootstrapUser',
|
|
185
185
|
required: false,
|
|
@@ -302,14 +302,14 @@ async function handleUpdate(argv, prompter) {
|
|
|
302
302
|
skipPrompt: true,
|
|
303
303
|
},
|
|
304
304
|
{
|
|
305
|
-
type: '
|
|
305
|
+
type: 'json',
|
|
306
306
|
name: 'options',
|
|
307
307
|
message: 'options',
|
|
308
308
|
required: false,
|
|
309
309
|
skipPrompt: true,
|
|
310
310
|
},
|
|
311
311
|
{
|
|
312
|
-
type: '
|
|
312
|
+
type: 'boolean',
|
|
313
313
|
name: 'bootstrapUser',
|
|
314
314
|
message: 'bootstrapUser',
|
|
315
315
|
required: false,
|
|
@@ -150,7 +150,7 @@ async function handleCreate(argv, prompter) {
|
|
|
150
150
|
required: true,
|
|
151
151
|
},
|
|
152
152
|
{
|
|
153
|
-
type: '
|
|
153
|
+
type: 'boolean',
|
|
154
154
|
name: 'isGrant',
|
|
155
155
|
message: 'isGrant',
|
|
156
156
|
required: false,
|
|
@@ -232,7 +232,7 @@ async function handleUpdate(argv, prompter) {
|
|
|
232
232
|
required: false,
|
|
233
233
|
},
|
|
234
234
|
{
|
|
235
|
-
type: '
|
|
235
|
+
type: 'boolean',
|
|
236
236
|
name: 'isGrant',
|
|
237
237
|
message: 'isGrant',
|
|
238
238
|
required: false,
|