Skip to content

Commit

Permalink
Merge pull request #86 from adzerk/simonramzi/sc-48140/javascript-dec…
Browse files Browse the repository at this point in the history
…ision-sdk-ignores-some-fields

Added SkipFilters to SDK
  • Loading branch information
honeycomb-cheesecake authored Aug 15, 2023
2 parents 004652c + c1db6ce commit 6e89f7d
Show file tree
Hide file tree
Showing 27 changed files with 45 additions and 2,103 deletions.
23 changes: 17 additions & 6 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,22 @@ name: Node CI

on: [push]


env:
NPM_REGISTRY: npm.pkg.github.com
NPM_SECRET: ${{ secrets.GITHUB_TOKEN }}

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [ 14, 16, 18, 19]
steps:

- name: Checkout Repository
uses: actions/checkout@v3

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}

- name: npm install, build, and test
run: |
npm ci
Expand All @@ -30,19 +28,32 @@ jobs:
needs: build
runs-on: ubuntu-latest
steps:

- name: Checkout Repository
uses: actions/checkout@v3

- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: 18

- name: Install npm-force-resolutions
run: npm install -g npm-force-resolutions

- name: Install dependencies
run: npm install

- name: Build Package
run: npm run build --if-present

- name: Tag Version
run: npm --no-git-tag-version version prerelease --preid=${GITHUB_REF##*/}-${GITHUB_SHA:0:8}

- name: Configure Project-Level .npmrc File
run: npm config set --location=project @adzerk:registry=https://'${NPM_REGISTRY}' //'${NPM_REGISTRY}'/:_authToken='${NPM_SECRET}'

- name: Publish to GitHub NPM Registry
run: npm publish
run: npm publish
env:
NPM_REGISTRY: npm.pkg.github.com
NPM_SECRET: ${{ secrets.GITHUB_TOKEN }}
17 changes: 12 additions & 5 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,32 @@ on:
release:
types: [published]

env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_REGISTRY: registry.npmjs.org
NPM_SECRET: ${{ secrets.NPM_TOKEN }}

jobs:
build:
runs-on: ubuntu-latest
steps:

- name: Checkout Repository
uses: actions/checkout@v2

- name: Setup NodeJS
uses: actions/setup-node@v2
with:
node-version: 18
registry-url: https://registry.npmjs.org

- name: Install Dependencies
run: npm install

- name: Build SDK
run: npm run build

- name: Configure Project-Level .npmrc File
run: npm config set --location=project @adzerk:registry=https://'${NPM_REGISTRY}' //'${NPM_REGISTRY}'/:_authToken='${NPM_SECRET}'

- name: Publish to NPM
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_REGISTRY: registry.npmjs.org
NPM_SECRET: ${{ secrets.NPM_TOKEN }}
2 changes: 0 additions & 2 deletions .npmrc

This file was deleted.

11 changes: 11 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
]
},
"dependencies": {
"@adzerk/api-decision-js": "^1.0.10",
"debug": "^4.1.1",
"form-data": "^2.5.1",
"isomorphic-unfetch": "^3.1.0"
Expand Down
6 changes: 3 additions & 3 deletions src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ import {
RequestContext,
ResponseContext,
Placement,
} from './generated';
RequiredError,
UserdbApi
} from '@adzerk/api-decision-js';
import { DecisionRequest, DecisionResponse } from './models';
import { removeUndefinedAndBlocklisted } from './utils';
import { UserdbApi } from './generated/apis/UserdbApi';
import { RequiredError } from './generated/runtime';
import { LoggerFunc } from '.';

(global as any).FormData = (global as any).FormData || FormData;
Expand Down
25 changes: 0 additions & 25 deletions src/generated/.openapi-generator-ignore

This file was deleted.

16 changes: 0 additions & 16 deletions src/generated/.openapi-generator/FILES

This file was deleted.

1 change: 0 additions & 1 deletion src/generated/.openapi-generator/VERSION

This file was deleted.

64 changes: 0 additions & 64 deletions src/generated/apis/DecisionApi.ts

This file was deleted.

Loading

0 comments on commit 6e89f7d

Please sign in to comment.