powersync 0.2.4 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -13,7 +13,7 @@ $ npm install -g powersync
13
13
  $ powersync COMMAND
14
14
  running command...
15
15
  $ powersync (--version)
16
- powersync/0.2.4 linux-x64 node-v20.11.0
16
+ powersync/0.3.0 linux-x64 node-v20.11.1
17
17
  $ powersync --help [COMMAND]
18
18
  USAGE
19
19
  $ powersync COMMAND
@@ -74,7 +74,7 @@ EXAMPLES
74
74
  $ powersync init
75
75
  ```
76
76
 
77
- _See code: [src/commands/init.ts](https://github.com/powersync-ja/cli/blob/v0.2.4/src/commands/init.ts)_
77
+ _See code: [src/commands/init.ts](https://github.com/powersync-ja/cli/blob/v0.3.0/src/commands/init.ts)_
78
78
 
79
79
  ## `powersync instance config`
80
80
 
@@ -91,7 +91,7 @@ EXAMPLES
91
91
  $ powersync instance config
92
92
  ```
93
93
 
94
- _See code: [src/commands/instance/config.ts](https://github.com/powersync-ja/cli/blob/v0.2.4/src/commands/instance/config.ts)_
94
+ _See code: [src/commands/instance/config.ts](https://github.com/powersync-ja/cli/blob/v0.3.0/src/commands/instance/config.ts)_
95
95
 
96
96
  ## `powersync instance create`
97
97
 
@@ -118,7 +118,7 @@ EXAMPLES
118
118
  $ powersync instance create
119
119
  ```
120
120
 
121
- _See code: [src/commands/instance/create.ts](https://github.com/powersync-ja/cli/blob/v0.2.4/src/commands/instance/create.ts)_
121
+ _See code: [src/commands/instance/create.ts](https://github.com/powersync-ja/cli/blob/v0.3.0/src/commands/instance/create.ts)_
122
122
 
123
123
  ## `powersync instance deploy`
124
124
 
@@ -143,7 +143,7 @@ EXAMPLES
143
143
  $ powersync instance deploy
144
144
  ```
145
145
 
146
- _See code: [src/commands/instance/deploy.ts](https://github.com/powersync-ja/cli/blob/v0.2.4/src/commands/instance/deploy.ts)_
146
+ _See code: [src/commands/instance/deploy.ts](https://github.com/powersync-ja/cli/blob/v0.3.0/src/commands/instance/deploy.ts)_
147
147
 
148
148
  ## `powersync instance destroy`
149
149
 
@@ -163,7 +163,7 @@ EXAMPLES
163
163
  $ powersync instance destroy
164
164
  ```
165
165
 
166
- _See code: [src/commands/instance/destroy.ts](https://github.com/powersync-ja/cli/blob/v0.2.4/src/commands/instance/destroy.ts)_
166
+ _See code: [src/commands/instance/destroy.ts](https://github.com/powersync-ja/cli/blob/v0.3.0/src/commands/instance/destroy.ts)_
167
167
 
168
168
  ## `powersync instance schema`
169
169
 
@@ -180,7 +180,7 @@ EXAMPLES
180
180
  $ powersync instance schema
181
181
  ```
182
182
 
183
- _See code: [src/commands/instance/schema.ts](https://github.com/powersync-ja/cli/blob/v0.2.4/src/commands/instance/schema.ts)_
183
+ _See code: [src/commands/instance/schema.ts](https://github.com/powersync-ja/cli/blob/v0.3.0/src/commands/instance/schema.ts)_
184
184
 
185
185
  ## `powersync instance set`
186
186
 
@@ -202,7 +202,7 @@ EXAMPLES
202
202
  $ powersync instance set --instanceId=1234
203
203
  ```
204
204
 
205
- _See code: [src/commands/instance/set.ts](https://github.com/powersync-ja/cli/blob/v0.2.4/src/commands/instance/set.ts)_
205
+ _See code: [src/commands/instance/set.ts](https://github.com/powersync-ja/cli/blob/v0.3.0/src/commands/instance/set.ts)_
206
206
 
207
207
  ## `powersync instance status`
208
208
 
@@ -227,7 +227,7 @@ EXAMPLES
227
227
  $ powersync instance status --orgId=1234 --appId=1234 --instanceId=1234 --authToken=1234
228
228
  ```
229
229
 
230
- _See code: [src/commands/instance/status.ts](https://github.com/powersync-ja/cli/blob/v0.2.4/src/commands/instance/status.ts)_
230
+ _See code: [src/commands/instance/status.ts](https://github.com/powersync-ja/cli/blob/v0.3.0/src/commands/instance/status.ts)_
231
231
 
232
232
  ## `powersync instance stop`
233
233
 
@@ -247,7 +247,7 @@ EXAMPLES
247
247
  $ powersync instance stop
248
248
  ```
249
249
 
250
- _See code: [src/commands/instance/stop.ts](https://github.com/powersync-ja/cli/blob/v0.2.4/src/commands/instance/stop.ts)_
250
+ _See code: [src/commands/instance/stop.ts](https://github.com/powersync-ja/cli/blob/v0.3.0/src/commands/instance/stop.ts)_
251
251
 
252
252
  ## `powersync instance sync-rules deploy`
253
253
 
@@ -272,7 +272,7 @@ EXAMPLES
272
272
  $ powersync instance sync-rules deploy -f path/to/file
273
273
  ```
274
274
 
275
- _See code: [src/commands/instance/sync-rules/deploy.ts](https://github.com/powersync-ja/cli/blob/v0.2.4/src/commands/instance/sync-rules/deploy.ts)_
275
+ _See code: [src/commands/instance/sync-rules/deploy.ts](https://github.com/powersync-ja/cli/blob/v0.3.0/src/commands/instance/sync-rules/deploy.ts)_
276
276
 
277
277
  ## `powersync instance sync-rules generate-schema`
278
278
 
@@ -298,7 +298,7 @@ EXAMPLES
298
298
  $ powersync instance sync-rules generate-schema -f path/to/file
299
299
  ```
300
300
 
301
- _See code: [src/commands/instance/sync-rules/generate-schema.ts](https://github.com/powersync-ja/cli/blob/v0.2.4/src/commands/instance/sync-rules/generate-schema.ts)_
301
+ _See code: [src/commands/instance/sync-rules/generate-schema.ts](https://github.com/powersync-ja/cli/blob/v0.3.0/src/commands/instance/sync-rules/generate-schema.ts)_
302
302
 
303
303
  ## `powersync instance sync-rules validate`
304
304
 
@@ -322,7 +322,7 @@ EXAMPLES
322
322
  $ powersync instance sync-rules validate -f path/to/file
323
323
  ```
324
324
 
325
- _See code: [src/commands/instance/sync-rules/validate.ts](https://github.com/powersync-ja/cli/blob/v0.2.4/src/commands/instance/sync-rules/validate.ts)_
325
+ _See code: [src/commands/instance/sync-rules/validate.ts](https://github.com/powersync-ja/cli/blob/v0.3.0/src/commands/instance/sync-rules/validate.ts)_
326
326
 
327
327
  ## `powersync instances`
328
328
 
@@ -339,5 +339,5 @@ EXAMPLES
339
339
  $ powersync instances
340
340
  ```
341
341
 
342
- _See code: [src/commands/instances.ts](https://github.com/powersync-ja/cli/blob/v0.2.4/src/commands/instances.ts)_
342
+ _See code: [src/commands/instances.ts](https://github.com/powersync-ja/cli/blob/v0.3.0/src/commands/instances.ts)_
343
343
  <!-- commandsstop -->
@@ -152,7 +152,7 @@ export default class InstanceCreate extends Command {
152
152
  });
153
153
  spinner.start();
154
154
  const instance = await PowerSyncClient.createInstance(instanceName);
155
- await PowerSyncClient.deployInstance(config, instance.id, { options: { shouldApplyAdditionalHeaders: false } });
155
+ await PowerSyncClient.deployInstance(config, instance.id);
156
156
  let status = 'pending';
157
157
  status = await PowerSyncClient.waitForStatusChange(instance.id);
158
158
  spinner.stop();
@@ -97,9 +97,7 @@ export default class InstanceDeploy extends Command {
97
97
  const databaseName = flags.databaseName || answers.databaseName;
98
98
  const databaseUsername = flags.databaseUsername || answers.databaseUsername;
99
99
  const useSupabaseAuth = flags.useSupabaseAuth || answers.useSupabaseAuth;
100
- const instanceConfig = await PowerSyncClient.getInstanceConfig({
101
- options: { shouldApplyAdditionalHeaders: false }
102
- });
100
+ const instanceConfig = await PowerSyncClient.getInstanceConfig();
103
101
  const { region } = instanceConfig.config;
104
102
  const config = {
105
103
  client_auth: {
@@ -12,7 +12,7 @@ export default class InstanceDestroy extends Command {
12
12
  async run() {
13
13
  checkForValidEnvFile(this.config.bin, true);
14
14
  const { flags } = await this.parse(InstanceDestroy);
15
- const config = await PowerSyncClient.getInstanceConfig({ options: { shouldApplyAdditionalHeaders: false } });
15
+ const config = await PowerSyncClient.getInstanceConfig();
16
16
  const questions = [
17
17
  {
18
18
  message: `Please type ${red(config.name)} to confirm you want to destroy this instance.\n`,
@@ -1,3 +1,4 @@
1
+ export declare const APP_NAME = "POWERSYNC_CLI";
1
2
  export declare const POWERSYNC_DIRECTORY: string;
2
3
  export declare const ENV_FILE_PATH: string;
3
4
  export declare const ENDPOINTS: {
package/dist/constants.js CHANGED
@@ -1,5 +1,6 @@
1
1
  import { homedir } from 'node:os';
2
2
  import path from 'node:path';
3
+ export const APP_NAME = 'POWERSYNC_CLI';
3
4
  export const POWERSYNC_DIRECTORY = path.join(homedir(), '/.powersync');
4
5
  export const ENV_FILE_PATH = `${POWERSYNC_DIRECTORY}/.env.powersync`;
5
6
  export const ENDPOINTS = {