Skip to content

Commit

Permalink
feat: add parseECRRepositoryHostname and checkECRRepositoryPolicy
Browse files Browse the repository at this point in the history
  • Loading branch information
jedwards1211 committed Jan 30, 2024
1 parent 896467a commit 818ff0b
Show file tree
Hide file tree
Showing 23 changed files with 4,124 additions and 2,620 deletions.
7 changes: 7 additions & 0 deletions .babelrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/* eslint-env node, es2018 */
module.exports = function (api) {
const base = require('@jcoreio/toolchain-esnext/.babelrc.cjs')(api)
return {
...base,
}
}
21 changes: 0 additions & 21 deletions .babelrc.js

This file was deleted.

36 changes: 23 additions & 13 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,38 @@
version: 2
# created by @jcoreio/toolchain-circle

version: 2.1
jobs:
build:
docker:
- image: circleci/node:16
- image: cimg/node:20.3.0

steps:
- checkout
- run:
name: Setup NPM Token
command: |
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > ~/.npmrc
echo "registry=https://registry.npmjs.org/" >> ~/.npmrc
npm config set \
"//registry.npmjs.org/:_authToken=$NPM_TOKEN" \
"registry=https://registry.npmjs.org/"
- run:
name: Install pnpm
command: sudo npm install --global pnpm
name: Corepack enable
command: sudo corepack enable
- run:
name: Install Dependencies
command: pnpm install --frozen-lockfile
- run:
name: build
command: pnpm prepublishOnly
- run:
name: upload test coverage
command: pnpm codecov
name: Prepublish
command: |
[[ $(netstat -tnlp | grep -F 'circleci-agent') ]] || pnpm run tc prepublish
- run:
name: release
command: pnpm semantic-release
name: Release
command: |
[[ $(netstat -tnlp | grep -F 'circleci-agent') ]] || pnpm run tc release
workflows:
build:
jobs:
- build:
context:
- npm-release
- github-release
6 changes: 0 additions & 6 deletions .eslintrc

This file was deleted.

4 changes: 4 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/* eslint-env node, es2018 */
module.exports = {
extends: [require.resolve('@jcoreio/toolchain/eslint.config.cjs')],
}
4 changes: 4 additions & 0 deletions .flowconfig
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
[ignore]
<PROJECT_ROOT>/dist/.*
.*/malformed_package_json/.*

[include]
./src
./test

[libs]

Expand Down
18 changes: 3 additions & 15 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,16 +1,4 @@
/coverage
/.nyc_output
/dist
.nyc_output
node_modules
/es
.eslintcache
*.js
*.js.flow
*.d.ts
!/flow-typed/**/*.js
!/src/**/*.ts
!/src/**/*.js
!/src/**/*.js.flow
!/test/**/*.ts
!/test/**/*.js
!/test/**/*.js.flow
!/.babelrc.js
/coverage
5 changes: 5 additions & 0 deletions .mocharc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/* eslint-env node, es2018 */
const base = require('@jcoreio/toolchain-mocha/.mocharc.cjs')
module.exports = {
...base,
}
11 changes: 0 additions & 11 deletions .npmignore

This file was deleted.

