Skip to content

Commit 42a5d07

Browse files
committed
rebase on cleaned repository
1 parent bf79b1e commit 42a5d07

26 files changed

+2145
-133
lines changed

.gitignore

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,15 @@ node_modules
22
.bash_profile
33
.env
44
dist
5-
yarn.lock
5+
.pnp.cjs
66

7-
*/*/.openapi-generator
8-
*/*/.swagger-codegen
9-
*/*/node_modules
10-
*/*/dist
11-
*/*/yarn.lock
12-
*/*/.openapi-generator-ignore
13-
*/*/.swagger-codegen-ignore
7+
yarn-error.log
8+
9+
.yarn/*
10+
!.yarn/releases
11+
!.yarn/plugins
12+
13+
*/.openapi-generator
14+
*/node_modules
15+
*/dist
16+
*/.openapi-generator-ignore

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
14.18.0
1+
16.13.0
Binary file not shown.

.yarn/install-state.gz

1.04 KB
Binary file not shown.

.yarn/releases/yarn-3.0.2.cjs

Lines changed: 631 additions & 0 deletions
Large diffs are not rendered by default.

.yarnrc.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
nodeLinker: node-modules
2+
3+
yarnPath: .yarn/releases/yarn-3.0.2.cjs

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
## Install and setup env
44

55
```bash
6-
nvm use && yarn && export PACKAGE_VERSION='4.11.0' TS_POST_PROCESS_FILE='yarn prettier --write .'
6+
nvm use && yarn
77
```
88

9-
## Generate client based on `spec.yml`
9+
## Generate client based on `search_spec.yml`
1010

