Compile with swc on twenty-server (#4863)
Experiment using swc instead of tsc (as we did the switch on twenty-front) It's **much** faster (at least 5x) but has stricter requirements. I fixed the build but there's still an error while starting the server, opening this PR for discussion. Checkout the branch and try `nx build:swc twenty-server` Read: https://docs.nestjs.com/recipes/swc#common-pitfalls
This commit is contained in:
@ -4,6 +4,7 @@ import {
|
||||
Entity,
|
||||
ManyToOne,
|
||||
PrimaryGeneratedColumn,
|
||||
Relation,
|
||||
Unique,
|
||||
UpdateDateColumn,
|
||||
} from 'typeorm';
|
||||
@ -42,7 +43,7 @@ export class BillingSubscriptionItem {
|
||||
onDelete: 'CASCADE',
|
||||
},
|
||||
)
|
||||
billingSubscription: BillingSubscription;
|
||||
billingSubscription: Relation<BillingSubscription>;
|
||||
|
||||
@Column({ nullable: false })
|
||||
stripeProductId: string;
|
||||
|
||||
@ -8,6 +8,7 @@ import {
|
||||
ManyToOne,
|
||||
OneToMany,
|
||||
PrimaryGeneratedColumn,
|
||||
Relation,
|
||||
UpdateDateColumn,
|
||||
} from 'typeorm';
|
||||
import Stripe from 'stripe';
|
||||
@ -37,7 +38,7 @@ export class BillingSubscription {
|
||||
onDelete: 'CASCADE',
|
||||
})
|
||||
@JoinColumn()
|
||||
workspace: Workspace;
|
||||
workspace: Relation<Workspace>;
|
||||
|
||||
@Column({ nullable: false, type: 'uuid' })
|
||||
workspaceId: string;
|
||||
@ -48,17 +49,17 @@ export class BillingSubscription {
|
||||
@Column({ unique: true, nullable: false })
|
||||
stripeSubscriptionId: string;
|
||||
|
||||
@Field()
|
||||
@Column({ nullable: false })
|
||||
@Field(() => String)
|
||||
@Column({ type: 'text', nullable: false })
|
||||
status: Stripe.Subscription.Status;
|
||||
|
||||
@Field({ nullable: true })
|
||||
@Column({ nullable: true })
|
||||
@Field(() => String, { nullable: true })
|
||||
@Column({ type: 'text', nullable: true })
|
||||
interval: Stripe.Price.Recurring.Interval;
|
||||
|
||||
@OneToMany(
|
||||
() => BillingSubscriptionItem,
|
||||
(billingSubscriptionItem) => billingSubscriptionItem.billingSubscription,
|
||||
)
|
||||
billingSubscriptionItems: BillingSubscriptionItem[];
|
||||
billingSubscriptionItems: Relation<BillingSubscriptionItem[]>;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user