5 changes: 5 additions & 0 deletions githooks.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/* eslint-env node, es2018 */
const base = require('@jcoreio/toolchain/githooks.cjs')
module.exports = {
...base,
}
5 changes: 5 additions & 0 deletions lint-staged.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/* eslint-env node, es2018 */
const base = require('@jcoreio/toolchain/lint-staged.config.cjs')
module.exports = {
...base,
}
5 changes: 5 additions & 0 deletions nyc.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/* eslint-env node, es2018 */
const base = require('@jcoreio/toolchain-mocha/nyc.config.cjs')
module.exports = {
...base,
}
138 changes: 47 additions & 91 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,69 +2,13 @@
"name": "@jcoreio/aws-ecr-utils",
"version": "0.0.0-development",
"description": "utilities for working with AWS Elastic Container Registry",
"main": "index.js",
"sideEffects": false,
"scripts": {
"lint": "eslint $npm_package_config_lint",
"lint:fix": "eslint $npm_package_config_lint",
"prettier": "prettier --write $npm_package_config_prettier",
"prettier:check": "prettier --list-different $npm_package_config_prettier",
"tsc": "tsc",
"tsc:watch": "npm run tsc -- --watch",
"clean": "rimraf es lib $(cd src; ls) *.js *.d.ts *.js.flow",
"build": "npm run clean && npm run build:types && npm run build:js",
"build:types": "tsc -p tsconfig.build.json && tsc -p tsconfig.build.json --outDir es && copy 'src/**/*.js.flow' . && copy 'src/**/*.js.flow' es",
"build:js": "babel src --out-dir es --extensions \".ts\" --source-maps inline && cross-env BABEL_ENV=es5 babel src --out-dir . --extensions \".ts\"",
"test": "cross-env NODE_ENV=test BABEL_ENV=es5 mocha $npm_package_config_mocha && cross-env NODE_ENV=test BABEL_ENV=coverage nyc --reporter=lcov --reporter=text mocha $npm_package_config_mocha",
"test:watch": "cross-env NODE_ENV=test BABEL_ENV=test mocha $npm_package_config_mocha --watch",
"test:debug": "cross-env NODE_ENV=test BABEL_ENV=test mocha --inspect-brk $npm_package_config_mocha",
"codecov": "nyc report --reporter=text-lcov > coverage.lcov; codecov",
"prepublishOnly": "npm run clean && npm run prettier:check && npm run lint && flow && npm test && npm run build",
"open:coverage": "open coverage/lcov-report/index.html",
"semantic-release": "semantic-release"
},
"config": {
"lint": "--cache --ext .js,.ts src test",
"mocha": "--extension js --extension ts test/configure.js 'src/**/*.spec.ts' 'test/**/*.ts'",
"prettier": ".babelrc.js *.{json,md} {src,test}/**/*.{js,ts,flow}",
"commitizen": {
"path": "cz-conventional-changelog"
}
},
"husky": {
"hooks": {
"pre-commit": "lint-staged && npm run lint && npm run tsc && flow",
"commit-msg": "commitlint -e $GIT_PARAMS",
"pre-push": "npm test"
}
},
"lint-staged": {
"*.{js,ts,json,css,md,flow}": [
"prettier --write"
]
},
"commitlint": {
"extends": [
"@jedwards1211/commitlint-config"
]
},
"prettier": {
"semi": false,
"singleQuote": true,
"trailingComma": "es5"
},
"nyc": {
"include": [
"src/**/*.ts"
],
"exclude": [
"src/**/*.spec.ts"
],
"require": [
"@babel/register"
],
"sourceMap": false,
"instrument": false
"tc": "toolchain",
"toolchain": "toolchain",
"test": "toolchain test",
"prepublishOnly": "echo This package is meant to be published by semantic-release from the dist build directory. && exit 1"
},
"repository": {
"type": "git",
Expand All @@ -82,47 +26,59 @@
},
"homepage": "https://github.com/jcoreio/aws-ecr-utils#readme",
"devDependencies": {
"@babel/cli": "^7.15.7",
"@babel/core": "^7.15.5",
"@babel/plugin-proposal-export-default-from": "^7.14.5",
"@babel/plugin-proposal-export-namespace-from": "^7.14.5",
"@babel/plugin-transform-runtime": "^7.15.0",
"@babel/preset-env": "^7.15.6",
"@babel/preset-typescript": "^7.15.0",
"@babel/register": "^7.15.3",
"@commitlint/cli": "^13.2.0",
"@commitlint/config-conventional": "^13.2.0",
"@jedwards1211/commitlint-config": "^1.0.2",
"@jedwards1211/eslint-config": "^2.0.2",
"@jedwards1211/eslint-config-typescript": "^2.0.2",
"@types/chai": "^4.2.22",
"@types/mocha": "^9.0.0",
"@babel/plugin-syntax-flow": "^7.14.5",
"@babel/plugin-transform-react-jsx": "^7.14.9",
"@jcoreio/toolchain": "^3.2.1",
"@jcoreio/toolchain-circle": "^3.2.1",
"@jcoreio/toolchain-esnext": "^3.2.1",
"@jcoreio/toolchain-flow": "^3.2.1",
"@jcoreio/toolchain-mocha": "^3.2.1",
"@jcoreio/toolchain-semantic-release": "^3.2.1",
"@jcoreio/toolchain-typescript": "^3.2.1",
"@types/chai": "^4.3.5",
"@types/inquirer": "^8.2.10",
"@types/mocha": "^10.0.1",
"@types/node": "^16.10.2",
"@typescript-eslint/eslint-plugin": "^4.32.0",
"@typescript-eslint/parser": "^4.32.0",
"@typescript-eslint/eslint-plugin": "^5.60.0",
"@typescript-eslint/parser": "^5.60.0",
"@typescript-eslint/typescript-estree": "^4.32.0",
"babel-plugin-istanbul": "^6.0.0",
"chai": "^4.3.4",
"codecov": "^3.8.3",
"chai": "^4.3.7",
"copy": "^0.3.2",
"cross-env": "^7.0.3",
"eslint": "^7.32.0",
"eslint": "^8.43.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-flowtype": "^8.0.3",
"flow-bin": "^0.161.0",
"husky": "^7.0.2",
"lint-staged": "^11.1.2",
"mocha": "^9.1.2",
"nyc": "^15.1.0",
"prettier": "^2.4.1",
"prettier-eslint": "^13.0.0",
"mocha": "^10.2.0",
"rimraf": "^3.0.2",
"semantic-release": "^18.0.0",
"typescript": "^4.4.3"
"typescript": "^5.1.0"
},
"dependencies": {
"@babel/runtime": "^7.15.4",
"@babel/runtime": "^7.18.6",
"aws-sdk": "^2.1070.0",
"base64-js": "^1.5.1",
"inquirer": "^8.2.6",
"is-interactive": "^1.0.0",
"promisify-child-process": "^4.1.1"
}
},
"main": "dist/index.js",
"module": "dist/index.mjs",
"types": "dist/index.d.ts",
"exports": {
".": {
"types": "./dist/index.d.ts",
"require": "./dist/index.js",
"default": "./dist/index.mjs"
},
"./package.json": "./package.json",
"./*": {
"types": "./dist/*.d.ts",
"require": "./dist/*.js",
"default": "./dist/*.mjs"
}
},
"engines": {
"node": ">=16"
},
"packageManager": "pnpm@8.3.1"
}
Loading

0 comments on commit 818ff0b

Please sign in to comment.