Skip to content

Commit

Permalink
rebase on cleaned repository
Browse files Browse the repository at this point in the history
  • Loading branch information
shortcuts committed Nov 4, 2021
1 parent bf79b1e commit 42a5d07
Show file tree
Hide file tree
Showing 26 changed files with 2,145 additions and 133 deletions.
19 changes: 11 additions & 8 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,15 @@ node_modules
.bash_profile
.env
dist
yarn.lock
.pnp.cjs

*/*/.openapi-generator
*/*/.swagger-codegen
*/*/node_modules
*/*/dist
*/*/yarn.lock
*/*/.openapi-generator-ignore
*/*/.swagger-codegen-ignore
yarn-error.log

.yarn/*
!.yarn/releases
!.yarn/plugins

*/.openapi-generator
*/node_modules
*/dist
*/.openapi-generator-ignore
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
14.18.0
16.13.0
Binary file not shown.
Binary file modified .yarn/install-state.gz
Binary file not shown.
631 changes: 631 additions & 0 deletions .yarn/releases/yarn-3.0.2.cjs

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
nodeLinker: node-modules

yarnPath: .yarn/releases/yarn-3.0.2.cjs
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
## Install and setup env

```bash
nvm use && yarn && export PACKAGE_VERSION='4.11.0' TS_POST_PROCESS_FILE='yarn prettier --write .'
nvm use && yarn
```

## Generate client based on `spec.yml`
## Generate client based on `search_spec.yml`

