Skip to content

Commit a6aaf53

Browse files
author
Maya Shavin
committed
fix: improve build
1 parent 629eeae commit a6aaf53

11 files changed

Lines changed: 16 additions & 15 deletions

File tree

packages/url/lib/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { RESOURCE_TYPES } from '@cld-apis/utils'
2-
import { CldOptions, CloudConfig } from '@cld-apis/types'
2+
import type { CldOptions, CloudConfig } from '@cld-apis/types'
33
import { url, extractPublicId } from './url'
44
import { transform, toTransformationStr } from './transformers'
55

packages/url/lib/transformers/border.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Border } from '@cld-apis/types'
1+
import type { Border } from '@cld-apis/types'
22
import { convert } from './expression'
33

44
export const border = ({ type = 'solid', color = 'black', width }: Border) => {

packages/url/lib/transformers/condition.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import transform, { toTransformationStr } from ".";
22
import { ConditionOperators } from "@cld-apis/utils";
33
import { ConditionalParams } from '../constants/condition'
4-
import { Condition, ConditionExpression, Expression } from "@cld-apis/types";
4+
import type { Condition, ConditionExpression, Expression } from "@cld-apis/types";
55
import { toString } from "../utils";
66

77
export const computeCondition = (conditionObj: ConditionExpression): { expression: string, transformations: string } => {

packages/url/lib/transformers/effect.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Effect, VEffect } from '@cld-apis/types'
1+
import type { Effect, VEffect } from '@cld-apis/types'
22
import { toString } from '../utils'
33

44
export const effect = (obj: Effect | VEffect):string => {

packages/url/lib/transformers/flags.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Flag, VFlag } from "@cld-apis/types"
1+
import type { Flag, VFlag } from "@cld-apis/types"
22

33
export const flags = (value?: Flag | VFlag ):string => {
44
if (!value || value.length === 0) return ''

packages/url/lib/transformers/index.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Transformation } from '@cld-apis/types'
1+
import type { Transformation } from '@cld-apis/types'
22
import { TRANSFORMERS } from '../constants'
33
import { AcceptNumbericVars } from '../constants/arithmetic'
44
import { condition } from './condition'
@@ -9,21 +9,22 @@ import { rawTransformation } from './rawTransformation'
99
import { variables } from './variables'
1010
import { fps } from './video/fps'
1111
import { offset } from './video/offset'
12+
import { resize } from './resize'
13+
import { border } from './border'
14+
import { position } from './position'
1215

1316
export const getResize = (options):string => {
1417
const hasResize = options.resize || options.width || options.height || options.aspectRatio
1518

1619
if (!hasResize) return ''
1720

18-
const { resize } = require('./resize')
1921

2022
return resize(options.resize || { width: options.width, height: options.height, type: options.crop, aspectRatio: options.aspectRatio })
2123
}
2224

2325
export const getBorder = (options):string => {
2426
if (!options.border) return ''
2527

26-
const { border } = require('./border')
2728

2829
const borderModification = (typeof options.border === 'string') ? `bo_${options.border}` : border(options.border)
2930

@@ -33,7 +34,6 @@ export const getBorder = (options):string => {
3334
export const getPosition = (options): string => {
3435
if (!options.x && !options.y && !options.position) return ''
3536

36-
const { position } = require('./position')
3737

3838
return position(options.position || { x: options.x, y: options.y })
3939
}

packages/url/lib/transformers/position.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Position } from '@cld-apis/types'
1+
import type { Position } from '@cld-apis/types'
22
import { formatValue } from './expression'
33

44
export const position = ({ x, y }: Position) => {

packages/url/lib/transformers/variables.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Formats, Prefix } from "../constants/variable";
22
import { ValueAssignable } from '@cld-apis/utils'
3-
import { StringValue, Variable } from "@cld-apis/types";
3+
import type { StringValue, Variable } from "@cld-apis/types";
44
import { toString } from "../utils";
55
import { convert, hasArithmeticExpression } from "./expression";
66

packages/url/lib/transformers/video/fps.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { FPS, FPSType } from "@cld-apis/types"
1+
import type { FPS, FPSType } from "@cld-apis/types"
22
import { toString } from "../../utils"
33

44
export const fps = (value?: FPS):string => {

packages/url/lib/transformers/video/offset.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Offset } from '@cld-apis/types'
1+
import type { Offset } from '@cld-apis/types'
22

33
export const offset = (obj?: Offset) => {
44
if (!obj) return ''

0 commit comments

Comments
 (0)