Skip to content

Commit

Permalink
NODENEXT
Browse files Browse the repository at this point in the history
update
  • Loading branch information
arietrouw committed Nov 19, 2024
1 parent 1f8dca1 commit 343e357
Show file tree
Hide file tree
Showing 67 changed files with 6,504 additions and 8,642 deletions.
71 changes: 0 additions & 71 deletions .eslintrc.cjs

This file was deleted.

893 changes: 0 additions & 893 deletions .yarn/releases/yarn-4.1.1.cjs

This file was deleted.

934 changes: 934 additions & 0 deletions .yarn/releases/yarn-4.5.1.cjs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .yarnrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ plugins:
path: .yarn/plugins/@yarnpkg/plugin-outdated.cjs
spec: "https://mskelton.dev/yarn-outdated/v3"

yarnPath: .yarn/releases/yarn-4.1.1.cjs
yarnPath: .yarn/releases/yarn-4.5.1.cjs
85 changes: 85 additions & 0 deletions eslint.config.mjs
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 }],
},
},
]
162 changes: 79 additions & 83 deletions package.json
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"
}
2 changes: 1 addition & 1 deletion src/AWS/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export * from './getEnvFromAws'
export * from './getEnvFromAws.ts'
10 changes: 8 additions & 2 deletions src/AWS/spec/getEnvFromAws.spec.ts
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)
})
})
2 changes: 1 addition & 1 deletion src/Handler/StatusCodeHandlers/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export * from './notImplemented'
export * from './notImplemented.ts'
2 changes: 1 addition & 1 deletion src/Handler/StatusCodeHandlers/notImplemented.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { RequestHandler } from 'express'
import type { RequestHandler } from 'express'
import { ReasonPhrases, StatusCodes } from 'http-status-codes'

export const notImplemented: RequestHandler = (_req, _res, next) => {
Expand Down
Loading

0 comments on commit 343e357

Please sign in to comment.