stripe-experiment-sync 1.0.20 → 1.0.21

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,6 +1,6 @@
1
1
  import {
2
2
  package_default
3
- } from "./chunk-NM6L6EPQ.js";
3
+ } from "./chunk-OWZ4QNLS.js";
4
4
 
5
5
  // src/supabase/supabase.ts
6
6
  import { SupabaseManagementAPI } from "supabase-management-js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  package_default
3
- } from "./chunk-NM6L6EPQ.js";
3
+ } from "./chunk-OWZ4QNLS.js";
4
4
 
5
5
  // src/stripeSync.ts
6
6
  import Stripe3 from "stripe";
@@ -55,9 +55,7 @@ var QueryUtils = class _QueryUtils {
55
55
 
56
56
  // src/database/postgres.ts
57
57
  var ORDERED_STRIPE_TABLES = [
58
- "exchange_rates_from_usd",
59
58
  "subscription_items",
60
- "subscription_item_change_events_v2_beta",
61
59
  "subscriptions",
62
60
  "subscription_schedules",
63
61
  "checkout_session_line_items",
@@ -3,11 +3,11 @@ import {
3
3
  StripeSync,
4
4
  createStripeWebSocketClient,
5
5
  runMigrations
6
- } from "./chunk-HHDPFCIA.js";
6
+ } from "./chunk-ECLPGCY6.js";
7
7
  import {
8
8
  install,
9
9
  uninstall
10
- } from "./chunk-UPJNFZXA.js";
10
+ } from "./chunk-3KTFUZTY.js";
11
11
 
12
12
  // src/cli/config.ts
13
13
  import dotenv from "dotenv";
@@ -1,7 +1,7 @@
1
1
  // package.json
