Skip to content

Commit

Permalink
chore: repo stable
Browse files Browse the repository at this point in the history
  • Loading branch information
sarthakjdev authored Sep 14, 2023
1 parent 0e5d51d commit 88928d8
Show file tree
Hide file tree
Showing 43 changed files with 183 additions and 53 deletions.
3 changes: 2 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
node_modules
*.env
dist
dist/cjs/**
dist/esm/**
errors.log
.eslintrc.js
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ build/**
dist/**
.next/**
yarn-error.log
dist
Empty file modified .husky/pre-commit
100644 → 100755
Empty file.
Empty file modified .husky/pre-push
100644 → 100755
Empty file.
11 changes: 11 additions & 0 deletions lint-staged.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
const prettierWriteCommand = 'yarn prettier --write'

// eslint-disable-next-line no-undef
module.exports = {
'*.ts': [prettierWriteCommand],
'*.tsx': [prettierWriteCommand],
'*.js': [prettierWriteCommand],
'*.jsx': [prettierWriteCommand],
'*.css': [prettierWriteCommand],
'*.scss': [prettierWriteCommand]
}
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,11 @@
],
"private": true,
"scripts": {
"test": "turbo test --concurrency=2",
"clean": "turbo clean --concurrency=2",
"build": "turbo build --concurrency=2",
"watch": "tsc --pretty -w",
"build:esm": "turbo build:esm --concurrency=2",
"build:cjs": "turbo build:cjs --concurrency=2",
"lint": "turbo run lint --concurrency=2",
"prepare": "husky install",
"pretty": "turbo pretty --concurrency=2",
Expand Down
1 change: 1 addition & 0 deletions packages/component-generator/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
dist
File renamed without changes.
1 change: 0 additions & 1 deletion packages/component-generator/dist/index.d.ts

This file was deleted.

1 change: 0 additions & 1 deletion packages/component-generator/dist/index.d.ts.map

This file was deleted.

2 changes: 0 additions & 2 deletions packages/component-generator/dist/index.js

This file was deleted.

1 change: 0 additions & 1 deletion packages/component-generator/dist/index.js.map

This file was deleted.

1 change: 0 additions & 1 deletion packages/component-generator/dist/reusable-functions.d.ts

This file was deleted.

This file was deleted.

2 changes: 0 additions & 2 deletions packages/component-generator/dist/reusable-functions.js

This file was deleted.

This file was deleted.

10 changes: 7 additions & 3 deletions packages/component-generator/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,16 @@
"name": "component-generator",
"version": "1.0.0",
"description": "",
"main": "index.js",
"main": "dist/cjs/index.js",
"module": "dist/esm/index.js",
"scripts": {
"test": "vitest run",
"build": "yarn tsc --pretty",
"clean": "rm -rf ./dist",
"build:cjs": "yarn tsc -p tsconfig-cjs.json --pretty",
"build:esm": "yarn tsc -p tsconfig.json --pretty",
"build": "yarn run clean && concurrently -n esm,cjs \"npm run build:esm\" \"npm run build:cjs\"",
"lint": "yarn eslint . --max-warnings=0",
"pretty": "prettier --config ../../.prettierrc.js --write ./src/**/**/**/**/**/**/**/**/**/**/**/**/**/*.{ts}",
"pretty": "yarn prettier --write \"src/**/*.ts\"",
"clean-install": "rm -rf ./node_modules && yarn install --frozen-lockfile"
},
"keywords": [],
Expand Down
Empty file.
15 changes: 15 additions & 0 deletions packages/component-generator/tsconfig-cjs.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"outDir": "dist/cjs",
"module": "CommonJS"
},
"include": [
"src/",
"*.ts"
],
"exclude": [
"node_modules",
"dist"
]
}
5 changes: 3 additions & 2 deletions packages/component-generator/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"outDir": "dist"
"module": "ESNext",
"outDir": "dist/esm"
},
"include": [
"src/",
"*.ts"
],
"exclude": [
"node_modules",
"dist"
"dist/**"
]
}
1 change: 1 addition & 0 deletions packages/wapi.js/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
dist
11 changes: 11 additions & 0 deletions packages/wapi.js/.prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
module.exports = {
arrowParens: 'avoid',
trailingComma: 'none',
tabWidth: 4,
printWidth: 100,
semi: false,
useTabs: true,
bracketSpacing: true,
bracketSameLine: false,
singleQuote: true
}
1 change: 0 additions & 1 deletion packages/wapi.js/dist/index.d.ts

This file was deleted.

1 change: 0 additions & 1 deletion packages/wapi.js/dist/index.d.ts.map

This file was deleted.

2 changes: 0 additions & 2 deletions packages/wapi.js/dist/index.js

This file was deleted.

1 change: 0 additions & 1 deletion packages/wapi.js/dist/index.js.map

This file was deleted.

1 change: 0 additions & 1 deletion packages/wapi.js/dist/src/reusable-functions.d.ts

This file was deleted.

