powersync 0.7.1 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (133) hide show
  1. package/LICENSE +67 -0
  2. package/README.md +1376 -165
  3. package/bin/dev.cmd +3 -3
  4. package/bin/dev.js +20 -7
  5. package/bin/run.cmd +3 -3
  6. package/bin/run.js +9 -5
  7. package/dist/api/cloud/create-cloud-instance.d.ts +15 -0
  8. package/dist/api/cloud/create-cloud-instance.js +19 -0
  9. package/dist/api/cloud/fetch-cloud-config.d.ts +12 -0
  10. package/dist/api/cloud/fetch-cloud-config.js +18 -0
  11. package/dist/api/cloud/fetch-cloud-sync-rules-content.d.ts +7 -0
  12. package/dist/api/cloud/fetch-cloud-sync-rules-content.js +26 -0
  13. package/dist/api/cloud/test-connection.d.ts +16 -0
  14. package/dist/api/cloud/test-connection.js +36 -0
  15. package/dist/api/cloud/validate-cloud-link-config.d.ts +17 -0
  16. package/dist/api/cloud/validate-cloud-link-config.js +47 -0
  17. package/dist/api/cloud/wait-for-operation.d.ts +16 -0
  18. package/dist/api/cloud/wait-for-operation.js +33 -0
  19. package/dist/api/cloud/write-cloud-link.d.ts +10 -0
  20. package/dist/api/cloud/write-cloud-link.js +21 -0
  21. package/dist/api/display-status.d.ts +4 -0
  22. package/dist/api/display-status.js +80 -0
  23. package/dist/api/ide/configure-vscode-ide.d.ts +14 -0
  24. package/dist/api/ide/configure-vscode-ide.js +62 -0
  25. package/dist/api/login-server.d.ts +26 -0
  26. package/dist/api/login-server.js +137 -0
  27. package/dist/api/run-validation-tests.d.ts +63 -0
  28. package/dist/api/run-validation-tests.js +202 -0
  29. package/dist/api/self-hosted/fetch-self-hosted-sync-rules-content.d.ts +7 -0
  30. package/dist/api/self-hosted/fetch-self-hosted-sync-rules-content.js +26 -0
  31. package/dist/commands/configure/ide.d.ts +8 -0
  32. package/dist/commands/configure/ide.js +58 -0
  33. package/dist/commands/configure/index.d.ts +8 -0
  34. package/dist/commands/configure/index.js +11 -0
  35. package/dist/commands/deploy/index.d.ts +48 -0
  36. package/dist/commands/deploy/index.js +333 -0
  37. package/dist/commands/deploy/service-config.d.ts +14 -0
  38. package/dist/commands/deploy/service-config.js +30 -0
  39. package/dist/commands/deploy/sync-config.d.ts +24 -0
  40. package/dist/commands/deploy/sync-config.js +103 -0
  41. package/dist/commands/destroy.d.ts +14 -0
  42. package/dist/commands/destroy.js +62 -0
  43. package/dist/commands/fetch/config.d.ts +14 -0
  44. package/dist/commands/fetch/config.js +33 -0
  45. package/dist/commands/fetch/index.d.ts +13 -0
  46. package/dist/commands/fetch/index.js +16 -0
  47. package/dist/commands/fetch/instances.d.ts +47 -0
  48. package/dist/commands/fetch/instances.js +177 -0
  49. package/dist/commands/fetch/status.d.ts +18 -0
  50. package/dist/commands/fetch/status.js +60 -0
  51. package/dist/commands/{instance/schema.d.ts → generate/index.d.ts} +3 -1
  52. package/dist/commands/generate/index.js +11 -0
  53. package/dist/commands/generate/schema.d.ts +19 -0
  54. package/dist/commands/generate/schema.js +72 -0
  55. package/dist/commands/generate/token.d.ts +25 -0
  56. package/dist/commands/generate/token.js +124 -0
  57. package/dist/commands/init/cloud.d.ts +11 -0
  58. package/dist/commands/init/cloud.js +64 -0
  59. package/dist/commands/{init.d.ts → init/index.d.ts} +2 -1
  60. package/dist/commands/init/index.js +11 -0
  61. package/dist/commands/init/self-hosted.d.ts +11 -0
  62. package/dist/commands/init/self-hosted.js +60 -0
  63. package/dist/commands/link/cloud.d.ts +15 -0
  64. package/dist/commands/link/cloud.js +111 -0
  65. package/dist/commands/{instance/config.d.ts → link/index.d.ts} +3 -1
  66. package/dist/commands/link/index.js +11 -0
  67. package/dist/commands/link/self-hosted.d.ts +12 -0
  68. package/dist/commands/link/self-hosted.js +54 -0
  69. package/dist/commands/login.d.ts +8 -0
  70. package/dist/commands/login.js +107 -0
  71. package/dist/commands/logout.d.ts +8 -0
  72. package/dist/commands/logout.js +19 -0
  73. package/dist/commands/migrate/index.d.ts +7 -0
  74. package/dist/commands/migrate/index.js +10 -0
  75. package/dist/commands/migrate/sync-rules.d.ts +15 -0
  76. package/dist/commands/migrate/sync-rules.js +51 -0
  77. package/dist/commands/{instances.d.ts → pull/index.d.ts} +3 -1
  78. package/dist/commands/pull/index.js +11 -0
  79. package/dist/commands/pull/instance.d.ts +14 -0
  80. package/dist/commands/pull/instance.js +108 -0
  81. package/dist/commands/status.d.ts +1 -0
  82. package/dist/commands/status.js +2 -0
  83. package/dist/commands/stop.d.ts +14 -0
  84. package/dist/commands/stop.js +62 -0
  85. package/dist/commands/validate.d.ts +16 -0
  86. package/dist/commands/validate.js +165 -0
  87. package/dist/help.d.ts +31 -0
  88. package/dist/help.js +123 -0
  89. package/oclif.manifest.json +1250 -275
  90. package/package.json +104 -75
  91. package/templates/cloud/powersync/cli.yaml +3 -0
  92. package/templates/cloud/powersync/service.yaml +174 -0
  93. package/templates/cloud/powersync/sync-config.yaml +22 -0
  94. package/templates/self-hosted/base/powersync/cli.yaml +3 -0
  95. package/templates/self-hosted/base/powersync/service.yaml +243 -0
  96. package/templates/self-hosted/base/powersync/sync-config.yaml +22 -0
  97. package/templates/vscode/settings.json +3 -0
  98. package/dist/commands/init.js +0 -66
  99. package/dist/commands/instance/config.js +0 -23
  100. package/dist/commands/instance/create.d.ts +0 -20
  101. package/dist/commands/instance/create.js +0 -121
  102. package/dist/commands/instance/deploy.d.ts +0 -18
  103. package/dist/commands/instance/deploy.js +0 -91
  104. package/dist/commands/instance/destroy.d.ts +0 -9
  105. package/dist/commands/instance/destroy.js +0 -46
  106. package/dist/commands/instance/generate-dev-token.d.ts +0 -10
  107. package/dist/commands/instance/generate-dev-token.js +0 -54
  108. package/dist/commands/instance/schema.js +0 -20
  109. package/dist/commands/instance/set.d.ts +0 -9
  110. package/dist/commands/instance/set.js +0 -31
  111. package/dist/commands/instance/status.d.ts +0 -12
  112. package/dist/commands/instance/status.js +0 -50
  113. package/dist/commands/instance/stop.d.ts +0 -9
  114. package/dist/commands/instance/stop.js +0 -42
  115. package/dist/commands/instance/sync-rules/deploy.d.ts +0 -10
  116. package/dist/commands/instance/sync-rules/deploy.js +0 -49
  117. package/dist/commands/instance/sync-rules/generate-schema.d.ts +0 -10
  118. package/dist/commands/instance/sync-rules/generate-schema.js +0 -56
  119. package/dist/commands/instance/sync-rules/validate.d.ts +0 -9
  120. package/dist/commands/instance/sync-rules/validate.js +0 -29
  121. package/dist/commands/instances.js +0 -29
  122. package/dist/commands.utils.d.ts +0 -2
  123. package/dist/commands.utils.js +0 -92
  124. package/dist/constants.d.ts +0 -8
  125. package/dist/constants.js +0 -10
  126. package/dist/instance-command-flags.d.ts +0 -12
  127. package/dist/instance-command-flags.js +0 -13
  128. package/dist/service/accounts.client.js +0 -11307
  129. package/dist/service/powersync.client.js +0 -75510
  130. package/dist/service/types.js +0 -1
  131. package/dist/service/utils.js +0 -153
  132. package/dist/utils.d.ts +0 -14
  133. package/dist/utils.js +0 -68
