Skip to content

Commit

Permalink
style(prettier): run prettier for whole project
Browse files Browse the repository at this point in the history
\
  • Loading branch information
anteqkois committed May 23, 2024
1 parent 521a999 commit a053f0d
Show file tree
Hide file tree
Showing 640 changed files with 23,795 additions and 24,187 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/build-and-deploy.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
name: build-and-deploy

on:
workflow_dispatch
on: workflow_dispatch
# on:
# push:
# branches:
Expand Down Expand Up @@ -50,8 +49,7 @@ jobs:
- name: Build image for web
run: docker build -t linkerry/web -f ./apps/web/Dockerfile . --platform=linux/amd64
- name: Tag web image
run:
docker tag linkerry/web registry.digitalocean.com/linkerry/web:latest
run: docker tag linkerry/web registry.digitalocean.com/linkerry/web:latest
- name: Push image to DO Container Registry
run: docker push registry.digitalocean.com/linkerry/web:latest
# - run: npx [email protected] affected -t docker-compose --base=origin/master~1 --head=origin/master
3 changes: 1 addition & 2 deletions .github/workflows/deploy-changed-apps.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
name: deploy-changed-apps

on:
workflow_dispatch
on: workflow_dispatch
# on:
# push:
# branches:
Expand Down
70 changes: 35 additions & 35 deletions .scripts/custom-error.ts
Original file line number Diff line number Diff line change
@@ -1,49 +1,49 @@
export enum ErrorCode {
APP_CONNECTION_NOT_FOUND = 'APP_CONNECTION_NOT_FOUND',
AUTHENTICATION = 'AUTHENTICATION',
AUTHORIZATION = 'AUTHORIZATION',
CONFIG_NOT_FOUND = 'CONFIG_NOT_FOUND',
APP_CONNECTION_NOT_FOUND = 'APP_CONNECTION_NOT_FOUND',
AUTHENTICATION = 'AUTHENTICATION',
AUTHORIZATION = 'AUTHORIZATION',
CONFIG_NOT_FOUND = 'CONFIG_NOT_FOUND',
}

type CustomErrorMetadata = Record<string, any>

export class CustomError extends Error {
name = 'CustomError'
isOperational = true
metadata: CustomErrorMetadata | null
code: ErrorCode
name = 'CustomError'
isOperational = true
metadata: CustomErrorMetadata | null
code: ErrorCode

constructor(
message: string,
code: ErrorCode,
metadata?: CustomErrorMetadata,
// isOperational = true
) {
super(`${code} ${message}`)
this.metadata = metadata ?? null
this.code = code
Error.captureStackTrace(this, this.constructor)
}
constructor(
message: string,
code: ErrorCode,
metadata?: CustomErrorMetadata,
// isOperational = true
) {
super(`${code} ${message}`)
this.metadata = metadata ?? null
this.code = code
Error.captureStackTrace(this, this.constructor)
}
}

const main = async () => {
try {
throw new CustomError('Test error without metadata', ErrorCode.AUTHENTICATION)
} catch (error) {
console.log(error)
console.log(error.name)
}
try {
throw new CustomError('Test error without metadata', ErrorCode.AUTHENTICATION)
} catch (error) {
console.log(error)
console.log(error.name)
}

try {
throw new CustomError('Test error witj metadata', ErrorCode.AUTHENTICATION, {
test: true,
action: 'TEST',
})
} catch (error) {
console.log(error)
}
try {
throw new CustomError('Test error witj metadata', ErrorCode.AUTHENTICATION, {
test: true,
action: 'TEST',
})
} catch (error) {
console.log(error)
}
}

main()
.then()
.catch((err) => console.log(err))
.then()
.catch((err) => console.log(err))
18 changes: 9 additions & 9 deletions .scripts/failed-fetch.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
const main = async () => {
const response = await fetch('https://pro-api.coingecko.com/api/v3/coins/list/new?&x_cg_pro_api_key={YOUR_KEY}', {
method: 'GET',
})
const response = await fetch('https://pro-api.coingecko.com/api/v3/coins/list/new?&x_cg_pro_api_key={YOUR_KEY}', {
method: 'GET',
})

// console.log(response.ok)
console.log(await response.json())
console.log(await response.status)
console.log(await response.statusText)
// console.log(response.ok)
console.log(await response.json())
console.log(await response.status)
console.log(await response.statusText)
}

main()
.then((c) => c)
.catch((err) => console.log(err))
.then((c) => c)
.catch((err) => console.log(err))
58 changes: 29 additions & 29 deletions .scripts/lodash-merge.ts
Original file line number Diff line number Diff line change
@@ -1,39 +1,39 @@
import merge from 'lodash.merge'

const base = {
name: 'trigger_1',
valid: false,
displayName: 'Top trending coins',
type: 'CONNECTOR',
settings: {
connectorName: '@linkerry/coingecko',
connectorVersion: '0.0.1',
triggerName: 'trending_coins',
connectorType: 'Official',
input: {},
inputUiInfo: {
before:1
},
},
nextActionName: '',
name: 'trigger_1',
valid: false,
displayName: 'Top trending coins',
type: 'CONNECTOR',
settings: {
connectorName: '@linkerry/coingecko',
connectorVersion: '0.0.1',
triggerName: 'trending_coins',
connectorType: 'Official',
input: {},
inputUiInfo: {
before: 1,
},
},
nextActionName: '',
}

const main = async () => {
console.log(
merge(base, {
valid: true,
settings: {
inputUiInfo: {
currentData: [],
testXD: 123,
},
},
}),
)
console.log(
merge(base, {
valid: true,
settings: {
inputUiInfo: {
currentData: [],
testXD: 123,
},
},
}),
)

process.exit(0)
process.exit(0)
}

main()
.then()
.catch((err) => console.log(err))
.then()
.catch((err) => console.log(err))
6 changes: 1 addition & 5 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
{
"recommendations": [
"nrwl.angular-console",
"esbenp.prettier-vscode",
"firsttris.vscode-jest-runner"
]
"recommendations": ["nrwl.angular-console", "esbenp.prettier-vscode", "firsttris.vscode-jest-runner"]
}
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ nanoid must have fixed version 3.3.6 !!!
engine and connector-framework must use bundler

# Development Rules

- all models should be in @core lib, to be sherabled beetwen apps
- all model schema also should be in @core lib
- only unsherable service should be in apps
- all models, entities names are pluar (-s)

- all models, entities names are pluar (-s)

DEPLOY NA API NA SERVER
DEPLOY NA API NA SERVER
2 changes: 1 addition & 1 deletion apps/api-gateway-e2e/jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ export default {
},
moduleFileExtensions: ['ts', 'js', 'html'],
coverageDirectory: '../../coverage/api-gateway-e2e',
};
}
Loading

0 comments on commit a053f0d

Please sign in to comment.