Skip to content

Commit df50eab

Browse files
authored
Subscriptions (#10114)
1 parent f7df43a commit df50eab

File tree

129 files changed

+5486
-634
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

129 files changed

+5486
-634
lines changed

.vscode/launch.json

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -740,6 +740,27 @@
740740
"sourceMaps": true,
741741
"cwd": "${workspaceRoot}/services/sign/pod-sign"
742742
},
743+
{
744+
"name": "Debug payment",
745+
"type": "node",
746+
"request": "launch",
747+
"args": ["src/index.ts"],
748+
"env": {
749+
"PORT": "3040",
750+
"SECRET": "secret",
751+
"SERVICE_ID": "payment-service",
752+
"ACCOUNTS_URL": "http://huly.local:3000",
753+
"FRONT_URL": "http://huly.local:8087",
754+
"USE_SANDBOX": "true",
755+
// "POLAR_ACCESS_TOKEN": "polar_xxx",
756+
// "POLAR_WEBHOOK_SECRET": "whsec_xxx",
757+
// "POLAR_SUBSCRIPTION_PLANS": "common@tier:prod_1a,prod_1b;rare@tier:prod_2;epic@tier:prod_3;legendary@tier:prod_4"
758+
},
759+
"runtimeArgs": ["--nolazy", "-r", "ts-node/register"],
760+
"runtimeVersion": "20",
761+
"sourceMaps": true,
762+
"cwd": "${workspaceRoot}/services/payment/pod-payment"
763+
},
743764
{
744765
"name": "Debug rekoni",
745766
"type": "node",

common/config/rush/pnpm-lock.yaml

Lines changed: 602 additions & 424 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

common/scripts/docker.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,6 @@ rush docker:build -p 20 \
2525
--to @hcengineering/pod-backup \
2626
--to @hcengineering/backup-api-pod \
2727
--to @hcengineering/pod-billing \
28-
--to @hcengineering/pod-process \
29-
--to @hcengineering/pod-rating
28+
--to @hcengineering/pod-process \
29+
--to @hcengineering/pod-rating \
30+
--to @hcengineering/pod-payment

desktop/src/ui/platform.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -358,6 +358,7 @@ export async function configurePlatform (onWorkbenchConnect?: () => Promise<void
358358
setMetadata(exportPlugin.metadata.ExportUrl, config.EXPORT_URL ?? '')
359359

360360
setMetadata(billingPlugin.metadata.BillingURL, config.BILLING_URL ?? '')
361+
setMetadata(presentation.metadata.PaymentUrl, config.PAYMENT_URL ?? '')
361362

362363
const languages = myBranding.languages !== undefined && myBranding.languages !== '' ? myBranding.languages.split(',').map((l) => l.trim()) : ['en', 'ru', 'es', 'pt', 'zh', 'fr', 'cs', 'it', 'de', 'ja', 'tr']
363364

desktop/src/ui/types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ export interface Config {
6464
MAIL_URL?: string
6565
COMMUNICATION_API_ENABLED?: string
6666
BILLING_URL?: string
67+
PAYMENT_URL?: string
6768
PULSE_URL?: string
6869
PASSWORD_STRICTNESS?: 'very_strict' | 'strict' | 'normal' | 'none'
6970
EXCLUDED_APPLICATIONS_FOR_ANONYMOUS?: string

dev/docker-compose.min.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,22 @@ services:
123123
- PORT=4900
124124
- SERVER_SECRET=secret
125125
restart: unless-stopped
126+
payment:
127+
image: hardcoreeng/payment
128+
extra_hosts:
129+
- 'huly.local:host-gateway'
130+
ports:
131+
- 3040:3040
132+
environment:
133+
- SECRET=secret
134+
- PORT=3040
135+
- ACCOUNTS_URL=http://huly.local:3000
136+
- FRONT_URL=http://huly.local:8087
137+
- USE_SANDBOX=true
138+
- POLAR_ACCESS_TOKEN=${POLAR_ACCESS_TOKEN}
139+
- POLAR_WEBHOOK_SECRET=${POLAR_WEBHOOK_SECRET}
140+
- POLAR_SUBSCRIPTION_PLANS=${POLAR_SUBSCRIPTION_PLANS}
141+
restart: unless-stopped
126142
workspace_cockroach:
127143
image: hardcoreeng/workspace
128144
extra_hosts:
@@ -203,6 +219,7 @@ services:
203219
- DESKTOP_UPDATES_CHANNELS=dev;tracex:dev-tracex
204220
- BRANDING_URL=http://huly.local:8087/branding.json
205221
- STREAM_URL=http://huly.local:1080/recording
222+
- PAYMENT_URL=http://huly.local:3040
206223
# - DISABLE_SIGNUP=true
207224
restart: unless-stopped
208225
transactor_cockroach:

dev/docker-compose.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,23 @@ services:
199199
- SERVER_SECRET=secret
200200
- OTEL_EXPORTER_OTLP_ENDPOINT=http://jaeger:4318/v1/traces
201201
restart: unless-stopped
202+
payment:
203+
image: hardcoreeng/payment
204+
extra_hosts:
205+
- 'huly.local:host-gateway'
206+
ports:
207+
- 3040:3040
208+
environment:
209+
- SECRET=secret
210+
- PORT=3040
211+
- ACCOUNTS_URL=http://huly.local:3000
212+
- FRONT_URL=http://huly.local:8087
213+
- USE_SANDBOX=true
214+
- POLAR_ACCESS_TOKEN=${POLAR_ACCESS_TOKEN}
215+
- POLAR_WEBHOOK_SECRET=${POLAR_WEBHOOK_SECRET}
216+
- POLAR_SUBSCRIPTION_PLANS=${POLAR_SUBSCRIPTION_PLANS}
217+
- OTEL_EXPORTER_OTLP_ENDPOINT=http://jaeger:4318/v1/traces
218+
restart: unless-stopped
202219
workspace_cockroach:
203220
image: hardcoreeng/workspace
204221
extra_hosts:
@@ -279,6 +296,7 @@ services:
279296
- DESKTOP_UPDATES_CHANNELS=dev;tracex:dev-tracex
280297
- BRANDING_URL=http://huly.local:8087/branding.json
281298
- STREAM_URL=http://huly.local:1080/recording
299+
- PAYMENT_URL=http://huly.local:3040
282300
- COMMUNICATION_API_ENABLED=true
283301
- BACKUP_URL=http://huly.local:4039/api/backup,
284302
- EXCLUDED_APPLICATIONS_FOR_ANONYMOUS=["chunter", "notification"]

dev/prod/public/config.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
"STATS_URL": "http://huly.local:4900",
2323
"PASSWORD_STRICTNESS": "none",
2424
"STREAM_URL": "http://huly.local:1080/recording",
25+
"PAYMENT_URL": "http://huly.local:3040",
2526
"PUBLIC_SCHEDULE_URL": "http://huly.local:8060",
2627
"CALDAV_SERVER_URL": "http://huly.local:9070",
2728
"EXPORT_URL": "http://huly.local:4009",

dev/prod/src/platform.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,7 @@ export interface Config {
201201
MAIL_URL?: string
202202
COMMUNICATION_API_ENABLED?: string
203203
BILLING_URL?: string
204+
PAYMENT_URL?: string
204205
EXCLUDED_APPLICATIONS_FOR_ANONYMOUS?: string
205206
PULSE_URL?: string
206207
HULYLAKE_URL?: string
@@ -514,6 +515,7 @@ export async function configurePlatform () {
514515
setMetadata(exportPlugin.metadata.ExportUrl, config.EXPORT_URL ?? '')
515516

516517
setMetadata(billingPlugin.metadata.BillingURL, config.BILLING_URL ?? '')
518+
setMetadata(presentation.metadata.PaymentUrl, config.PAYMENT_URL ?? '')
517519

518520
setMetadata(presentation.metadata.PulseUrl, config.PULSE_URL)
519521
setMetadata(presentation.metadata.HulylakeUrl, config.HULYLAKE_URL ?? '')

dev/storybook/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"test": "echo \"No test specified\""
1212
},
1313
"devDependencies": {
14-
"@hcengineering/platform": "^0.7.5",
14+
"@hcengineering/platform": "^0.7.17",
1515
"@hcengineering/theme": "^0.7.0",
1616
"@hcengineering/ui": "^0.7.0",
1717
"@storybook/addon-essentials": "^7.0.6",

0 commit comments

Comments
 (0)