@@ -1,42 +0,0 @@
1
- import { Command, Flags, ux } from '@oclif/core';
2
- import inquirer from 'inquirer';
3
- import ora from 'ora';
4
- import * as PowerSyncClient from '../../service/powersync.client.js';
5
- import { bold, checkThatEnvVariablesAreSet, red, yellow } from '../../utils.js';
6
- export default class InstanceDeactivate extends Command {
7
- static description = 'Stop the current instance.';
8
- static examples = ['<%= config.bin %> <%= command.id %>'];
9
- static flags = {
10
- skipConfirmation: Flags.boolean({ char: 's', description: 'Ignore confirmation question.' })
11
- };
12
- async run() {
13
- checkThatEnvVariablesAreSet(this.config.bin, true);
14
- const { flags } = await this.parse(InstanceDeactivate);
15
- const questions = [
16
- {
17
- message: 'Are you sure you want to do stop the instance?',
18
- name: 'areYouSure',
19
- type: 'confirm',
20
- when: !flags.skipConfirmation
21
- }
22
- ];
23
- const answers = await inquirer.prompt(questions);
24
- if (!answers.areYouSure && !flags.skipConfirmation) {
25
- return ux.log('Instance will not be stopped.');
26
- }
27
- const spinner = ora({
28
- prefixText: 'Stopping instance.\n ',
29
- spinner: 'moon',
30
- suffixText: '\nThis may take a few minutes.\n'
31
- });
32
- spinner.start();
33
- const instance = await PowerSyncClient.deactivateInstance();
34
- let status = 'pending';
35
- status = await PowerSyncClient.waitForStatusChange(instance.id);
36
- spinner.stop();
37
- if (status === 'failed') {
38
- return ux.error(red(`There was an error stopping the instance. Please try again.`), { exit: 1 });
39
- }
40
- ux.log(yellow(`Instance with id ${bold(instance.id)} has been stopped.`));
41
- }
42
- }
@@ -1,10 +0,0 @@
1
- import { Command } from '@oclif/core';
2
- export default class SyncRulesDeploy extends Command {
3
- static description: string;
4
- static examples: string[];
5
- static flags: {
6
- filePath: import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
7
- skipConfirmation: import("@oclif/core/lib/interfaces/parser.js").BooleanFlag<boolean>;
8
- };
9
- run(): Promise<void>;
10
- }
@@ -1,49 +0,0 @@
1
- import { Command, Flags, ux } from '@oclif/core';
2
- import inquirer from 'inquirer';
3
- import fs from 'node:fs';
4
- import ora from 'ora';
5
- import * as PowerSyncClient from '../../../service/powersync.client.js';
6
- import { bold, checkThatEnvVariablesAreSet, green, red } from '../../../utils.js';
7
- export default class SyncRulesDeploy extends Command {
8
- static description = 'Deploy sync rules from a local sync rules config file to the current instance.';
9
- static examples = [
10
- '<%= config.bin %> <%= command.id %>',
11
- '<%= config.bin %> <%= command.id %> --filePath path/to/file',
12
- '<%= config.bin %> <%= command.id %> -f path/to/file'
13
- ];
14
- static flags = {
15
- filePath: Flags.string({ char: 'f', description: 'Path to the sync rules config file.', required: true }),
16
- skipConfirmation: Flags.boolean({ char: 's', description: 'Ignore confirmation question.' })
17
- };
18
- async run() {
19
- checkThatEnvVariablesAreSet(this.config.bin, true);
20
- const { flags } = await this.parse(SyncRulesDeploy);
21
- const questions = [
22
- {
23
- message: 'Are you sure you want to do deploy sync files?',
24
- name: 'areYouSure',
25
- type: 'confirm',
26
- when: !flags.skipConfirmation
27
- }
28
- ];
29
- const answers = await inquirer.prompt(questions);
30
- if (!answers.areYouSure && !flags.skipConfirmation) {
31
- return ux.log(red('Sync files were not deployed.'));
32
- }
33
- const syncRules = fs.readFileSync(flags.filePath, 'utf8');
34
- const spinner = ora({
35
- prefixText: 'Deploying sync rules to instance.\n',
36
- spinner: 'moon',
37
- suffixText: '\nThis may take a few minutes.\n'
38
- });
39
- spinner.start();
40
- const instance = await PowerSyncClient.deploySyncRules(syncRules);
41
- let status = 'pending';
42
- status = await PowerSyncClient.waitForStatusChange(instance.id);
43
- spinner.stop();
44
- if (status === 'failed') {
45
- return ux.error(red('There was an error creating the instance. Please try again.'), { exit: 1 });
46
- }
47
- ux.log(green(`Sync rules have successfully been deployed to instance with id ${bold(instance.id)}.`));
48
- }
49
- }
@@ -1,10 +0,0 @@
1
- import { Command } from '@oclif/core';
2
- export default class SyncRulesGenerateSchema extends Command {
3
- static description: string;
4
- static examples: string[];
5
- static flags: {
6
- filePath: import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
7
- language: import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
8
- };
9
- run(): Promise<void>;
10
- }
@@ -1,56 +0,0 @@
1
- import { Command, Flags, ux } from '@oclif/core';
2
- import inquirer from 'inquirer';
3
- import fs from 'node:fs';
4
- import { LANGUAGES } from '../../../constants.js';
5
- import * as PowerSyncClient from '../../../service/powersync.client.js';
6
- import { checkThatEnvVariablesAreSet, green, red } from '../../../utils.js';
7
- export default class SyncRulesGenerateSchema extends Command {
8
- static description = 'Generate schema in your language from your sync rules config file.';
9
- static examples = [
10
- '<%= config.bin %> <%= command.id %>',
11
- '<%= config.bin %> <%= command.id %> --filePath path/to/file',
12
- '<%= config.bin %> <%= command.id %> -f path/to/file'
13
- ];
14
- static flags = {
15
- filePath: Flags.string({ char: 'f', description: 'Path to the sync rules config file.', required: true }),
16
- language: Flags.string({
17
- char: 'l',
18
- description: 'Choose language for output.',
19
- options: LANGUAGES
20
- })
21
- };
22
- async run() {
23
- checkThatEnvVariablesAreSet(this.config.bin, true);
24
- const { flags } = await this.parse(SyncRulesGenerateSchema);
25
- const questions = [
26
- {
27
- choices: LANGUAGES,
28
- message: 'Which language would you like to output to?',
29
- name: 'language',
30
- type: 'list',
31
- when: !flags.language
32
- }
33
- ];
34
- const answers = await inquirer.prompt(questions);
35
- const schema = await PowerSyncClient.getInstanceSchema();
36
- const parsedSchema = new PowerSyncClient.StaticSchema(schema.connections);
37
- const syncRulesFromFile = fs.readFileSync(flags.filePath, 'utf8');
38
- const syncRules = PowerSyncClient.SqlSyncRules.fromYaml(syncRulesFromFile, {
39
- defaultSchema: 'public',
40
- schema: parsedSchema,
41
- throwOnError: false
42
- });
43
- const { errors } = syncRules;
44
- if (errors.length > 0) {
45
- ux.log(red(`❌ Sync rule errors found:`));
46
- errors.map((error) => {
47
- return ux.log(red(error.message));
48
- });
49
- return ux.exit(1);
50
- }
51
- const language = flags.language || answers.language;
52
- const generator = PowerSyncClient.schemaGenerators[language];
53
- const languageSchema = await generator.generate(syncRules, parsedSchema);
54
- ux.log(green(languageSchema));
55
- }
56
- }
@@ -1,9 +0,0 @@
1
- import { Command } from '@oclif/core';
2
- export default class SyncRulesValidate extends Command {
3
- static description: string;
4
- static examples: string[];
5
- static flags: {
6
- filePath: import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
7
- };
8
- run(): Promise<void>;
9
- }
@@ -1,29 +0,0 @@
1
- import { Command, Flags, ux } from '@oclif/core';
2
- import fs from 'node:fs';
3
- import * as PowerSyncClient from '../../../service/powersync.client.js';
4
- import { checkThatEnvVariablesAreSet, green, red } from '../../../utils.js';
5
- export default class SyncRulesValidate extends Command {
6
- static description = 'Validate sync rules from a local sync rules config file.';
7
- static examples = [
8
- '<%= config.bin %> <%= command.id %>',
9
- '<%= config.bin %> <%= command.id %> --filePath path/to/file',
10
- '<%= config.bin %> <%= command.id %> -f path/to/file'
11
- ];
12
- static flags = {
13
- filePath: Flags.string({ char: 'f', description: 'Path to the sync rules config file.', required: true })
14
- };
15
- async run() {
16
- checkThatEnvVariablesAreSet(this.config.bin, true);
17
- const { flags } = await this.parse(SyncRulesValidate);
18
- const syncRules = fs.readFileSync(flags.filePath, 'utf8');
19
- const validation = await PowerSyncClient.validateSyncRules(syncRules);
20
- if (validation.errors.length > 0) {
21
- ux.log(red(`❌ errors found:`));
22
- for (const error of validation.errors) {
23
- ux.log(red(error.message));
24
- }
25
- return ux.exit(1);
26
- }
27
- ux.log(green('✅ Sync rules are valid'));
28
- }
29
- }
@@ -1,29 +0,0 @@
1
- import { Command, ux } from '@oclif/core';
2
- import * as AccountsClient from '../service/accounts.client.js';
3
- import * as PowerSyncClient from '../service/powersync.client.js';
4
- import { bold, checkThatEnvVariablesAreSet, green, red } from '../utils.js';
5
- export default class InstancesList extends Command {
6
- static description = 'View list of instances.';
7
- static examples = ['<%= config.bin %> <%= command.id %>'];
8
- async run() {
9
- checkThatEnvVariablesAreSet(this.config.bin, false);
10
- const project = await AccountsClient.getCurrentPowerSyncProject();
11
- const list = await PowerSyncClient.getInstancesList();
12
- const { instances } = list;
13
- if (instances.length === 0) {
14
- return ux.log(`It seems like you have ${red('no')} instances. Run ${green(`"npx ${this.config.bin} instance create"`)} to create your first instance.`);
15
- }
16
- ux.log(`Your ${bold('project')} is currently set to ${green(project.name)}.`);
17
- if (process.env.INSTANCE_ID) {
18
- const currentInstance = instances.find((instance) => instance.id === process.env.INSTANCE_ID);
19
- if (currentInstance) {
20
- ux.log(`Your ${bold('instance')} is currently set to ${green(currentInstance.name)}.\n`);
21
- }
22
- }
23
- ux.table(instances, {
24
- id: { header: 'ID' },
25
- name: { minWidth: 7 }
26
- }, { printLine: this.log.bind(this) });
27
- ux.log(`\nRun ${green(`"npx ${this.config.bin} instance set"`)} to use one of the instances.`);
28
- }
29
- }
@@ -1,2 +0,0 @@
1
- import type { Question } from 'inquirer';
2
- export declare const generateCommonDeployQuestions: (flags: any) => Question[];
@@ -1,92 +0,0 @@
1
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
2
- export const generateCommonDeployQuestions = (flags) => [
3
- {
4
- message: 'What is your database hostname?',
5
- name: 'hostname',
6
- type: 'input',
7
- validate(value) {
8
- return value.length > 0 ? true : 'Please enter your hostname.';
9
- },
10
- when: !flags.hostname
11
- },
12
- {
13
- default: 5432,
14
- message: 'What is the port number of your database?',
15
- name: 'port',
16
- type: 'input',
17
- validate(value) {
18
- const number = Number.parseFloat(value);
19
- if (Number.isNaN(number)) {
20
- return 'Please enter a valid port number.';
21
- }
22
- return String(value).length > 0 ? true : 'Please enter your port number.';
23
- },
24
- when: !flags.port
25
- },
26
- {
27
- default: 'postgres',
28
- message: 'What is your database name?',
29
- name: 'databaseName',
30
- type: 'input',
31
- validate(value) {
32
- return value.length > 0 ? true : 'Please enter your database name.';
33
- },
34
- when: !flags.databaseName
35
- },
36
- {
37
- default: 'postgres',
38
- message: 'What is your database username?',
39
- name: 'databaseUsername',
40
- type: 'input',
41
- validate(value) {
42
- return value.length > 0 ? true : 'Please enter your database username.';
43
- },
44
- when: !flags.databaseUsername
45
- },
46
- {
47
- message: 'What is your database password?',
48
- name: 'databasePassword',
49
- type: 'password',
50
- validate(value) {
51
- return value.length > 0 ? true : 'Please enter your password.';
52
- },
53
- when: !flags.databasePassword
54
- },
55
- {
56
- default: false,
57
- message: 'Are you using Supabase auth?',
58
- name: 'useSupabaseAuth',
59
- type: 'confirm',
60
- // eslint-disable-next-line eqeqeq,no-eq-null
61
- when: flags.useSupabaseAuth == null && !flags.jwksUri
62
- },
63
- {
64
- message: 'Enter the Supabase JWT secret (see https://docs.powersync.com/installation/authentication-setup/supabase-auth#supabase-auth)',
65
- name: 'supabaseJWTSecret',
66
- type: 'password',
67
- when: (answers) => (flags.useSupabaseAuth || answers.useSupabaseAuth) && !flags.supabaseJWTSecret
68
- },
69
- {
70
- message: 'Enter your JWKS URI (must include https://)?',
71
- name: 'jwksUri',
72
- type: 'input',
73
- validate(value) {
74
- const urlRegex = /^(https?|ftp):\/\/[^\s#$./?].\S*$/i;
75
- return urlRegex.test(value) ? true : 'Please enter a valid URL.';
76
- },
77
- when: (answers) => !flags.jwksUri && !answers.useSupabaseAuth
78
- },
79
- {
80
- default: false,
81
- message: 'Do you want to add audiences?',
82
- name: 'useAudiences',
83
- type: 'confirm',
84
- when: !flags.jwksUri
85
- },
86
- {
87
- message: 'Enter your JWT Audiences? (comma separated)',
88
- name: 'jwtAudiences',
89
- type: 'input',
90
- when: (answers) => answers.useAudiences
91
- }
92
- ];
@@ -1,8 +0,0 @@
1
- export declare const APP_NAME = "POWERSYNC_CLI";
2
- export declare const POWERSYNC_DIRECTORY: string;
3
- export declare const ENV_FILE_PATH: string;
4
- export declare const ENDPOINTS: {
5
- ACCOUNTS_URL: string;
6
- POWERSYNC_URL: string;
7
- };
8
- export declare const LANGUAGES: string[];
package/dist/constants.js DELETED
@@ -1,10 +0,0 @@
1
- import { homedir } from 'node:os';
2
- import path from 'node:path';
3
- export const APP_NAME = 'POWERSYNC_CLI';
4
- export const POWERSYNC_DIRECTORY = path.join(homedir(), '/.powersync');
5
- export const ENV_FILE_PATH = `${POWERSYNC_DIRECTORY}/.env.powersync`;
6
- export const ENDPOINTS = {
7
- ACCOUNTS_URL: 'https://accounts.journeyapps.com',
8
- POWERSYNC_URL: 'https://powersync-api.journeyapps.com'
9
- };
10
- export const LANGUAGES = ['js', 'dart'];
@@ -1,12 +0,0 @@
1
- export declare const generateCommonInstanceConfigFlags: () => {
2
- databaseName: import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
3
- databasePassword: import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
4
- databaseUsername: import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
5
- hostname: import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
6
- jwksUri: import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
7
- jwtAudiences: import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
8
- port: import("@oclif/core/lib/interfaces/parser.js").OptionFlag<number | undefined, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
9
- skipInteraction: import("@oclif/core/lib/interfaces/parser.js").BooleanFlag<boolean>;
10
- supabaseJWTSecret: import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
11
- useSupabaseAuth: import("@oclif/core/lib/interfaces/parser.js").BooleanFlag<boolean>;
12
- };
@@ -1,13 +0,0 @@
1
- import { Flags } from '@oclif/core';
2
- export const generateCommonInstanceConfigFlags = () => ({
3
- databaseName: Flags.string({ char: 'n', description: 'Name of the database.' }),
4
- databasePassword: Flags.string({ char: 'p', description: 'Password of the database.', hidden: true }),
5
- databaseUsername: Flags.string({ char: 'u', description: 'Username of the database.', hidden: true }),
6
- hostname: Flags.string({ char: 'h', description: 'Hostname to connect to database.' }),
7
- jwksUri: Flags.string({ char: 'w', description: 'JWKS URI (must include https://).' }),
8
- jwtAudiences: Flags.string({ char: 'a', default: '', description: 'JWT audiences (comma separated).' }),
9
- port: Flags.integer({ char: 'o', description: 'Port number to connect to database.' }),
10
- skipInteraction: Flags.boolean({ char: 's', description: 'Skip interactivity.' }),
11
- supabaseJWTSecret: Flags.string({ allowNo: true, char: 'j', description: 'Supabase JWT secret' }),
12
- useSupabaseAuth: Flags.boolean({ allowNo: true, char: 'b', description: 'Use Supabase auth.' })
13
- });