2
2
  var package_default = {
3
3
  name: "stripe-experiment-sync",
4
- version: "1.0.20",
4
+ version: "1.0.21",
5
5
  private: false,
6
6
  description: "Stripe Sync Engine to sync Stripe data to Postgres",
7
7
  type: "module",
@@ -30,7 +30,8 @@ var package_default = {
30
30
  build: "tsup src/index.ts src/supabase/index.ts src/cli/index.ts src/cli/lib.ts --format esm,cjs --dts --shims && cp -r src/database/migrations dist/migrations",
31
31
  lint: "eslint src --ext .ts",
32
32
  test: "vitest",
33
- "test:integration": "TEST_POSTGRES_DB_URL=postgresql://postgres:postgres@localhost:55432/postgres vitest run src/stripeSync*integration.test.ts",
33
+ "test:integration": "TEST_POSTGRES_DB_URL=${TEST_POSTGRES_DB_URL:-postgresql://postgres:postgres@localhost:55432/postgres} vitest run src/stripeSync*integration.test.ts",
34
+ "test:e2e": "vitest run --config vitest.e2e.config.ts",
34
35
  "generate:sigma-schema": "tsx src/sigma/schema/fetch-schema.ts"
35
36
  },
36
37
  files: [
@@ -33,7 +33,7 @@ var import_commander = require("commander");
33
33
  // package.json
34
34
  var package_default = {
35
35
  name: "stripe-experiment-sync",
36
- version: "1.0.20",
36
+ version: "1.0.21",
37
37
  private: false,
38
38
  description: "Stripe Sync Engine to sync Stripe data to Postgres",
39
39
  type: "module",
@@ -62,7 +62,8 @@ var package_default = {
62
62
  build: "tsup src/index.ts src/supabase/index.ts src/cli/index.ts src/cli/lib.ts --format esm,cjs --dts --shims && cp -r src/database/migrations dist/migrations",
63
63
  lint: "eslint src --ext .ts",
64
64
  test: "vitest",
65
- "test:integration": "TEST_POSTGRES_DB_URL=postgresql://postgres:postgres@localhost:55432/postgres vitest run src/stripeSync*integration.test.ts",
65
+ "test:integration": "TEST_POSTGRES_DB_URL=${TEST_POSTGRES_DB_URL:-postgresql://postgres:postgres@localhost:55432/postgres} vitest run src/stripeSync*integration.test.ts",
66
+ "test:e2e": "vitest run --config vitest.e2e.config.ts",
66
67
  "generate:sigma-schema": "tsx src/sigma/schema/fetch-schema.ts"
67
68
  },
68
69
  files: [
@@ -239,9 +240,7 @@ var QueryUtils = class _QueryUtils {
239
240
 
240
241
  // src/database/postgres.ts
241
242
  var ORDERED_STRIPE_TABLES = [
242
- "exchange_rates_from_usd",
243
243
  "subscription_items",
244
- "subscription_item_change_events_v2_beta",
245
244
  "subscriptions",
246
245
  "subscription_schedules",
247
246
  "checkout_session_line_items",
package/dist/cli/index.js CHANGED
@@ -5,12 +5,12 @@ import {
5
5
  migrateCommand,
6
6
  syncCommand,
7
7
  uninstallCommand
8
- } from "../chunk-DFIHCPGH.js";
9
- import "../chunk-HHDPFCIA.js";
10
- import "../chunk-UPJNFZXA.js";
8
+ } from "../chunk-G26S5D5J.js";
9
+ import "../chunk-ECLPGCY6.js";
10
+ import "../chunk-3KTFUZTY.js";
11
11
  import {
12
12
  package_default
13
- } from "../chunk-NM6L6EPQ.js";
13
+ } from "../chunk-OWZ4QNLS.js";
14
14
 
15
15
  // src/cli/index.ts
16
16
  import { Command } from "commander";
package/dist/cli/lib.cjs CHANGED
@@ -117,7 +117,7 @@ async function loadConfig(options) {
117
117
  // package.json
118
118
  var package_default = {
119
119
  name: "stripe-experiment-sync",
120
- version: "1.0.20",
120
+ version: "1.0.21",
121
121
  private: false,
122
122
  description: "Stripe Sync Engine to sync Stripe data to Postgres",
123
123
  type: "module",
@@ -146,7 +146,8 @@ var package_default = {
146
146
  build: "tsup src/index.ts src/supabase/index.ts src/cli/index.ts src/cli/lib.ts --format esm,cjs --dts --shims && cp -r src/database/migrations dist/migrations",
147
147
  lint: "eslint src --ext .ts",
148
148
  test: "vitest",
149
- "test:integration": "TEST_POSTGRES_DB_URL=postgresql://postgres:postgres@localhost:55432/postgres vitest run src/stripeSync*integration.test.ts",
149
+ "test:integration": "TEST_POSTGRES_DB_URL=${TEST_POSTGRES_DB_URL:-postgresql://postgres:postgres@localhost:55432/postgres} vitest run src/stripeSync*integration.test.ts",
150
+ "test:e2e": "vitest run --config vitest.e2e.config.ts",
150
151
  "generate:sigma-schema": "tsx src/sigma/schema/fetch-schema.ts"
151
152
  },
152
153
  files: [
@@ -253,9 +254,7 @@ var QueryUtils = class _QueryUtils {
253
254
 
254
255
  // src/database/postgres.ts
255
256
  var ORDERED_STRIPE_TABLES = [
256
- "exchange_rates_from_usd",
257
257
  "subscription_items",
258
- "subscription_item_change_events_v2_beta",
259
258
  "subscriptions",
260
259
  "subscription_schedules",
261
260
  "checkout_session_line_items",
package/dist/cli/lib.js CHANGED
@@ -6,10 +6,10 @@ import {
6
6
  migrateCommand,
7
7
  syncCommand,
8
8
  uninstallCommand
9
- } from "../chunk-DFIHCPGH.js";
10
- import "../chunk-HHDPFCIA.js";
11
- import "../chunk-UPJNFZXA.js";
12
- import "../chunk-NM6L6EPQ.js";
9
+ } from "../chunk-G26S5D5J.js";
10
+ import "../chunk-ECLPGCY6.js";
11
+ import "../chunk-3KTFUZTY.js";
12
+ import "../chunk-OWZ4QNLS.js";
13
13
  export {
14
14
  backfillCommand,
15
15
  createTunnel,
package/dist/index.cjs CHANGED
@@ -46,7 +46,7 @@ var importMetaUrl = /* @__PURE__ */ getImportMetaUrl();
46
46
  // package.json
47
47
  var package_default = {
48
48
  name: "stripe-experiment-sync",
49
- version: "1.0.20",
49
+ version: "1.0.21",
50
50
  private: false,
51
51
  description: "Stripe Sync Engine to sync Stripe data to Postgres",
52
52
  type: "module",
@@ -75,7 +75,8 @@ var package_default = {
75
75
  build: "tsup src/index.ts src/supabase/index.ts src/cli/index.ts src/cli/lib.ts --format esm,cjs --dts --shims && cp -r src/database/migrations dist/migrations",
76
76
  lint: "eslint src --ext .ts",
77
77
  test: "vitest",
78
- "test:integration": "TEST_POSTGRES_DB_URL=postgresql://postgres:postgres@localhost:55432/postgres vitest run src/stripeSync*integration.test.ts",
78
+ "test:integration": "TEST_POSTGRES_DB_URL=${TEST_POSTGRES_DB_URL:-postgresql://postgres:postgres@localhost:55432/postgres} vitest run src/stripeSync*integration.test.ts",
79
+ "test:e2e": "vitest run --config vitest.e2e.config.ts",
79
80
  "generate:sigma-schema": "tsx src/sigma/schema/fetch-schema.ts"
80
81
  },
81
82
  files: [
@@ -182,9 +183,7 @@ var QueryUtils = class _QueryUtils {
182
183
 
183
184
  // src/database/postgres.ts
184
185
  var ORDERED_STRIPE_TABLES = [
185
- "exchange_rates_from_usd",
186
186
  "subscription_items",
187
- "subscription_item_change_events_v2_beta",
188
187
  "subscriptions",
189
188
  "subscription_schedules",
190
189
  "checkout_session_line_items",
package/dist/index.js CHANGED
@@ -5,8 +5,8 @@ import {
5
5
  createStripeWebSocketClient,
6
6
  hashApiKey,
7
7
  runMigrations
8
- } from "./chunk-HHDPFCIA.js";
9
- import "./chunk-NM6L6EPQ.js";
8
+ } from "./chunk-ECLPGCY6.js";
9
+ import "./chunk-OWZ4QNLS.js";
10
10
  export {
11
11
  PostgresClient,
12
12
  StripeSync,
@@ -0,0 +1,3 @@
1
+ -- Drop unused sigma beta tables if they exist.
2
+ DROP TABLE IF EXISTS "stripe"."subscription_item_change_events_v2_beta";
3
+ DROP TABLE IF EXISTS "stripe"."exchange_rates_from_usd";
@@ -59,7 +59,7 @@ var sigmaWorkerFunctionCode = sigma_data_worker_default;
59
59
  // package.json
60
60
  var package_default = {
61
61
  name: "stripe-experiment-sync",
62
- version: "1.0.20",
62
+ version: "1.0.21",
63
63
  private: false,
64
64
  description: "Stripe Sync Engine to sync Stripe data to Postgres",
65
65
  type: "module",
@@ -88,7 +88,8 @@ var package_default = {
88
88
  build: "tsup src/index.ts src/supabase/index.ts src/cli/index.ts src/cli/lib.ts --format esm,cjs --dts --shims && cp -r src/database/migrations dist/migrations",
89
89
  lint: "eslint src --ext .ts",
90
90
  test: "vitest",
91
- "test:integration": "TEST_POSTGRES_DB_URL=postgresql://postgres:postgres@localhost:55432/postgres vitest run src/stripeSync*integration.test.ts",
91
+ "test:integration": "TEST_POSTGRES_DB_URL=${TEST_POSTGRES_DB_URL:-postgresql://postgres:postgres@localhost:55432/postgres} vitest run src/stripeSync*integration.test.ts",
92
+ "test:e2e": "vitest run --config vitest.e2e.config.ts",
92
93
  "generate:sigma-schema": "tsx src/sigma/schema/fetch-schema.ts"
93
94
  },
94
95
  files: [
@@ -10,8 +10,8 @@ import {
10
10
  uninstall,
11
11
  webhookFunctionCode,
12
12
  workerFunctionCode
13
- } from "../chunk-UPJNFZXA.js";
14
- import "../chunk-NM6L6EPQ.js";
13
+ } from "../chunk-3KTFUZTY.js";
14
+ import "../chunk-OWZ4QNLS.js";
15
15
  export {
16
16
  INSTALLATION_ERROR_SUFFIX,
17
17
  INSTALLATION_INSTALLED_SUFFIX,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "stripe-experiment-sync",
3
- "version": "1.0.20",
3
+ "version": "1.0.21",
4
4
  "private": false,
5
5
  "description": "Stripe Sync Engine to sync Stripe data to Postgres",
6
6
  "type": "module",
@@ -29,7 +29,8 @@
29
29
  "build": "tsup src/index.ts src/supabase/index.ts src/cli/index.ts src/cli/lib.ts --format esm,cjs --dts --shims && cp -r src/database/migrations dist/migrations",
30
30
  "lint": "eslint src --ext .ts",
31
31
  "test": "vitest",
32
- "test:integration": "TEST_POSTGRES_DB_URL=postgresql://postgres:postgres@localhost:55432/postgres vitest run src/stripeSync*integration.test.ts",
32
+ "test:integration": "TEST_POSTGRES_DB_URL=${TEST_POSTGRES_DB_URL:-postgresql://postgres:postgres@localhost:55432/postgres} vitest run src/stripeSync*integration.test.ts",
33
+ "test:e2e": "vitest run --config vitest.e2e.config.ts",
33
34
  "generate:sigma-schema": "tsx src/sigma/schema/fetch-schema.ts"
34
35
  },
35
36
  "files": [