1 change: 0 additions & 1 deletion packages/wapi.js/dist/src/reusable-functions.d.ts.map

This file was deleted.

2 changes: 0 additions & 2 deletions packages/wapi.js/dist/src/reusable-functions.js

This file was deleted.

1 change: 0 additions & 1 deletion packages/wapi.js/dist/src/reusable-functions.js.map

This file was deleted.

1 change: 0 additions & 1 deletion packages/wapi.js/dist/src/utils.d.ts

This file was deleted.

1 change: 0 additions & 1 deletion packages/wapi.js/dist/src/utils.d.ts.map

This file was deleted.

2 changes: 0 additions & 2 deletions packages/wapi.js/dist/src/utils.js

This file was deleted.

1 change: 0 additions & 1 deletion packages/wapi.js/dist/src/utils.js.map

This file was deleted.

14 changes: 10 additions & 4 deletions packages/wapi.js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,33 @@
"name": "wapi.js",
"version": "1.0.0",
"description": "",
"main": "index.js",
"main": "dist/cjs/index.js",
"module": "dist/esm/index.js",
"scripts": {
"test": "vitest run",
"build": "yarn tsc --pretty",
"clean": "rm -rf ./dist",
"build:cjs": "yarn tsc -p tsconfig-cjs.json --pretty",
"build:esm": "yarn tsc -p tsconfig.json --pretty",
"build": "yarn run clean && concurrently -n esm,cjs \"npm run build:esm\" \"npm run build:cjs\"",
"lint": "yarn eslint . --max-warnings=0",
"pretty": "prettier --config ../../prettierrc.js --write ./src/**/**/**/**/**/**/**/**/**/**/**/**/**/*.{ts}",
"pretty": "yarn prettier --write \"src/**/*.ts\"",
"clean-install": "rm -rf ./node_modules && yarn install --frozen-lockfile"
},
"keywords": [],
"author": "",
"license": "Apache-2.0",
"devDependencies": {
"concurrently": "^8.2.1",
"eslint": "^8.48.0",
"eslint-config-next": "^13.4.19",
"eslint-config-prettier": "^9.0.0",
"eslint-import-resolver-typescript": "^3.6.0",
"eslint-plugin-import": "^2.28.1",
"lint-staged": "^14.0.1",
"prettier": "^3.0.3",
"typescript": "^5.2.2"
},
"dependencies": {
"dayjs": "^1.11.9"
}
}
}
72 changes: 72 additions & 0 deletions packages/wapi.js/src/constants.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
export const errorCodes: { code: number; message: string; description: string }[] = [
{
code: 0,
message: 'AuthException',
description: 'We were unable to authenticate the app use'
},
{
code: 3,
message: 'API Method',
description: 'Capability or permissions issue'
},
{
code: 0,
message: 'AuthException',
description: 'We were unable to authenticate the app user.'
},
{
code: 0,
message: 'AuthException',
description: 'We were unable to authenticate the app user.'
},
{
code: 0,
message: 'AuthException',
description: 'We were unable to authenticate the app user.'
},
{
code: 0,
message: 'AuthException',
description: 'We were unable to authenticate the app user.'
},
{
code: 0,
message: 'AuthException',
description: 'We were unable to authenticate the app user.'
},
{
code: 0,
message: 'AuthException',
description: 'We were unable to authenticate the app user.'
},
{
code: 0,
message: 'AuthException',
description: 'We were unable to authenticate the app user.'
},
{
code: 0,
message: 'AuthException',
description: 'We were unable to authenticate the app user.'
},
{
code: 0,
message: 'AuthException',
description: 'We were unable to authenticate the app user.'
},
{
code: 0,
message: 'AuthException',
description: 'We were unable to authenticate the app user.'
},
{
code: 0,
message: 'AuthException',
description: 'We were unable to authenticate the app user.'
},
{
code: 0,
message: 'AuthException',
description: 'We were unable to authenticate the app user.'
}
]
Empty file.
Empty file removed packages/wapi.js/src/utils.ts
Empty file.
15 changes: 15 additions & 0 deletions packages/wapi.js/tsconfig-cjs.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"outDir": "dist/cjs",
"module": "CommonJS"
},
"include": [
"src/",
"*.ts"
],
"exclude": [
"node_modules",
"dist"
]
}
5 changes: 3 additions & 2 deletions packages/wapi.js/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"outDir": "dist"
"module": "ESNext",
"outDir": "dist/esm",
},
"include": [
"src/",
"*.ts"
],
"exclude": [
"node_modules",
"dist"
"dist/**"
]
}
4 changes: 2 additions & 2 deletions tsconfig.base.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"compilerOptions": {
"allowUnreachableCode": false,
"allowJs": true,
"strict": true,
"module": "ESNext",
"declaration": true,
"declarationMap": true,
"declarationMap": false,
"importHelpers": false,
"newLine": "lf",
"noEmitHelpers": true,
Expand Down
3 changes: 3 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "./tsconfig.base.json",
}
Loading

0 comments on commit 88928d8

Please sign in to comment.