Skip to content

Commit

Permalink
PREAPPS-881 Need to fix security issues with NPM modules used in Zimb…
Browse files Browse the repository at this point in the history
…ra X

- graphql-code-generator is not accepting command line arguments instead it will read configuration from codegen.yml file
- fix issues after generation of schema data
  • Loading branch information
silentsakky committed Dec 12, 2018
1 parent d8ff3e0 commit c027522
Show file tree
Hide file tree
Showing 7 changed files with 667 additions and 1,763 deletions.
2 changes: 1 addition & 1 deletion babelRegisterConfig.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require("@babel/register")({
//by default, babel register does not pull in .ts extension
extensions: [".js", ".ts"],
});
);
8 changes: 8 additions & 0 deletions codegen.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
schema:
- ".tmp/introspected-schema.json"
overwrite: true
generates:
src/schema/generated-schema-types.ts:
plugins:
- "typescript-common"
- "typescript-client"
50 changes: 50 additions & 0 deletions package-lock.json

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

4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"umd:main": "dist/zm-api-js-client.umd.js",
"types": "dist/index.d.ts",
"scripts": {
"generateSchemaTypes": "rimraf .tmp src/schema/generated-schema-types.ts && mkdirp .tmp && apollo-codegen introspect-schema src/schema/schema.graphql --output .tmp/introspected-schema.json && gql-gen --file .tmp/introspected-schema.json --template typescript --out src/schema/generated-schema-types.ts",
"generateSchemaTypes": "rimraf .tmp src/schema/generated-schema-types.ts && mkdirp .tmp && apollo-codegen introspect-schema src/schema/schema.graphql --output .tmp/introspected-schema.json && gql-gen",
"lint": "tslint --project .",
"lint:fix": "npm run lint -- --fix",
"eslint": "eslint src --ext .js",
Expand Down Expand Up @@ -75,6 +75,8 @@
"eslint-config-synacor": "^3.0.1",
"file-matcher": "^1.3.0",
"graphql-code-generator": "^0.14.5",
"graphql-codegen-typescript-client": "^0.14.5",
"graphql-codegen-typescript-common": "^0.14.5",
"mkdirp": "^0.5.1",
"mocha": "^5.1.1",
"npm-run-all": "^4.1.5",
Expand Down
2 changes: 1 addition & 1 deletion src/batch-client/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -846,7 +846,7 @@ export class ZimbraBatchClient {
this.jsonRequest({
name: 'GetFolder',
body: {
view: FolderView.task,
view: FolderView.Task,
tr: true
}
}).then(res => normalize(Folder)(res.folder[0].folder));
Expand Down
Loading

0 comments on commit c027522

Please sign in to comment.