```bash
yarn generate
Expand Down
3 changes: 0 additions & 3 deletions algolia-typescript-template/api-single.mustache
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
{{>licenseInfo}}

import localVarRequest from 'request';
import http from 'http';

/* tslint:disable:no-unused-locals */
{{#imports}}
import { {{classname}} } from '{{filename}}';
{{/imports}}
Expand Down
1 change: 0 additions & 1 deletion algolia-typescript-template/model.mustache
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{{>licenseInfo}}
{{#models}}
{{#model}}
import { RequestFile } from './models';
Expand Down
1 change: 0 additions & 1 deletion algolia-typescript-template/models.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ import { {{classname}} } from '{{{ classFilename }}}';
{{/model}}
{{/models}}

/* tslint:disable:no-unused-variable */
let primitives = [
"string",
"boolean",
Expand Down
20 changes: 9 additions & 11 deletions algolia-typescript-template/package.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"version": "{{npmVersion}}",
"description": "JavaScript client for {{npmName}}",
"repository": "{{gitUserId}}/{{gitRepoId}}",
"author": "Algolia",
"private": true,
"license": "MIT",
"main": "dist/api.js",
Expand All @@ -13,21 +14,18 @@
"test": "yarn build && node dist/client.js"
},
"engines": {
"node": ">= 8.0.0",
"yarn": ">= 1.6.0"
"node": ">= 12.0.0",
"yarn": ">= 2.0.0"
},
"author": "OpenAPI-Generator Contributors",
"dependencies": {
"bluebird": "^3.5.0",
"request": "^2.81.0",
"@types/bluebird": "3.5.33",
"@types/request": "*",
"rewire": "^3.0.2"
"@types/request": "^2.48.7",
"request": "^2.81.0"
},
"devDependencies": {
"typescript": "^2.4.2",
"@types/node": "8.10.34"
}{{#npmRepository}},
"@types/node": "^16.11.6",
"typescript": "^4.4.4"
}
{{#npmRepository}},
"publishConfig": {
"registry": "{{npmRepository}}"
}{{/npmRepository}}
Expand Down
3 changes: 2 additions & 1 deletion algolia-typescript-template/tsconfig.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@
"outDir": "dist",
"typeRoots": ["node_modules/@types"]
},
"exclude": ["dist", "node_modules", "output"]
"include": ["client-search", "model", "api.ts"],
"exclude": ["dist", "node_modules"]
}
2 changes: 1 addition & 1 deletion openapitools.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

"apiPackage": "client-search",
"output": "#{cwd}/output/",
"glob": "spec.yml",
"glob": "search_spec.yml",
"gitHost": "algolia",
"gitUserId": "algolia",
"gitRepoId": "algoliasearch-client-javascript",
Expand Down
23 changes: 0 additions & 23 deletions output/.openapi-generator-ignore

This file was deleted.

11 changes: 0 additions & 11 deletions output/.openapi-generator/FILES

This file was deleted.

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

This file was deleted.

13 changes: 0 additions & 13 deletions output/client-search/searchApi.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,6 @@
/**
* Search API
* API powering the Search feature of Algolia.
*
* The version of the OpenAPI document: 0.1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/

import localVarRequest from 'request';
import http from 'http';

/* tslint:disable:no-unused-locals */
import { MultipleQueries } from '../model/multipleQueries';
import { MultipleQueriesResponse } from '../model/multipleQueriesResponse';

Expand Down
1 change: 0 additions & 1 deletion output/model/models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import { MultipleQueries } from './multipleQueries';
import { MultipleQueriesResponse } from './multipleQueriesResponse';
import { MultipleQueriesResponseResults } from './multipleQueriesResponseResults';

/* tslint:disable:no-unused-variable */
let primitives = ['string', 'boolean', 'double', 'integer', 'long', 'float', 'number', 'any'];

let enumsMap: { [index: string]: any } = {
Expand Down
12 changes: 0 additions & 12 deletions output/model/multipleQueries.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,3 @@
/**
* Search API
* API powering the Search feature of Algolia.
*
* The version of the OpenAPI document: 0.1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/

import { RequestFile } from './models';

export class MultipleQueries {
Expand Down
12 changes: 0 additions & 12 deletions output/model/multipleQueriesResponse.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,3 @@
/**
* Search API
* API powering the Search feature of Algolia.
*
* The version of the OpenAPI document: 0.1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/

import { RequestFile } from './models';
import { MultipleQueriesResponseResults } from './multipleQueriesResponseResults';

Expand Down
12 changes: 0 additions & 12 deletions output/model/multipleQueriesResponseResults.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,3 @@
/**
* Search API
* API powering the Search feature of Algolia.
*
* The version of the OpenAPI document: 0.1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/

import { RequestFile } from './models';

export class MultipleQueriesResponseResults {
Expand Down
19 changes: 8 additions & 11 deletions output/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"version": "5.0.0",
"description": "JavaScript client for algoliasearch-client-javascript",
"repository": "algolia/algoliasearch-client-javascript",
"author": "Algolia",
"private": true,
"license": "MIT",
"main": "dist/api.js",
Expand All @@ -13,19 +14,15 @@
"test": "yarn build && node dist/client.js"
},
"engines": {
"node": ">= 8.0.0",
"yarn": ">= 1.6.0"
"node": ">= 12.0.0",
"yarn": ">= 2.0.0"
},
"author": "OpenAPI-Generator Contributors",
"dependencies": {
"bluebird": "^3.5.0",
"request": "^2.81.0",
"@types/bluebird": "3.5.33",
"@types/request": "*",
"rewire": "^3.0.2"
"@types/request": "^2.48.7",
"request": "^2.81.0"
},
"devDependencies": {
"typescript": "^2.4.2",
"@types/node": "8.10.34"
"@types/node": "^16.11.6",
"typescript": "^4.4.4"
}
}
}
3 changes: 2 additions & 1 deletion output/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@
"outDir": "dist",
"typeRoots": ["node_modules/@types"]
},
"exclude": ["dist", "node_modules", "output"]
"include": ["client-search", "model", "api.ts"],
"exclude": ["dist", "node_modules"]
}
18 changes: 12 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,25 @@
{
"name": "@algolia/automation-javascript-client",
"version": "0.0.0",
"workspaces": [
"output"
],
"scripts": {
"generate": "yarn openapi-generator-cli generate --generator-key client",
"generate": "PACKAGE_VERSION='4.11.0' TS_POST_PROCESS_FILE='yarn prettier --write .' yarn openapi-generator-cli generate --generator-key client && yarn install",
"client:build": "cd output/ && yarn install && yarn build && cd ..",
"client:test": "yarn install && tsc && node dist/app.js",
"clean:output": "rm -rf output/*",
"clean": "rm -rf dist node_modules build && yarn clean:output"
"clean": "rm -rf dist build node_modules"
},
"devDependencies": {
"@openapitools/openapi-generator-cli": "2.4.13",
"@openapitools/openapi-generator-cli": "^2.4.13",
"algoliasearch-client-javascript": "file:output/",
"prettier": "2.4.1",
"typescript": "4.4.4"
},
"dependencies": {
"algoliasearch-client-javascript": "file:output/"
}
"engines": {
"node": ">= 12.0.0",
"yarn": ">= 2.0.0"
},
"packageManager": "yarn@3.0.2"
}
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@
"outDir": "dist",
"typeRoots": ["node_modules/@types"]
},
"exclude": ["dist", "node_modules", "output"]
"include": ["app.ts"]
}
Loading

0 comments on commit 42a5d07

Please sign in to comment.