Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/tricky-eagles-draw.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'powersync': patch
---

Reduce NPM dependency size
2 changes: 1 addition & 1 deletion cli/src/commands/generate/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export default class GenerateSchema extends SharedInstanceCommand {

async getCloudSchema(project: CloudProject): Promise<routes.GetSchemaResponse> {
const { linked } = project;
const client = await createCloudClient();
const client = createCloudClient();
return client.getInstanceSchema({
app_id: linked.project_id,
id: linked.instance_id,
Expand Down
5 changes: 3 additions & 2 deletions cli/src/commands/pull/instance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ import {
getDefaultOrgId,
SERVICE_FILENAME,
ServiceType,
SYNC_FILENAME
SYNC_FILENAME,
YAML_SYNC_RULES_SCHEMA
} from '@powersync/cli-core';
import { ServiceCloudConfig } from '@powersync/cli-schemas';
import { existsSync, mkdirSync, writeFileSync } from 'node:fs';
Expand Down Expand Up @@ -145,7 +146,7 @@ export default class PullInstance extends CloudInstanceCommand {
if (typeof fetched.syncRules === 'string') {
const syncOutputName = !overwrite && syncExists ? SYNC_FETCHED_FILENAME : SYNC_FILENAME;
const syncOutputPath = join(projectDir, syncOutputName);
writeFileSync(syncOutputPath, fetched.syncRules, 'utf8');
writeFileSync(syncOutputPath, YAML_SYNC_RULES_SCHEMA + '\n' + fetched.syncRules, 'utf8');
this.log(`Wrote ${ux.colorize('blue', syncOutputName)} with sync config from the cloud.`);
} else if (!fetched.syncRules && !syncExists) {
// If there is no sync config in the cloud and no existing sync config locally, we should still create an empty sync-config.yaml with the correct header and schema reference
Expand Down
2 changes: 1 addition & 1 deletion packages/cli-core/src/utils/env.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const DEFAULT_PS_MANAGEMENT_SERVICE_URL = 'https://powersync-api.journeyapps.com';
const DEFAULT_PS_ACCOUNTS_HUB_SERVICE_URL = 'https://accounts.journeyapps.com';
const DEFAULT_PS_ACCOUNTS_HUB_SERVICE_URL = 'https://accounts.powersync.com';
const DEFAULT_PS_DASHBOARD_URL = 'https://dashboard.powersync.com';

export type ENV = {
Expand Down
Loading
Loading