-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update
- Loading branch information
Showing
67 changed files
with
6,504 additions
and
8,642 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
// eslint.config.mjs | ||
|
||
import { | ||
typescriptConfig, | ||
unicornConfig, | ||
workspacesConfig, | ||
rulesConfig, | ||
importConfig, | ||
} from '@xylabs/eslint-config-flat' | ||
|
||
export default [ | ||
{ | ||
ignores: [ | ||
'.yarn/**', | ||
'jest.config.cjs', | ||
'**/dist/**', | ||
'dist', | ||
'build/**', | ||
'node_modules/**', | ||
'public', | ||
'.storybook', | ||
'storybook-static', | ||
'**/docs/**/*.js', | ||
], | ||
}, | ||
unicornConfig, | ||
workspacesConfig, | ||
rulesConfig, | ||
{ | ||
...typescriptConfig, | ||
rules: { | ||
...typescriptConfig.rules, | ||
'@typescript-eslint/consistent-type-imports': ['warn'], | ||
}, | ||
}, | ||
{ | ||
rules: { | ||
'no-restricted-imports': [ | ||
'warn', | ||
{ | ||
paths: [ | ||
...rulesConfig.rules['no-restricted-imports'][1].paths, | ||
'@types/node', | ||
'@xylabs/lodash', | ||
'@xyo-network/archivist', | ||
'@xyo-network/bridge', | ||
'@xyo-network/core', | ||
'@xyo-network/diviner', | ||
'@xyo-network/module', | ||
'@xyo-network/modules', | ||
'@xyo-network/node', | ||
'@xyo-network/sdk', | ||
'@xyo-network/plugins', | ||
'@xyo-network/protocol', | ||
'@xyo-network/sentinel', | ||
'@xyo-network/witness', | ||
'@xyo-network/core-payload-plugins', | ||
], | ||
}, | ||
], | ||
}, | ||
}, | ||
{ | ||
...importConfig, | ||
rules: { | ||
...importConfig.rules, | ||
'import-x/no-internal-modules': [ | ||
'warn', | ||
{ | ||
allow: [ | ||
'**/*.json', // Allow JSON imports | ||
'vitest/**', // Allow vitest internal imports | ||
'@*/**', // Allow imports from any @scoped package | ||
// Allow imports to any index.js file | ||
'**/index.js', | ||
'**/index.ts', | ||
'**/index.jsx', | ||
'**/index.tsx', | ||
], | ||
}, | ||
], | ||
'import-x/no-cycle': ['warn', { maxDepth: 5 }], | ||
}, | ||
}, | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,113 +1,109 @@ | ||
{ | ||
"name": "@xylabs/sdk-api-express-ecs", | ||
"version": "2.0.4", | ||
"description": "SDK for base code for Api repos that use express and deploy on AWS ECS", | ||
"keywords": [ | ||
"xylabs", | ||
"typescript", | ||
"esm", | ||
"aws", | ||
"ecs", | ||
"api", | ||
"express" | ||
], | ||
"homepage": "https://xylabs.com", | ||
"bugs": { | ||
"url": "https://github.com/xylabs/sdk-api-express-ecs-js/issues", | ||
"email": "[email protected]" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/xylabs/sdk-api-express-ecs-js.git" | ||
}, | ||
"license": "LGPL-3.0", | ||
"author": { | ||
"email": "[email protected]", | ||
"name": "XY Labs Development Team", | ||
"email": "[email protected]", | ||
"url": "https://xylabs.com" | ||
}, | ||
"bugs": { | ||
"email": "[email protected]", | ||
"url": "https://github.com/xylabs/sdk-api-express-ecs-js/issues" | ||
"sideEffects": false, | ||
"type": "module", | ||
"exports": { | ||
".": { | ||
"node": { | ||
"types": "./dist/node/index.d.ts", | ||
"default": "./dist/node/index.mjs" | ||
} | ||
}, | ||
"./package.json": "./package.json", | ||
"./README.md": "./README.md" | ||
}, | ||
"main": "dist/node/index.mjs", | ||
"module": "dist/node/index.mjs", | ||
"types": "dist/node/index.d.ts", | ||
"scripts": { | ||
"coverage": "jest --coverage", | ||
"package-compile": "tsup && publint", | ||
"package-recompile": "tsup && publint" | ||
}, | ||
"resolutions": { | ||
"eslint": "9.14.0", | ||
"uuid": "^8" | ||
}, | ||
"description": "SDK for base code for Api repos that use express and deploy on AWS ECS", | ||
"dependencies": { | ||
"@aws-sdk/client-secrets-manager": "^3.535.0", | ||
"@xylabs/assert": "^3.0.14", | ||
"body-parser": "^1.20.1", | ||
"@aws-sdk/client-secrets-manager": "^3.693.0", | ||
"@xylabs/assert": "^4.3.13", | ||
"body-parser": "^1.20.3", | ||
"connect": "^3.7.0", | ||
"express-mung": "^0.5.1", | ||
"http-status-codes": "^2.2.0", | ||
"http-status-codes": "^2.3.0", | ||
"node-cache": "^5.1.2", | ||
"rollbar": "^2.26.1", | ||
"winston": "^3.8.2", | ||
"winston-transport": "^4.5.0" | ||
"rollbar": "^2.26.4", | ||
"winston": "^3.17.0", | ||
"winston-transport": "^4.9.0" | ||
}, | ||
"devDependencies": { | ||
"@swc/core": "^1.4.8", | ||
"@swc/core": "^1.9.2", | ||
"@types/connect": "^3.4.38", | ||
"@types/express": "^4.17.21", | ||
"@types/express-mung": "^0.5.5", | ||
"@types/express-serve-static-core": "^4.17.43", | ||
"@types/jest": "^29.5.12", | ||
"@types/node": "^20.11.30", | ||
"@xylabs/eslint-config": "3.5.2", | ||
"@xylabs/ts-scripts-yarn3": "^3.5.2", | ||
"@xylabs/tsconfig": "^3.5.2", | ||
"@xylabs/tsconfig-jest": "^3.5.2", | ||
"body-parser": "^1.20.2", | ||
"@types/express-serve-static-core": "^4.19.6", | ||
"@types/node": "^22.9.0", | ||
"@typescript-eslint/parser": "^8.15.0", | ||
"@xylabs/eslint-config-flat": "^4.2.4", | ||
"@xylabs/ts-scripts-yarn3": "^4.2.4", | ||
"@xylabs/tsconfig": "^4.2.4", | ||
"@xylabs/tsconfig-jest": "^4.1.0", | ||
"@xylabs/vitest-extended": "^4.3.13", | ||
"body-parser": "^1.20.3", | ||
"connect": "^3.7.0", | ||
"eslint": "^8.57.0", | ||
"express": "^4.18.3", | ||
"eslint": "^9.15.0", | ||
"eslint-import-resolver-typescript": "^3.6.3", | ||
"express": "^4.21.1", | ||
"express-mung": "^0.5.1", | ||
"http-status-codes": "^2.3.0", | ||
"jest": "^29.7.0", | ||
"jest-extended": "^4.0.2", | ||
"jest-mock-extended": "^3.0.5", | ||
"node-cache": "^5.1.2", | ||
"publint": "^0.2.7", | ||
"rollbar": "^2.26.3", | ||
"ts-jest": "^29.1.2", | ||
"publint": "^0.2.12", | ||
"rollbar": "^2.26.4", | ||
"ts-jest": "^29.2.5", | ||
"ts-node": "^10.9.2", | ||
"tsup": "^8.0.2", | ||
"typescript": "^5.4.2", | ||
"winston": "^3.12.0", | ||
"winston-transport": "^4.7.0" | ||
"tsup": "^8.3.5", | ||
"typescript": "^5.6.3", | ||
"vitest": "^2.1.5", | ||
"vitest-mock-extended": "^2.0.2", | ||
"winston": "^3.17.0", | ||
"winston-transport": "^4.9.0" | ||
}, | ||
"peerDependencies": { | ||
"express": "^4" | ||
}, | ||
"docs": "dist/docs.json", | ||
"types": "dist/index.d.ts", | ||
"exports": { | ||
".": { | ||
"node": { | ||
"require": { | ||
"types": "./dist/index.d.cts", | ||
"default": "./dist/index.cjs" | ||
}, | ||
"import": { | ||
"types": "./dist/index.d.ts", | ||
"default": "./dist/index.js" | ||
} | ||
} | ||
}, | ||
"./package.json": "./package.json", | ||
"./README.md": "./README.md" | ||
}, | ||
"main": "dist/index.js", | ||
"module": "dist/index.js", | ||
"homepage": "https://xylabs.com", | ||
"keywords": [ | ||
"xylabs", | ||
"typescript", | ||
"esm", | ||
"aws", | ||
"ecs", | ||
"api", | ||
"express" | ||
], | ||
"license": "LGPL-3.0", | ||
"name": "@xylabs/sdk-api-express-ecs", | ||
"publishConfig": { | ||
"access": "public" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/xylabs/sdk-api-express-ecs-js.git" | ||
}, | ||
"resolutions": { | ||
"uuid": "^8" | ||
}, | ||
"scripts": { | ||
"package-compile": "tsup && publint", | ||
"package-recompile": "tsup && publint", | ||
"coverage": "jest --coverage" | ||
}, | ||
"sideEffects": false, | ||
"packageManager": "[email protected]", | ||
"packageManager": "[email protected]", | ||
"volta": { | ||
"node": "18.19.0", | ||
"yarn": "1.22.19" | ||
}, | ||
"type": "module" | ||
"publishConfig": { | ||
"access": "public" | ||
}, | ||
"docs": "dist/docs.json" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
export * from './getEnvFromAws' | ||
export * from './getEnvFromAws.ts' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,16 @@ | ||
import { getEnvFromAws } from '../getEnvFromAws' | ||
import '@xylabs/vitest-extended' | ||
|
||
import { | ||
describe, expect, it, | ||
} from 'vitest' | ||
|
||
import { getEnvFromAws } from '../getEnvFromAws.ts' | ||
|
||
const nonExistentSecret = 'does-not-exist' | ||
const errorMessage = "Secrets Manager can't find the specified secret." | ||
|
||
describe('getEnvFromAws', () => { | ||
test('gets the ENV from AWS', async () => { | ||
it('gets the ENV from AWS', async () => { | ||
await expect(async () => await getEnvFromAws(nonExistentSecret)).rejects.toThrow(errorMessage) | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
export * from './notImplemented' | ||
export * from './notImplemented.ts' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.