powersync 0.6.0 → 0.7.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 +26 -25
- package/dist/commands/instance/config.js +2 -2
- package/dist/commands/instance/create.d.ts +1 -0
- package/dist/commands/instance/create.js +15 -8
- package/dist/commands/instance/deploy.js +2 -3
- package/dist/commands/instance/destroy.js +2 -2
- package/dist/commands/instance/generate-dev-token.js +2 -2
- package/dist/commands/instance/schema.js +2 -2
- package/dist/commands/instance/set.js +2 -2
- package/dist/commands/instance/status.js +2 -2
- package/dist/commands/instance/stop.js +2 -2
- package/dist/commands/instance/sync-rules/deploy.js +2 -2
- package/dist/commands/instance/sync-rules/generate-schema.js +3 -2
- package/dist/commands/instance/sync-rules/validate.js +2 -2
- package/dist/commands/instances.js +2 -2
- package/dist/commands.utils.js +7 -1
- package/dist/service/accounts.client.js +4 -4
- package/dist/service/powersync.client.js +57312 -25766
- package/dist/service/utils.js +4 -4
- package/dist/utils.d.ts +1 -1
- package/dist/utils.js +8 -4
- package/oclif.manifest.json +9 -1
- package/package.json +4 -4
package/dist/service/utils.js
CHANGED
|
@@ -18,7 +18,7 @@ var files = [
|
|
|
18
18
|
"/dist",
|
|
19
19
|
"/oclif.manifest.json"
|
|
20
20
|
];
|
|
21
|
-
var version = "0.
|
|
21
|
+
var version = "0.7.0";
|
|
22
22
|
var bugs = "https://github.com/powersync-ja/cli/issues";
|
|
23
23
|
var types = "dist/index.d.ts";
|
|
24
24
|
var exports = "./lib/index.js";
|
|
@@ -76,12 +76,12 @@ var dependencies = {
|
|
|
76
76
|
};
|
|
77
77
|
var devDependencies = {
|
|
78
78
|
"@changesets/cli": "^2.27.7",
|
|
79
|
-
"@journeyapps-platform/powersync
|
|
79
|
+
"@journeyapps-platform/types-powersync": "^1.12.1",
|
|
80
80
|
"@journeyapps-platform/sdk-accounts-hub": "^7.0.1",
|
|
81
81
|
"@journeyapps-platform/sdk-common": "^5.5.0",
|
|
82
|
-
"@journeyapps-platform/sdk-powersync": "^
|
|
82
|
+
"@journeyapps-platform/sdk-powersync": "^2.5.1",
|
|
83
83
|
"@journeyapps-platform/types-accounts-hub": "^7.0.1",
|
|
84
|
-
"@powersync/service-sync-rules": "^0.
|
|
84
|
+
"@powersync/service-sync-rules": "^0.27.0",
|
|
85
85
|
"@rollup/plugin-commonjs": "^26.0.1",
|
|
86
86
|
"@rollup/plugin-json": "^6.1.0",
|
|
87
87
|
"@rollup/plugin-node-resolve": "^15.2.3",
|
package/dist/utils.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const
|
|
1
|
+
export declare const checkThatEnvVariablesAreSet: (cliName: string, requiresInstanceId?: boolean) => undefined;
|
|
2
2
|
export declare const updateEnvFileVariableValue: (variableName: string, newValue: string) => void;
|
|
3
3
|
export declare const bold: (text: string) => string;
|
|
4
4
|
export declare const green: (text: string) => string;
|
package/dist/utils.js
CHANGED
|
@@ -3,15 +3,19 @@ import fs from 'node:fs';
|
|
|
3
3
|
import { ENV_FILE_PATH } from './constants.js';
|
|
4
4
|
import { ENV_VARIABLES } from './service/powersync.client.js';
|
|
5
5
|
// Add cliName as argument because we don't have access to this.config.bin in this file
|
|
6
|
-
export const
|
|
6
|
+
export const checkThatEnvVariablesAreSet = (cliName, requiresInstanceId = false) => {
|
|
7
7
|
const requiredProperties = [ENV_VARIABLES.PROJECT_ID, ENV_VARIABLES.AUTH_TOKEN, ENV_VARIABLES.ORG_ID];
|
|
8
8
|
const missingProperties = requiredProperties.filter((prop) => !process.env[prop]);
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
const envFileExists = fs.existsSync(ENV_FILE_PATH);
|
|
10
|
+
if (missingProperties.length > 0 && envFileExists) {
|
|
11
|
+
ux.error(red(`CLI has not been initialized correctly. Please run ${green(`"${cliName} init"`)}.`), { exit: 1 });
|
|
12
|
+
}
|
|
13
|
+
if (missingProperties.length > 0 && !envFileExists) {
|
|
14
|
+
ux.error(red(`Please include ${green(missingProperties.join(', '))} when you run the command or run ${green(`"${cliName} init"`)}.`), { exit: 1 });
|
|
11
15
|
}
|
|
12
16
|
const isInstanceIdRequired = requiresInstanceId && !process.env[ENV_VARIABLES.INSTANCE_ID];
|
|
13
17
|
if (isInstanceIdRequired) {
|
|
14
|
-
return ux.error(`This command requires a configured instance. Please set one by running ${green('"powersync instance set"')}
|
|
18
|
+
return ux.error(red(`This command requires a configured instance. Please set one by running ${green('"powersync instance set"')} or include it when you run the command ${green('"INSTANCE_ID=your_instance_id"')}.`), {
|
|
15
19
|
exit: 1
|
|
16
20
|
});
|
|
17
21
|
}
|
package/oclif.manifest.json
CHANGED
|
@@ -160,6 +160,14 @@
|
|
|
160
160
|
"allowNo": false,
|
|
161
161
|
"type": "boolean"
|
|
162
162
|
},
|
|
163
|
+
"supabaseJWTSecret": {
|
|
164
|
+
"char": "j",
|
|
165
|
+
"description": "Supabase JWT secret",
|
|
166
|
+
"name": "supabaseJWTSecret",
|
|
167
|
+
"hasDynamicHelp": false,
|
|
168
|
+
"multiple": false,
|
|
169
|
+
"type": "option"
|
|
170
|
+
},
|
|
163
171
|
"useSupabaseAuth": {
|
|
164
172
|
"char": "b",
|
|
165
173
|
"description": "Use Supabase auth.",
|
|
@@ -633,5 +641,5 @@
|
|
|
633
641
|
]
|
|
634
642
|
}
|
|
635
643
|
},
|
|
636
|
-
"version": "0.
|
|
644
|
+
"version": "0.7.0"
|
|
637
645
|
}
|
package/package.json
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"/dist",
|
|
17
17
|
"/oclif.manifest.json"
|
|
18
18
|
],
|
|
19
|
-
"version": "0.
|
|
19
|
+
"version": "0.7.0",
|
|
20
20
|
"bugs": "https://github.com/powersync-ja/cli/issues",
|
|
21
21
|
"types": "dist/index.d.ts",
|
|
22
22
|
"exports": "./lib/index.js",
|
|
@@ -57,12 +57,12 @@
|
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
59
|
"@changesets/cli": "^2.27.7",
|
|
60
|
-
"@journeyapps-platform/powersync
|
|
60
|
+
"@journeyapps-platform/types-powersync": "^1.12.1",
|
|
61
61
|
"@journeyapps-platform/sdk-accounts-hub": "^7.0.1",
|
|
62
62
|
"@journeyapps-platform/sdk-common": "^5.5.0",
|
|
63
|
-
"@journeyapps-platform/sdk-powersync": "^
|
|
63
|
+
"@journeyapps-platform/sdk-powersync": "^2.5.1",
|
|
64
64
|
"@journeyapps-platform/types-accounts-hub": "^7.0.1",
|
|
65
|
-
"@powersync/service-sync-rules": "^0.
|
|
65
|
+
"@powersync/service-sync-rules": "^0.27.0",
|
|
66
66
|
"@rollup/plugin-commonjs": "^26.0.1",
|
|
67
67
|
"@rollup/plugin-json": "^6.1.0",
|
|
68
68
|
"@rollup/plugin-node-resolve": "^15.2.3",
|