@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
package/admin/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'
|
|
@@ -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
|
.checkPassword(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
|
.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,
|
|
@@ -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,
|
|
@@ -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,
|
|
@@ -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
|
.extendTokenExpires(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
|
.forgotPassword(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
|
.oneTimeToken(parsedAnswers, {
|
|
@@ -141,14 +141,14 @@ async function handleCreate(argv, prompter) {
|
|
|
141
141
|
required: true,
|
|
142
142
|
},
|
|
143
143
|
{
|
|
144
|
-
type: '
|
|
144
|
+
type: 'boolean',
|
|
145
145
|
name: 'isVerified',
|
|
146
146
|
message: 'isVerified',
|
|
147
147
|
required: false,
|
|
148
148
|
skipPrompt: true,
|
|
149
149
|
},
|
|
150
150
|
{
|
|
151
|
-
type: '
|
|
151
|
+
type: 'boolean',
|
|
152
152
|
name: 'isPrimary',
|
|
153
153
|
message: 'isPrimary',
|
|
154
154
|
required: false,
|
|
@@ -218,14 +218,14 @@ async function handleUpdate(argv, prompter) {
|
|
|
218
218
|
required: false,
|
|
219
219
|
},
|
|
220
220
|
{
|
|
221
|
-
type: '
|
|
221
|
+
type: 'boolean',
|
|
222
222
|
name: 'isVerified',
|
|
223
223
|
message: 'isVerified',
|
|
224
224
|
required: false,
|
|
225
225
|
skipPrompt: true,
|
|
226
226
|
},
|
|
227
227
|
{
|
|
228
|
-
type: '
|
|
228
|
+
type: 'boolean',
|
|
229
229
|
name: 'isPrimary',
|
|
230
230
|
message: 'isPrimary',
|
|
231
231
|
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
|
.resetPassword(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
|
.sendAccountDeletionEmail(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
|
.sendVerificationEmail(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
|
.setPassword(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
|
.signInOneTimeToken(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
|
.signIn(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
|
.signOut(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
|
.signUp(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
|
.verifyEmail(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
|
.verifyPassword(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
|
.verifyTotp(parsedAnswers, {
|
package/auth/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/auth/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/auth/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'
|
|
@@ -114,7 +114,7 @@ async function handleCreate(argv, prompter) {
|
|
|
114
114
|
try {
|
|
115
115
|
const rawAnswers = await prompter.prompt(argv, [
|
|
116
116
|
{
|
|
117
|
-
type: '
|
|
117
|
+
type: 'boolean',
|
|
118
118
|
name: 'isGrant',
|
|
119
119
|
message: 'isGrant',
|
|
120
120
|
required: false,
|
|
@@ -174,7 +174,7 @@ async function handleUpdate(argv, prompter) {
|
|
|
174
174
|
required: true,
|
|
175
175
|
},
|
|
176
176
|
{
|
|
177
|
-
type: '
|
|
177
|
+
type: 'boolean',
|
|
178
178
|
name: 'isGrant',
|
|
179
179
|
message: 'isGrant',
|
|
180
180
|
required: false,
|
|
@@ -124,7 +124,7 @@ async function handleCreate(argv, prompter) {
|
|
|
124
124
|
skipPrompt: true,
|
|
125
125
|
},
|
|
126
126
|
{
|
|
127
|
-
type: '
|
|
127
|
+
type: 'boolean',
|
|
128
128
|
name: 'isGrant',
|
|
129
129
|
message: 'isGrant',
|
|
130
130
|
required: false,
|
|
@@ -193,7 +193,7 @@ async function handleUpdate(argv, prompter) {
|
|
|
193
193
|
skipPrompt: true,
|
|
194
194
|
},
|
|
195
195
|
{
|
|
196
|
-
type: '
|
|
196
|
+
type: 'boolean',
|
|
197
197
|
name: 'isGrant',
|
|
198
198
|
message: 'isGrant',
|
|
199
199
|
required: false,
|
|
@@ -131,14 +131,14 @@ async function handleCreate(argv, prompter) {
|
|
|
131
131
|
skipPrompt: true,
|
|
132
132
|
},
|
|
133
133
|
{
|
|
134
|
-
type: '
|
|
134
|
+
type: 'boolean',
|
|
135
135
|
name: 'isApproved',
|
|
136
136
|
message: 'isApproved',
|
|
137
137
|
required: false,
|
|
138
138
|
skipPrompt: true,
|
|
139
139
|
},
|
|
140
140
|
{
|
|
141
|
-
type: '
|
|
141
|
+
type: 'boolean',
|
|
142
142
|
name: 'isVerified',
|
|
143
143
|
message: 'isVerified',
|
|
144
144
|
required: false,
|
|
@@ -201,14 +201,14 @@ async function handleUpdate(argv, prompter) {
|
|
|
201
201
|
skipPrompt: true,
|
|
202
202
|
},
|
|
203
203
|
{
|
|
204
|
-
type: '
|
|
204
|
+
type: 'boolean',
|
|
205
205
|
name: 'isApproved',
|
|
206
206
|
message: 'isApproved',
|
|
207
207
|
required: false,
|
|
208
208
|
skipPrompt: true,
|
|
209
209
|
},
|
|
210
210
|
{
|
|
211
|
-
type: '
|
|
211
|
+
type: 'boolean',
|
|
212
212
|
name: 'isVerified',
|
|
213
213
|
message: 'isVerified',
|
|
214
214
|
required: false,
|
|
@@ -158,49 +158,49 @@ async function handleCreate(argv, prompter) {
|
|
|
158
158
|
skipPrompt: true,
|
|
159
159
|
},
|
|
160
160
|
{
|
|
161
|
-
type: '
|
|
161
|
+
type: 'boolean',
|
|
162
162
|
name: 'isApproved',
|
|
163
163
|
message: 'isApproved',
|
|
164
164
|
required: false,
|
|
165
165
|
skipPrompt: true,
|
|
166
166
|
},
|
|
167
167
|
{
|
|
168
|
-
type: '
|
|
168
|
+
type: 'boolean',
|
|
169
169
|
name: 'isBanned',
|
|
170
170
|
message: 'isBanned',
|
|
171
171
|
required: false,
|
|
172
172
|
skipPrompt: true,
|
|
173
173
|
},
|
|
174
174
|
{
|
|
175
|
-
type: '
|
|
175
|
+
type: 'boolean',
|
|
176
176
|
name: 'isDisabled',
|
|
177
177
|
message: 'isDisabled',
|
|
178
178
|
required: false,
|
|
179
179
|
skipPrompt: true,
|
|
180
180
|
},
|
|
181
181
|
{
|
|
182
|
-
type: '
|
|
182
|
+
type: 'boolean',
|
|
183
183
|
name: 'isVerified',
|
|
184
184
|
message: 'isVerified',
|
|
185
185
|
required: false,
|
|
186
186
|
skipPrompt: true,
|
|
187
187
|
},
|
|
188
188
|
{
|
|
189
|
-
type: '
|
|
189
|
+
type: 'boolean',
|
|
190
190
|
name: 'isActive',
|
|
191
191
|
message: 'isActive',
|
|
192
192
|
required: false,
|
|
193
193
|
skipPrompt: true,
|
|
194
194
|
},
|
|
195
195
|
{
|
|
196
|
-
type: '
|
|
196
|
+
type: 'boolean',
|
|
197
197
|
name: 'isOwner',
|
|
198
198
|
message: 'isOwner',
|
|
199
199
|
required: false,
|
|
200
200
|
skipPrompt: true,
|
|
201
201
|
},
|
|
202
202
|
{
|
|
203
|
-
type: '
|
|
203
|
+
type: 'boolean',
|
|
204
204
|
name: 'isAdmin',
|
|
205
205
|
message: 'isAdmin',
|
|
206
206
|
required: false,
|
|
@@ -308,49 +308,49 @@ async function handleUpdate(argv, prompter) {
|
|
|
308
308
|
skipPrompt: true,
|
|
309
309
|
},
|
|
310
310
|
{
|
|
311
|
-
type: '
|
|
311
|
+
type: 'boolean',
|
|
312
312
|
name: 'isApproved',
|
|
313
313
|
message: 'isApproved',
|
|
314
314
|
required: false,
|
|
315
315
|
skipPrompt: true,
|
|
316
316
|
},
|
|
317
317
|
{
|
|
318
|
-
type: '
|
|
318
|
+
type: 'boolean',
|
|
319
319
|
name: 'isBanned',
|
|
320
320
|
message: 'isBanned',
|
|
321
321
|
required: false,
|
|
322
322
|
skipPrompt: true,
|
|
323
323
|
},
|
|
324
324
|
{
|
|
325
|
-
type: '
|
|
325
|
+
type: 'boolean',
|
|
326
326
|
name: 'isDisabled',
|
|
327
327
|
message: 'isDisabled',
|
|
328
328
|
required: false,
|
|
329
329
|
skipPrompt: true,
|
|
330
330
|
},
|
|
331
331
|
{
|
|
332
|
-
type: '
|
|
332
|
+
type: 'boolean',
|
|
333
333
|
name: 'isVerified',
|
|
334
334
|
message: 'isVerified',
|
|
335
335
|
required: false,
|
|
336
336
|
skipPrompt: true,
|
|
337
337
|
},
|
|
338
338
|
{
|
|
339
|
-
type: '
|
|
339
|
+
type: 'boolean',
|
|
340
340
|
name: 'isActive',
|
|
341
341
|
message: 'isActive',
|
|
342
342
|
required: false,
|
|
343
343
|
skipPrompt: true,
|
|
344
344
|
},
|
|
345
345
|
{
|
|
346
|
-
type: '
|
|
346
|
+
type: 'boolean',
|
|
347
347
|
name: 'isOwner',
|
|
348
348
|
message: 'isOwner',
|
|
349
349
|
required: false,
|
|
350
350
|
skipPrompt: true,
|
|
351
351
|
},
|
|
352
352
|
{
|
|
353
|
-
type: '
|
|
353
|
+
type: 'boolean',
|
|
354
354
|
name: 'isAdmin',
|
|
355
355
|
message: 'isAdmin',
|
|
356
356
|
required: false,
|
|
@@ -114,7 +114,7 @@ async function handleCreate(argv, prompter) {
|
|
|
114
114
|
try {
|
|
115
115
|
const rawAnswers = await prompter.prompt(argv, [
|
|
116
116
|
{
|
|
117
|
-
type: '
|
|
117
|
+
type: 'boolean',
|
|
118
118
|
name: 'isGrant',
|
|
119
119
|
message: 'isGrant',
|
|
120
120
|
required: false,
|
|
@@ -174,7 +174,7 @@ async function handleUpdate(argv, prompter) {
|
|
|
174
174
|
required: true,
|
|
175
175
|
},
|
|
176
176
|
{
|
|
177
|
-
type: '
|
|
177
|
+
type: 'boolean',
|
|
178
178
|
name: 'isGrant',
|
|
179
179
|
message: 'isGrant',
|
|
180
180
|
required: false,
|
|
@@ -114,7 +114,7 @@ async function handleCreate(argv, prompter) {
|
|
|
114
114
|
try {
|
|
115
115
|
const rawAnswers = await prompter.prompt(argv, [
|
|
116
116
|
{
|
|
117
|
-
type: '
|
|
117
|
+
type: 'json',
|
|
118
118
|
name: 'data',
|
|
119
119
|
message: 'data',
|
|
120
120
|
required: false,
|
|
@@ -175,7 +175,7 @@ async function handleUpdate(argv, prompter) {
|
|
|
175
175
|
required: true,
|
|
176
176
|
},
|
|
177
177
|
{
|
|
178
|
-
type: '
|
|
178
|
+
type: 'json',
|
|
179
179
|
name: 'data',
|
|
180
180
|
message: 'data',
|
|
181
181
|
required: false,
|