@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
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { getClient } from '../executor';
|
|
2
|
-
import {
|
|
2
|
+
import { unflattenDotNotation, buildSelectFromPaths } from '../utils';
|
|
3
3
|
export default async (argv, prompter, _options) => {
|
|
4
4
|
try {
|
|
5
5
|
if (argv.help || argv.h) {
|
|
@@ -15,7 +15,7 @@ export default async (argv, prompter, _options) => {
|
|
|
15
15
|
},
|
|
16
16
|
]);
|
|
17
17
|
const client = getClient();
|
|
18
|
-
const parsedAnswers =
|
|
18
|
+
const parsedAnswers = unflattenDotNotation(answers);
|
|
19
19
|
const selectFields = buildSelectFromPaths(argv.select ?? 'clientMutationId');
|
|
20
20
|
const result = await client.mutation
|
|
21
21
|
.signOut(parsedAnswers, {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { getClient } from '../executor';
|
|
2
|
-
import {
|
|
2
|
+
import { unflattenDotNotation, buildSelectFromPaths } from '../utils';
|
|
3
3
|
export default async (argv, prompter, _options) => {
|
|
4
4
|
try {
|
|
5
5
|
if (argv.help || argv.h) {
|
|
@@ -15,7 +15,7 @@ export default async (argv, prompter, _options) => {
|
|
|
15
15
|
},
|
|
16
16
|
]);
|
|
17
17
|
const client = getClient();
|
|
18
|
-
const parsedAnswers =
|
|
18
|
+
const parsedAnswers = unflattenDotNotation(answers);
|
|
19
19
|
const selectFields = buildSelectFromPaths(argv.select ?? 'clientMutationId');
|
|
20
20
|
const result = await client.mutation
|
|
21
21
|
.signUp(parsedAnswers, {
|
|
@@ -129,7 +129,7 @@ async function handleCreate(argv, prompter) {
|
|
|
129
129
|
required: true,
|
|
130
130
|
},
|
|
131
131
|
{
|
|
132
|
-
type: '
|
|
132
|
+
type: 'json',
|
|
133
133
|
name: 'data',
|
|
134
134
|
message: 'data',
|
|
135
135
|
required: true,
|
|
@@ -193,7 +193,7 @@ async function handleUpdate(argv, prompter) {
|
|
|
193
193
|
required: false,
|
|
194
194
|
},
|
|
195
195
|
{
|
|
196
|
-
type: '
|
|
196
|
+
type: 'json',
|
|
197
197
|
name: 'data',
|
|
198
198
|
message: 'data',
|
|
199
199
|
required: false,
|
|
@@ -120,7 +120,7 @@ async function handleCreate(argv, prompter) {
|
|
|
120
120
|
required: true,
|
|
121
121
|
},
|
|
122
122
|
{
|
|
123
|
-
type: '
|
|
123
|
+
type: 'json',
|
|
124
124
|
name: 'theme',
|
|
125
125
|
message: 'theme',
|
|
126
126
|
required: true,
|
|
@@ -176,7 +176,7 @@ async function handleUpdate(argv, prompter) {
|
|
|
176
176
|
required: false,
|
|
177
177
|
},
|
|
178
178
|
{
|
|
179
|
-
type: '
|
|
179
|
+
type: 'json',
|
|
180
180
|
name: 'theme',
|
|
181
181
|
message: 'theme',
|
|
182
182
|
required: false,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { getClient } from '../executor';
|
|
2
|
-
import {
|
|
2
|
+
import { unflattenDotNotation, buildSelectFromPaths } from '../utils';
|
|
3
3
|
export default async (argv, prompter, _options) => {
|
|
4
4
|
try {
|
|
5
5
|
if (argv.help || argv.h) {
|
|
@@ -15,7 +15,7 @@ export default async (argv, prompter, _options) => {
|
|
|
15
15
|
},
|
|
16
16
|
]);
|
|
17
17
|
const client = getClient();
|
|
18
|
-
const parsedAnswers =
|
|
18
|
+
const parsedAnswers = unflattenDotNotation(answers);
|
|
19
19
|
const selectFields = buildSelectFromPaths(argv.select ?? 'clientMutationId');
|
|
20
20
|
const result = await client.mutation
|
|
21
21
|
.submitInviteCode(parsedAnswers, {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { getClient } from '../executor';
|
|
2
|
-
import {
|
|
2
|
+
import { unflattenDotNotation, buildSelectFromPaths } from '../utils';
|
|
3
3
|
export default async (argv, prompter, _options) => {
|
|
4
4
|
try {
|
|
5
5
|
if (argv.help || argv.h) {
|
|
@@ -15,7 +15,7 @@ export default async (argv, prompter, _options) => {
|
|
|
15
15
|
},
|
|
16
16
|
]);
|
|
17
17
|
const client = getClient();
|
|
18
|
-
const parsedAnswers =
|
|
18
|
+
const parsedAnswers = unflattenDotNotation(answers);
|
|
19
19
|
const selectFields = buildSelectFromPaths(argv.select ?? 'clientMutationId');
|
|
20
20
|
const result = await client.mutation
|
|
21
21
|
.submitOrgInviteCode(parsedAnswers, {
|
|
@@ -155,7 +155,7 @@ async function handleCreate(argv, prompter) {
|
|
|
155
155
|
skipPrompt: true,
|
|
156
156
|
},
|
|
157
157
|
{
|
|
158
|
-
type: '
|
|
158
|
+
type: 'boolean',
|
|
159
159
|
name: 'isGrant',
|
|
160
160
|
message: 'isGrant',
|
|
161
161
|
required: false,
|
|
@@ -240,7 +240,7 @@ async function handleUpdate(argv, prompter) {
|
|
|
240
240
|
skipPrompt: true,
|
|
241
241
|
},
|
|
242
242
|
{
|
|
243
|
-
type: '
|
|
243
|
+
type: 'boolean',
|
|
244
244
|
name: 'isGrant',
|
|
245
245
|
message: 'isGrant',
|
|
246
246
|
required: false,
|
|
@@ -156,14 +156,14 @@ async function handleCreate(argv, prompter) {
|
|
|
156
156
|
required: true,
|
|
157
157
|
},
|
|
158
158
|
{
|
|
159
|
-
type: '
|
|
159
|
+
type: 'boolean',
|
|
160
160
|
name: 'useRls',
|
|
161
161
|
message: 'useRls',
|
|
162
162
|
required: false,
|
|
163
163
|
skipPrompt: true,
|
|
164
164
|
},
|
|
165
165
|
{
|
|
166
|
-
type: '
|
|
166
|
+
type: 'json',
|
|
167
167
|
name: 'data',
|
|
168
168
|
message: 'data',
|
|
169
169
|
required: false,
|
|
@@ -258,14 +258,14 @@ async function handleUpdate(argv, prompter) {
|
|
|
258
258
|
required: false,
|
|
259
259
|
},
|
|
260
260
|
{
|
|
261
|
-
type: '
|
|
261
|
+
type: 'boolean',
|
|
262
262
|
name: 'useRls',
|
|
263
263
|
message: 'useRls',
|
|
264
264
|
required: false,
|
|
265
265
|
skipPrompt: true,
|
|
266
266
|
},
|
|
267
267
|
{
|
|
268
|
-
type: '
|
|
268
|
+
type: 'json',
|
|
269
269
|
name: 'data',
|
|
270
270
|
message: 'data',
|
|
271
271
|
required: false,
|
|
@@ -169,7 +169,7 @@ async function handleCreate(argv, prompter) {
|
|
|
169
169
|
required: true,
|
|
170
170
|
},
|
|
171
171
|
{
|
|
172
|
-
type: '
|
|
172
|
+
type: 'json',
|
|
173
173
|
name: 'data',
|
|
174
174
|
message: 'data',
|
|
175
175
|
required: false,
|
|
@@ -270,7 +270,7 @@ async function handleUpdate(argv, prompter) {
|
|
|
270
270
|
required: false,
|
|
271
271
|
},
|
|
272
272
|
{
|
|
273
|
-
type: '
|
|
273
|
+
type: 'json',
|
|
274
274
|
name: 'data',
|
|
275
275
|
message: 'data',
|
|
276
276
|
required: false,
|
|
@@ -186,7 +186,7 @@ async function handleCreate(argv, prompter) {
|
|
|
186
186
|
skipPrompt: true,
|
|
187
187
|
},
|
|
188
188
|
{
|
|
189
|
-
type: '
|
|
189
|
+
type: 'json',
|
|
190
190
|
name: 'smartTags',
|
|
191
191
|
message: 'smartTags',
|
|
192
192
|
required: false,
|
|
@@ -214,21 +214,21 @@ async function handleCreate(argv, prompter) {
|
|
|
214
214
|
skipPrompt: true,
|
|
215
215
|
},
|
|
216
216
|
{
|
|
217
|
-
type: '
|
|
217
|
+
type: 'boolean',
|
|
218
218
|
name: 'useRls',
|
|
219
219
|
message: 'useRls',
|
|
220
220
|
required: false,
|
|
221
221
|
skipPrompt: true,
|
|
222
222
|
},
|
|
223
223
|
{
|
|
224
|
-
type: '
|
|
224
|
+
type: 'boolean',
|
|
225
225
|
name: 'timestamps',
|
|
226
226
|
message: 'timestamps',
|
|
227
227
|
required: false,
|
|
228
228
|
skipPrompt: true,
|
|
229
229
|
},
|
|
230
230
|
{
|
|
231
|
-
type: '
|
|
231
|
+
type: 'boolean',
|
|
232
232
|
name: 'peoplestamps',
|
|
233
233
|
message: 'peoplestamps',
|
|
234
234
|
required: false,
|
|
@@ -362,7 +362,7 @@ async function handleUpdate(argv, prompter) {
|
|
|
362
362
|
skipPrompt: true,
|
|
363
363
|
},
|
|
364
364
|
{
|
|
365
|
-
type: '
|
|
365
|
+
type: 'json',
|
|
366
366
|
name: 'smartTags',
|
|
367
367
|
message: 'smartTags',
|
|
368
368
|
required: false,
|
|
@@ -390,21 +390,21 @@ async function handleUpdate(argv, prompter) {
|
|
|
390
390
|
skipPrompt: true,
|
|
391
391
|
},
|
|
392
392
|
{
|
|
393
|
-
type: '
|
|
393
|
+
type: 'boolean',
|
|
394
394
|
name: 'useRls',
|
|
395
395
|
message: 'useRls',
|
|
396
396
|
required: false,
|
|
397
397
|
skipPrompt: true,
|
|
398
398
|
},
|
|
399
399
|
{
|
|
400
|
-
type: '
|
|
400
|
+
type: 'boolean',
|
|
401
401
|
name: 'timestamps',
|
|
402
402
|
message: 'timestamps',
|
|
403
403
|
required: false,
|
|
404
404
|
skipPrompt: true,
|
|
405
405
|
},
|
|
406
406
|
{
|
|
407
|
-
type: '
|
|
407
|
+
type: 'boolean',
|
|
408
408
|
name: 'peoplestamps',
|
|
409
409
|
message: 'peoplestamps',
|
|
410
410
|
required: false,
|
|
@@ -168,7 +168,7 @@ async function handleCreate(argv, prompter) {
|
|
|
168
168
|
skipPrompt: true,
|
|
169
169
|
},
|
|
170
170
|
{
|
|
171
|
-
type: '
|
|
171
|
+
type: 'json',
|
|
172
172
|
name: 'smartTags',
|
|
173
173
|
message: 'smartTags',
|
|
174
174
|
required: false,
|
|
@@ -290,7 +290,7 @@ async function handleUpdate(argv, prompter) {
|
|
|
290
290
|
skipPrompt: true,
|
|
291
291
|
},
|
|
292
292
|
{
|
|
293
|
-
type: '
|
|
293
|
+
type: 'json',
|
|
294
294
|
name: 'smartTags',
|
|
295
295
|
message: 'smartTags',
|
|
296
296
|
required: false,
|
|
@@ -165,7 +165,7 @@ async function handleCreate(argv, prompter) {
|
|
|
165
165
|
skipPrompt: true,
|
|
166
166
|
},
|
|
167
167
|
{
|
|
168
|
-
type: '
|
|
168
|
+
type: 'json',
|
|
169
169
|
name: 'smartTags',
|
|
170
170
|
message: 'smartTags',
|
|
171
171
|
required: false,
|
|
@@ -296,7 +296,7 @@ async function handleUpdate(argv, prompter) {
|
|
|
296
296
|
skipPrompt: true,
|
|
297
297
|
},
|
|
298
298
|
{
|
|
299
|
-
type: '
|
|
299
|
+
type: 'json',
|
|
300
300
|
name: 'smartTags',
|
|
301
301
|
message: 'smartTags',
|
|
302
302
|
required: false,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { getClient } from '../executor';
|
|
2
|
-
import {
|
|
2
|
+
import { unflattenDotNotation, buildSelectFromPaths } from '../utils';
|
|
3
3
|
export default async (argv, prompter, _options) => {
|
|
4
4
|
try {
|
|
5
5
|
if (argv.help || argv.h) {
|
|
@@ -15,7 +15,7 @@ export default async (argv, prompter, _options) => {
|
|
|
15
15
|
},
|
|
16
16
|
]);
|
|
17
17
|
const client = getClient();
|
|
18
|
-
const parsedAnswers =
|
|
18
|
+
const parsedAnswers = unflattenDotNotation(answers);
|
|
19
19
|
const selectFields = buildSelectFromPaths(argv.select ?? 'clientMutationId');
|
|
20
20
|
const result = await client.mutation
|
|
21
21
|
.updateNodeAtPath(parsedAnswers, {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { getClient } from '../executor';
|
|
2
|
-
import {
|
|
2
|
+
import { unflattenDotNotation, buildSelectFromPaths } from '../utils';
|
|
3
3
|
export default async (argv, prompter, _options) => {
|
|
4
4
|
try {
|
|
5
5
|
if (argv.help || argv.h) {
|
|
@@ -15,7 +15,7 @@ export default async (argv, prompter, _options) => {
|
|
|
15
15
|
},
|
|
16
16
|
]);
|
|
17
17
|
const client = getClient();
|
|
18
|
-
const parsedAnswers =
|
|
18
|
+
const parsedAnswers = unflattenDotNotation(answers);
|
|
19
19
|
const selectFields = buildSelectFromPaths(argv.select ?? 'clientMutationId');
|
|
20
20
|
const result = await client.mutation
|
|
21
21
|
.verifyEmail(parsedAnswers, {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { getClient } from '../executor';
|
|
2
|
-
import {
|
|
2
|
+
import { unflattenDotNotation, buildSelectFromPaths } from '../utils';
|
|
3
3
|
export default async (argv, prompter, _options) => {
|
|
4
4
|
try {
|
|
5
5
|
if (argv.help || argv.h) {
|
|
@@ -15,7 +15,7 @@ export default async (argv, prompter, _options) => {
|
|
|
15
15
|
},
|
|
16
16
|
]);
|
|
17
17
|
const client = getClient();
|
|
18
|
-
const parsedAnswers =
|
|
18
|
+
const parsedAnswers = unflattenDotNotation(answers);
|
|
19
19
|
const selectFields = buildSelectFromPaths(argv.select ?? 'clientMutationId');
|
|
20
20
|
const result = await client.mutation
|
|
21
21
|
.verifyPassword(parsedAnswers, {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { getClient } from '../executor';
|
|
2
|
-
import {
|
|
2
|
+
import { unflattenDotNotation, buildSelectFromPaths } from '../utils';
|
|
3
3
|
export default async (argv, prompter, _options) => {
|
|
4
4
|
try {
|
|
5
5
|
if (argv.help || argv.h) {
|
|
@@ -15,7 +15,7 @@ export default async (argv, prompter, _options) => {
|
|
|
15
15
|
},
|
|
16
16
|
]);
|
|
17
17
|
const client = getClient();
|
|
18
|
-
const parsedAnswers =
|
|
18
|
+
const parsedAnswers = unflattenDotNotation(answers);
|
|
19
19
|
const selectFields = buildSelectFromPaths(argv.select ?? 'clientMutationId');
|
|
20
20
|
const result = await client.mutation
|
|
21
21
|
.verifyTotp(parsedAnswers, {
|
|
@@ -142,14 +142,14 @@ async function handleCreate(argv, prompter) {
|
|
|
142
142
|
required: true,
|
|
143
143
|
},
|
|
144
144
|
{
|
|
145
|
-
type: '
|
|
145
|
+
type: 'boolean',
|
|
146
146
|
name: 'withGrantOption',
|
|
147
147
|
message: 'withGrantOption',
|
|
148
148
|
required: false,
|
|
149
149
|
skipPrompt: true,
|
|
150
150
|
},
|
|
151
151
|
{
|
|
152
|
-
type: '
|
|
152
|
+
type: 'boolean',
|
|
153
153
|
name: 'isGrant',
|
|
154
154
|
message: 'isGrant',
|
|
155
155
|
required: false,
|
|
@@ -225,14 +225,14 @@ async function handleUpdate(argv, prompter) {
|
|
|
225
225
|
required: false,
|
|
226
226
|
},
|
|
227
227
|
{
|
|
228
|
-
type: '
|
|
228
|
+
type: 'boolean',
|
|
229
229
|
name: 'withGrantOption',
|
|
230
230
|
message: 'withGrantOption',
|
|
231
231
|
required: false,
|
|
232
232
|
skipPrompt: true,
|
|
233
233
|
},
|
|
234
234
|
{
|
|
235
|
-
type: '
|
|
235
|
+
type: 'boolean',
|
|
236
236
|
name: 'isGrant',
|
|
237
237
|
message: 'isGrant',
|
|
238
238
|
required: false,
|
|
@@ -176,7 +176,7 @@ async function handleCreate(argv, prompter) {
|
|
|
176
176
|
required: true,
|
|
177
177
|
},
|
|
178
178
|
{
|
|
179
|
-
type: '
|
|
179
|
+
type: 'json',
|
|
180
180
|
name: 'data',
|
|
181
181
|
message: 'data',
|
|
182
182
|
required: false,
|
|
@@ -190,28 +190,28 @@ async function handleCreate(argv, prompter) {
|
|
|
190
190
|
skipPrompt: true,
|
|
191
191
|
},
|
|
192
192
|
{
|
|
193
|
-
type: '
|
|
193
|
+
type: 'json',
|
|
194
194
|
name: 'filterData',
|
|
195
195
|
message: 'filterData',
|
|
196
196
|
required: false,
|
|
197
197
|
skipPrompt: true,
|
|
198
198
|
},
|
|
199
199
|
{
|
|
200
|
-
type: '
|
|
200
|
+
type: 'boolean',
|
|
201
201
|
name: 'securityInvoker',
|
|
202
202
|
message: 'securityInvoker',
|
|
203
203
|
required: false,
|
|
204
204
|
skipPrompt: true,
|
|
205
205
|
},
|
|
206
206
|
{
|
|
207
|
-
type: '
|
|
207
|
+
type: 'boolean',
|
|
208
208
|
name: 'isReadOnly',
|
|
209
209
|
message: 'isReadOnly',
|
|
210
210
|
required: false,
|
|
211
211
|
skipPrompt: true,
|
|
212
212
|
},
|
|
213
213
|
{
|
|
214
|
-
type: '
|
|
214
|
+
type: 'json',
|
|
215
215
|
name: 'smartTags',
|
|
216
216
|
message: 'smartTags',
|
|
217
217
|
required: false,
|
|
@@ -340,7 +340,7 @@ async function handleUpdate(argv, prompter) {
|
|
|
340
340
|
required: false,
|
|
341
341
|
},
|
|
342
342
|
{
|
|
343
|
-
type: '
|
|
343
|
+
type: 'json',
|
|
344
344
|
name: 'data',
|
|
345
345
|
message: 'data',
|
|
346
346
|
required: false,
|
|
@@ -354,28 +354,28 @@ async function handleUpdate(argv, prompter) {
|
|
|
354
354
|
skipPrompt: true,
|
|
355
355
|
},
|
|
356
356
|
{
|
|
357
|
-
type: '
|
|
357
|
+
type: 'json',
|
|
358
358
|
name: 'filterData',
|
|
359
359
|
message: 'filterData',
|
|
360
360
|
required: false,
|
|
361
361
|
skipPrompt: true,
|
|
362
362
|
},
|
|
363
363
|
{
|
|
364
|
-
type: '
|
|
364
|
+
type: 'boolean',
|
|
365
365
|
name: 'securityInvoker',
|
|
366
366
|
message: 'securityInvoker',
|
|
367
367
|
required: false,
|
|
368
368
|
skipPrompt: true,
|
|
369
369
|
},
|
|
370
370
|
{
|
|
371
|
-
type: '
|
|
371
|
+
type: 'boolean',
|
|
372
372
|
name: 'isReadOnly',
|
|
373
373
|
message: 'isReadOnly',
|
|
374
374
|
required: false,
|
|
375
375
|
skipPrompt: true,
|
|
376
376
|
},
|
|
377
377
|
{
|
|
378
|
-
type: '
|
|
378
|
+
type: 'json',
|
|
379
379
|
name: 'smartTags',
|
|
380
380
|
message: 'smartTags',
|
|
381
381
|
required: false,
|
package/esm/public/cli/index.js
CHANGED
|
@@ -10,9 +10,9 @@ if (process.argv.includes('--version') || process.argv.includes('-v')) {
|
|
|
10
10
|
console.log(pkg.version);
|
|
11
11
|
process.exit(0);
|
|
12
12
|
}
|
|
13
|
-
// Check for --tty false to enable non-interactive mode (noTty)
|
|
13
|
+
// Check for --tty false or --no-tty to enable non-interactive mode (noTty)
|
|
14
14
|
const ttyIdx = process.argv.indexOf('--tty');
|
|
15
|
-
const noTty = ttyIdx !== -1 && process.argv[ttyIdx + 1] === 'false';
|
|
15
|
+
const noTty = (ttyIdx !== -1 && process.argv[ttyIdx + 1] === 'false') || process.argv.includes('--no-tty');
|
|
16
16
|
const options = {
|
|
17
17
|
noTty,
|
|
18
18
|
minimistOpts: { alias: { v: 'version', h: 'help' } },
|
|
@@ -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/esm/public/cli/utils.js
CHANGED
|
@@ -115,6 +115,30 @@ export function parseMutationInput(answers) {
|
|
|
115
115
|
}
|
|
116
116
|
return answers;
|
|
117
117
|
}
|
|
118
|
+
/**
|
|
119
|
+
* Reconstruct nested objects from dot-notation CLI answers.
|
|
120
|
+
* When INPUT_OBJECT args are flattened to dot-notation questions
|
|
121
|
+
* (e.g. `--input.email foo --input.password bar`), this function
|
|
122
|
+
* rebuilds the nested structure expected by the ORM:
|
|
123
|
+
*
|
|
124
|
+
* { 'input.email': 'foo', 'input.password': 'bar' }
|
|
125
|
+
* → { input: { email: 'foo', password: 'bar' } }
|
|
126
|
+
*
|
|
127
|
+
* Non-dotted keys are passed through unchanged.
|
|
128
|
+
* Uses `nested-obj` for safe nested property setting.
|
|
129
|
+
*/
|
|
130
|
+
export function unflattenDotNotation(answers) {
|
|
131
|
+
const result = {};
|
|
132
|
+
for (const [key, value] of Object.entries(answers)) {
|
|
133
|
+
if (key.includes('.')) {
|
|
134
|
+
objectPath.set(result, key, value);
|
|
135
|
+
}
|
|
136
|
+
else {
|
|
137
|
+
result[key] = value;
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
return result;
|
|
141
|
+
}
|
|
118
142
|
/**
|
|
119
143
|
* Build a select object from a comma-separated list of dot-notation paths.
|
|
120
144
|
* Uses `nested-obj` to parse paths like 'clientMutationId,result.accessToken,result.userId'
|
|
@@ -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, {
|