instant-cli 0.22.155-branch-e2e-test-cli.22788653035.1 → 0.22.155-branch-e2e-test-cli.22789124220.1

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.
@@ -1,4 +1,4 @@
1
1
 
2
- > instant-cli@0.22.155-branch-e2e-test-cli.22788653035.1 build /home/runner/work/instant/instant/client/packages/cli
2
+ > instant-cli@0.22.155-branch-e2e-test-cli.22789124220.1 build /home/runner/work/instant/instant/client/packages/cli
3
3
  > rm -rf dist; tsc -p tsconfig.json
4
4
 
@@ -209,13 +209,14 @@ export default _schema;
209
209
  appId,
210
210
  schemaFile: initialSchema,
211
211
  });
212
- await runCli(['push', 'schema', '--yes'], {
212
+ const seedResult = await runCli(['push', 'schema', '--yes'], {
213
213
  cwd: project1.dir,
214
214
  env: {
215
215
  INSTANT_CLI_AUTH_TOKEN: adminToken,
216
216
  INSTANT_APP_ID: appId,
217
217
  },
218
218
  });
219
+ expect(seedResult.exitCode).toBe(0);
219
220
  await project1.cleanup();
220
221
 
221
222
  const project2 = await createTestProject({
@@ -9,6 +9,10 @@ const CLI_BIN = join(__dirname, '../../bin/index.js');
9
9
 
10
10
  const apiUrl = process.env.INSTANT_CLI_API_URI || 'https://api.instantdb.com';
11
11
 
12
+ // Temp directory used to sandbox CLI config (auth tokens, etc.)
13
+ // so tests never read or mutate the real user config on disk.
14
+ const sandboxHome = join(tmpdir(), 'instant-cli-e2e-home');
15
+
12
16
  export type CliResult = {
13
17
  stdout: string;
14
18
  stderr: string;
@@ -32,6 +36,9 @@ export function runCli(
32
36
  INSTANT_CLI_API_URI: apiUrl,
33
37
  DOTENV_CONFIG_PATH: '/dev/null',
34
38
  INSTANT_CLI_AUTH_TOKEN: '',
39
+ HOME: sandboxHome,
40
+ XDG_CONFIG_HOME: join(sandboxHome, '.config'),
41
+ XDG_DATA_HOME: join(sandboxHome, '.local', 'share'),
35
42
  ...opts.env,
36
43
  },
37
44
  cwd: opts.cwd,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "instant-cli",
3
3
  "type": "module",
4
- "version": "0.22.155-branch-e2e-test-cli.22788653035.1",
4
+ "version": "0.22.155-branch-e2e-test-cli.22789124220.1",
5
5
  "description": "Instant's CLI",
6
6
  "homepage": "https://github.com/instantdb/instant/tree/main/client/packages/cli",
7
7
  "repository": {
@@ -41,9 +41,9 @@
41
41
  "strip-ansi": "^7.1.2",
42
42
  "terminal-link": "^3.0.0",
43
43
  "unconfig": "^0.5.5",
44
- "@instantdb/version": "0.22.155-branch-e2e-test-cli.22788653035.1",
45
- "@instantdb/core": "0.22.155-branch-e2e-test-cli.22788653035.1",
46
- "@instantdb/platform": "0.22.155-branch-e2e-test-cli.22788653035.1"
44
+ "@instantdb/core": "0.22.155-branch-e2e-test-cli.22789124220.1",
45
+ "@instantdb/platform": "0.22.155-branch-e2e-test-cli.22789124220.1",
46
+ "@instantdb/version": "0.22.155-branch-e2e-test-cli.22789124220.1"
47
47
  },
48
48
  "devDependencies": {
49
49
  "@babel/core": "^7.17.9",