@boxyhq/saml-jackson 0.2.3-beta.240 → 0.2.3-beta.244

Sign up to get free protection for your applications and to get access to all the features.
package/Dockerfile CHANGED
@@ -1,11 +1,12 @@
1
1
  # Install dependencies only when needed
2
- FROM node:16.13.1-alpine3.14 AS deps
2
+ FROM node:16.13.1-alpine3.14 AS build
3
3
  # Check https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a31506c3#nodealpine to understand why libc6-compat might be needed.
4
4
  RUN apk add --no-cache libc6-compat
5
5
  WORKDIR /app
6
6
  COPY src/ src/
7
- COPY package.json package-lock.json ./
8
- RUN npm ci --only=production
7
+ COPY package.json package-lock.json tsconfig*.json ./
8
+ RUN npm install
9
+ RUN npm run build
9
10
 
10
11
  # Production image, copy all the files and run next
11
12
  FROM node:16.13.1-alpine3.14 AS runner
@@ -17,13 +18,14 @@ ENV NODE_ENV production
17
18
  RUN addgroup -g 1001 -S nodejs
18
19
  RUN adduser -S nodejs -u 1001
19
20
 
20
- COPY --from=deps /app/src ./src
21
- COPY --from=deps /app/node_modules ./node_modules
22
- COPY --from=deps /app/package.json ./package.json
21
+ COPY --from=build /app/dist ./dist
22
+ COPY --from=build /app/package.json ./package.json
23
+ COPY --from=build /app/package-lock.json ./package-lock.json
24
+ RUN npm ci --only=production
23
25
 
24
26
  USER nodejs
25
27
 
26
28
  EXPOSE 5000
27
29
  EXPOSE 6000
28
30
 
29
- CMD [ "node", "src/jackson.js" ]
31
+ CMD [ "node", "dist/jackson.js" ]
@@ -35,9 +35,9 @@ exports.SAMLConfig = void 0;
35
35
  const crypto_1 = __importDefault(require("crypto"));
36
36
  const dbutils = __importStar(require("../db/utils"));
37
37
  const saml_1 = __importDefault(require("../saml/saml"));
38
+ const x509_1 = __importDefault(require("../saml/x509"));
38
39
  const error_1 = require("./error");
39
40
  const utils_1 = require("./utils");
40
- const x509_1 = __importDefault(require("../saml/x509"));
41
41
  class SAMLConfig {
42
42
  constructor({ configStore }) {
43
43
  this.configStore = configStore;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@boxyhq/saml-jackson",
3
- "version": "0.2.3-beta.240",
3
+ "version": "0.2.3-beta.244",
4
4
  "license": "Apache 2.0",
5
5
  "description": "SAML 2.0 service",
6
6
  "main": "dist/index.js",
@@ -17,14 +17,14 @@
17
17
  ],
18
18
  "scripts": {
19
19
  "build": "tsc -p tsconfig.build.json",
20
- "prepublish": "npm run build",
20
+ "prepublishOnly": "npm run build",
21
21
  "start": "cross-env IDP_ENABLED=true node dist/jackson.js",
22
22
  "dev": "cross-env IDP_ENABLED=true nodemon --config nodemon.json src/jackson.ts",
23
23
  "mongo": "cross-env JACKSON_API_KEYS=secret DB_ENGINE=mongo DB_URL=mongodb://localhost:27017/jackson nodemon --config nodemon.json src/jackson.ts",
24
24
  "sql": "cross-env JACKSON_API_KEYS=secret DB_ENGINE=sql DB_TYPE=postgres DB_URL=postgres://postgres:postgres@localhost:5432/jackson nodemon --config nodemon.json src/jackson.ts",
25
25
  "pre-loaded": "cross-env JACKSON_API_KEYS=secret DB_ENGINE=mem PRE_LOADED_CONFIG='./_config' nodemon --config nodemon.json src/jackson.ts",
26
26
  "pre-loaded-db": "cross-env JACKSON_API_KEYS=secret PRE_LOADED_CONFIG='./_config' nodemon --config nodemon.json src/jackson.ts",
27
- "test": "tap --ts --timeout=100 src/**/*.test.ts",
27
+ "test": "tap --ts --timeout=100 --coverage src/**/*.test.ts ",
28
28
  "dev-dbs": "docker-compose -f ./_dev/docker-compose.yml up -d",
29
29
  "dev-dbs-destroy": "docker-compose -f ./_dev/docker-compose.yml down --volumes --remove-orphans",
30
30
  "db:migration:generate": "ts-node -r tsconfig-paths/register ./node_modules/typeorm/cli.js migration:generate --config ormconfig.js -n Initial"