1111
```bash
1212
yarn generate

algolia-typescript-template/api-single.mustache

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
1-
{{>licenseInfo}}
2-
31
import localVarRequest from 'request';
42
import http from 'http';
53

6-
/* tslint:disable:no-unused-locals */
74
{{#imports}}
85
import { {{classname}} } from '{{filename}}';
96
{{/imports}}

algolia-typescript-template/model.mustache

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
{{>licenseInfo}}
21
{{#models}}
32
{{#model}}
43
import { RequestFile } from './models';

algolia-typescript-template/models.mustache

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ import { {{classname}} } from '{{{ classFilename }}}';
2929
{{/model}}
3030
{{/models}}
3131

32-
/* tslint:disable:no-unused-variable */
3332
let primitives = [
3433
"string",
3534
"boolean",

algolia-typescript-template/package.mustache

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"version": "{{npmVersion}}",
44
"description": "JavaScript client for {{npmName}}",
55
"repository": "{{gitUserId}}/{{gitRepoId}}",
6+
"author": "Algolia",
67
"private": true,
78
"license": "MIT",
89
"main": "dist/api.js",
@@ -13,21 +14,18 @@
1314
"test": "yarn build && node dist/client.js"
1415
},
1516
"engines": {
16-
"node": ">= 8.0.0",
17-
"yarn": ">= 1.6.0"
17+
"node": ">= 12.0.0",
18+
"yarn": ">= 2.0.0"
1819
},
19-
"author": "OpenAPI-Generator Contributors",
2020
"dependencies": {
21-
"bluebird": "^3.5.0",
22-
"request": "^2.81.0",
23-
"@types/bluebird": "3.5.33",
24-
"@types/request": "*",
25-
"rewire": "^3.0.2"
21+
"@types/request": "^2.48.7",
22+
"request": "^2.81.0"
2623
},
2724
"devDependencies": {
28-
"typescript": "^2.4.2",
29-
"@types/node": "8.10.34"
30-
}{{#npmRepository}},
25+
"@types/node": "^16.11.6",
26+
"typescript": "^4.4.4"
27+
}
28+
{{#npmRepository}},
3129
"publishConfig": {
3230
"registry": "{{npmRepository}}"
3331
}{{/npmRepository}}

algolia-typescript-template/tsconfig.mustache

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,6 @@
1616
"outDir": "dist",
1717
"typeRoots": ["node_modules/@types"]
1818
},
19-
"exclude": ["dist", "node_modules", "output"]
19+
"include": ["client-search", "model", "api.ts"],
20+
"exclude": ["dist", "node_modules"]
2021
}

openapitools.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
"apiPackage": "client-search",
1414
"output": "#{cwd}/output/",
15-
"glob": "spec.yml",
15+
"glob": "search_spec.yml",
1616
"gitHost": "algolia",
1717
"gitUserId": "algolia",
1818
"gitRepoId": "algoliasearch-client-javascript",

output/.openapi-generator-ignore

Lines changed: 0 additions & 23 deletions
This file was deleted.

output/.openapi-generator/FILES

Lines changed: 0 additions & 11 deletions
This file was deleted.

output/.openapi-generator/VERSION

Lines changed: 0 additions & 1 deletion
This file was deleted.

output/client-search/searchApi.ts

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,6 @@
1-
/**
2-
* Search API
3-
* API powering the Search feature of Algolia.
4-
*
5-
* The version of the OpenAPI document: 0.1.0
6-
*
7-
*
8-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9-
* https://openapi-generator.tech
10-
* Do not edit the class manually.
11-
*/
12-
131
import localVarRequest from 'request';
142
import http from 'http';
153

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

output/model/models.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ import { MultipleQueries } from './multipleQueries';
2020
import { MultipleQueriesResponse } from './multipleQueriesResponse';
2121
import { MultipleQueriesResponseResults } from './multipleQueriesResponseResults';
2222

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

2625
let enumsMap: { [index: string]: any } = {

output/model/multipleQueries.ts

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,3 @@
1-
/**
2-
* Search API
3-
* API powering the Search feature of Algolia.
4-
*
5-
* The version of the OpenAPI document: 0.1.0
6-
*
7-
*
8-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9-
* https://openapi-generator.tech
10-
* Do not edit the class manually.
11-
*/
12-
131
import { RequestFile } from './models';
142

153
export class MultipleQueries {

output/model/multipleQueriesResponse.ts

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,3 @@
1-
/**
2-
* Search API
3-
* API powering the Search feature of Algolia.
4-
*
5-
* The version of the OpenAPI document: 0.1.0
6-
*
7-
*
8-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9-
* https://openapi-generator.tech
10-
* Do not edit the class manually.
11-
*/
12-
131
import { RequestFile } from './models';
142
import { MultipleQueriesResponseResults } from './multipleQueriesResponseResults';
153

output/model/multipleQueriesResponseResults.ts

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,3 @@
1-
/**
2-
* Search API
3-
* API powering the Search feature of Algolia.
4-
*
5-
* The version of the OpenAPI document: 0.1.0
6-
*
7-
*
8-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9-
* https://openapi-generator.tech
10-
* Do not edit the class manually.
11-
*/
12-
131
import { RequestFile } from './models';
142

153
export class MultipleQueriesResponseResults {

output/package.json

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"version": "5.0.0",
44
"description": "JavaScript client for algoliasearch-client-javascript",
55
"repository": "algolia/algoliasearch-client-javascript",
6+
"author": "Algolia",
67
"private": true,
78
"license": "MIT",
89
"main": "dist/api.js",
@@ -13,19 +14,15 @@
1314
"test": "yarn build && node dist/client.js"
1415
},
1516
"engines": {
16-
"node": ">= 8.0.0",
17-
"yarn": ">= 1.6.0"
17+
"node": ">= 12.0.0",
18+
"yarn": ">= 2.0.0"
1819
},
19-
"author": "OpenAPI-Generator Contributors",
2020
"dependencies": {
21-
"bluebird": "^3.5.0",
22-
"request": "^2.81.0",
23-
"@types/bluebird": "3.5.33",
24-
"@types/request": "*",
25-
"rewire": "^3.0.2"
21+
"@types/request": "^2.48.7",
22+
"request": "^2.81.0"
2623
},
2724
"devDependencies": {
28-
"typescript": "^2.4.2",
29-
"@types/node": "8.10.34"
25+
"@types/node": "^16.11.6",
26+
"typescript": "^4.4.4"
3027
}
31-
}
28+
}

output/tsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,6 @@
1616
"outDir": "dist",
1717
"typeRoots": ["node_modules/@types"]
1818
},
19-
"exclude": ["dist", "node_modules", "output"]
19+
"include": ["client-search", "model", "api.ts"],
20+
"exclude": ["dist", "node_modules"]
2021
}

package.json

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,25 @@
11
{
22
"name": "@algolia/automation-javascript-client",
33
"version": "0.0.0",
4+
"workspaces": [
5+
"output"
6+
],
47
"scripts": {
5-
"generate": "yarn openapi-generator-cli generate --generator-key client",
8+
"generate": "PACKAGE_VERSION='4.11.0' TS_POST_PROCESS_FILE='yarn prettier --write .' yarn openapi-generator-cli generate --generator-key client && yarn install",
69
"client:build": "cd output/ && yarn install && yarn build && cd ..",
710
"client:test": "yarn install && tsc && node dist/app.js",
811
"clean:output": "rm -rf output/*",
9-
"clean": "rm -rf dist node_modules build && yarn clean:output"
12+
"clean": "rm -rf dist build node_modules"
1013
},
1114
"devDependencies": {
12-
"@openapitools/openapi-generator-cli": "2.4.13",
15+
"@openapitools/openapi-generator-cli": "^2.4.13",
16+
"algoliasearch-client-javascript": "file:output/",
1317
"prettier": "2.4.1",
1418
"typescript": "4.4.4"
1519
},
16-
"dependencies": {
17-
"algoliasearch-client-javascript": "file:output/"
18-
}
20+
"engines": {
21+
"node": ">= 12.0.0",
22+
"yarn": ">= 2.0.0"
23+
},
24+
"packageManager": "[email protected]"
1925
}

tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@
1616
"outDir": "dist",
1717
"typeRoots": ["node_modules/@types"]
1818
},
19-
"exclude": ["dist", "node_modules", "output"]
19+
"include": ["app.ts"]
2020
}

0 commit comments

Comments
 (0)