Skip to content

Commit

Permalink
(fix): stop building fdr in dist (#990)
Browse files Browse the repository at this point in the history
Co-authored-by: Andrew Jiang <[email protected]>
  • Loading branch information
dsinghvi and abvthecity authored Jun 6, 2024
1 parent 477c9ac commit 252712d
Show file tree
Hide file tree
Showing 400 changed files with 1,221 additions and 442 deletions.
2 changes: 1 addition & 1 deletion fern/apis/fdr/generators.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ groups:
# extraDevDependencies:
# "@types/mime": "3.0.4"
- name: fernapi/fern-typescript-node-sdk
version: 0.12.8-rc0
version: 0.20.9
output:
location: local-file-system
path: ../../../packages/fdr-sdk/src/client/generated
Expand Down
5 changes: 2 additions & 3 deletions packages/commons/core-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,9 @@
"dist"
],
"type": "module",
"main": "dist/src/index.js",
"types": "dist/src/index.d.ts",
"module": "dist/src/index.js",
"source": "src/index.ts",
"module": "src/index.ts",
"main": "src/index.ts",
"sideEffects": false,
"scripts": {
"clean": "rm -rf ./lib && tsc --build --clean",
Expand Down
3 changes: 2 additions & 1 deletion packages/commons/core-utils/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"$schema": "https://json.schemastore.org/tsconfig",
"extends": "@fern-platform/configs/tsconfig/library.json",
"compilerOptions": { "outDir": "./dist", "rootDir": "." },
"compilerOptions": { "outDir": "./dist", "rootDir": "./src" },
"include": ["./src/**/*"]
}
16 changes: 10 additions & 6 deletions packages/fdr-sdk/package.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
{
"name": "@fern-api/fdr-sdk",
"version": "0.0.0",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
"files": [
"dist"
],
"type": "module",
"module": "dist/index.js",
"source": "src/index.ts",
"module": "src/index.ts",
"main": "src/index.ts",
"exports": {
"./navigation": {
"types": "./dist/navigation/index.d.ts",
"import": "./dist/navigation/index.js"
"import": "./src/navigation/index.ts",
"default": "./dist/navigation/index.js"
},
".": {
"types": "./dist/index.d.ts",
"import": "./src/index.ts",
"default": "./dist/index.js"
}
},
Expand All @@ -27,7 +28,9 @@
"qs": "6.12.0",
"tinycolor2": "^1.6.0",
"title": "^3.5.3",
"url-join": "4.0.1"
"url-join": "4.0.1",
"node-fetch": "2.7.0",
"formdata-node": "^6.0.3"
},
"devDependencies": {
"@babel/core": "^7.18.9",
Expand All @@ -42,7 +45,8 @@
"eslint": "^8.56.0",
"prettier": "^3.2.4",
"typescript": "5.4.3",
"vitest": "^1.5.0"
"vitest": "^1.5.0",
"@types/node-fetch": "2.6.9"
},
"scripts": {
"compile": "tsc --build",
Expand Down
1 change: 1 addition & 0 deletions packages/fdr-sdk/src/client/generated/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export declare namespace FernRegistryClient {
interface RequestOptions {
timeoutInSeconds?: number;
maxRetries?: number;
abortSignal?: AbortSignal;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export declare namespace Api {
interface RequestOptions {
timeoutInSeconds?: number;
maxRetries?: number;
abortSignal?: AbortSignal;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export declare namespace V1 {
interface RequestOptions {
timeoutInSeconds?: number;
maxRetries?: number;
abortSignal?: AbortSignal;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* This file was auto-generated by Fern from our API Definition.
*/

import * as FernRegistry from "../../../../../../../../..";
import * as FernRegistry from "../../../../../../../../../index";

export interface DbEndpointDefinition extends FernRegistry.api.v1.read.WithDescription {
authed?: boolean;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* This file was auto-generated by Fern from our API Definition.
*/

import * as FernRegistry from "../../../../../../../../..";
import * as FernRegistry from "../../../../../../../../../index";

export interface DbHttpRequest extends FernRegistry.api.v1.read.WithDescription {
contentType?: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* This file was auto-generated by Fern from our API Definition.
*/

import * as FernRegistry from "../../../../../../..";
import * as FernRegistry from "../../../../../../../index";

export interface DbApiDefinition {
id: FernRegistry.ApiDefinitionId;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* This file was auto-generated by Fern from our API Definition.
*/

import * as FernRegistry from "../../../../../../..";
import * as FernRegistry from "../../../../../../../index";

export interface DbApiDefinitionPackage {
endpoints: FernRegistry.api.v1.db.DbEndpointDefinition[];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* This file was auto-generated by Fern from our API Definition.
*/

import * as FernRegistry from "../../../../../../..";
import * as FernRegistry from "../../../../../../../index";

export interface DbApiDefinitionSubpackage
extends FernRegistry.api.v1.read.WithDescription,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

import * as environments from "../../../../../../../../environments";
import * as core from "../../../../../../../../core";
import * as FernRegistry from "../../../../../../..";
import * as FernRegistry from "../../../../../../../index";
import urlJoin from "url-join";

export declare namespace Read {
Expand All @@ -16,20 +16,28 @@ export declare namespace Read {
interface RequestOptions {
timeoutInSeconds?: number;
maxRetries?: number;
abortSignal?: AbortSignal;
}
}

export class Read {
constructor(protected readonly _options: Read.Options = {}) {}

/**
* @param {FernRegistry.ApiDefinitionId} apiDefinitionId
* @param {Read.RequestOptions} requestOptions - Request-specific configuration.
*
* @example
* await fernRegistry.api.v1.read.getApi("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")
*/
public async getApi(
apiDefinitionId: FernRegistry.ApiDefinitionId,
requestOptions?: Read.RequestOptions
): Promise<core.APIResponse<FernRegistry.api.v1.read.ApiDefinition, FernRegistry.api.v1.read.getApi.Error>> {
const _response = await core.fetcher({
url: urlJoin(
(await core.Supplier.get(this._options.environment)) ?? environments.FernRegistryEnvironment.Prod,
`/registry/api/load/${apiDefinitionId}`
`/registry/api/load/${encodeURIComponent(apiDefinitionId)}`
),
method: "GET",
headers: {
Expand All @@ -41,6 +49,7 @@ export class Read {
contentType: "application/json",
timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : undefined,
maxRetries: requestOptions?.maxRetries,
abortSignal: requestOptions?.abortSignal,
});
if (_response.ok) {
return {
Expand All @@ -65,7 +74,7 @@ export class Read {
};
}

protected async _getAuthorizationHeader() {
protected async _getAuthorizationHeader(): Promise<string | undefined> {
const bearer = await core.Supplier.get(this._options.token);
if (bearer != null) {
return `Bearer ${bearer}`;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* This file was auto-generated by Fern from our API Definition.
*/

import * as FernRegistry from "../../../../../../..";
import * as FernRegistry from "../../../../../../../index";
import * as core from "../../../../../../../../core";

export type Error =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* This file was auto-generated by Fern from our API Definition.
*/

import * as FernRegistry from "../../../../../../../../..";
import * as FernRegistry from "../../../../../../../../../index";

export interface WithAvailability {
availability?: FernRegistry.api.v1.read.Availability;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* This file was auto-generated by Fern from our API Definition.
*/

import * as FernRegistry from "../../../../../../../../..";
import * as FernRegistry from "../../../../../../../../../index";

export type BytesValue = FernRegistry.api.v1.read.BytesValue.Base64;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* This file was auto-generated by Fern from our API Definition.
*/

import * as FernRegistry from "../../../../../../../../..";
import * as FernRegistry from "../../../../../../../../../index";

export interface CodeExamples {
nodeAxios?: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* This file was auto-generated by Fern from our API Definition.
*/

import * as FernRegistry from "../../../../../../../../..";
import * as FernRegistry from "../../../../../../../../../index";

/**
* Hand-written code samples
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* This file was auto-generated by Fern from our API Definition.
*/

import * as FernRegistry from "../../../../../../../../..";
import * as FernRegistry from "../../../../../../../../../index";

export interface EndpointDefinition extends FernRegistry.api.v1.read.WithDescription {
/** When this is true, the api definition will have a union for auth */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* This file was auto-generated by Fern from our API Definition.
*/

import * as FernRegistry from "../../../../../../../../..";
import * as FernRegistry from "../../../../../../../../../index";

export interface EndpointPath {
parts: FernRegistry.api.v1.read.EndpointPathPart[];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* This file was auto-generated by Fern from our API Definition.
*/

import * as FernRegistry from "../../../../../../../../..";
import * as FernRegistry from "../../../../../../../../../index";

export type EndpointPathPart =
| FernRegistry.api.v1.read.EndpointPathPart.Literal
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* This file was auto-generated by Fern from our API Definition.
*/

import * as FernRegistry from "../../../../../../../../..";
import * as FernRegistry from "../../../../../../../../../index";

export interface EndpointSnippetTemplates {
typescript?: FernRegistry.VersionedSnippetTemplate;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* This file was auto-generated by Fern from our API Definition.
*/

import * as FernRegistry from "../../../../../../../../..";
import * as FernRegistry from "../../../../../../../../../index";

export interface Environment {
id: FernRegistry.api.v1.read.EnvironmentId;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* This file was auto-generated by Fern from our API Definition.
*/

import * as FernRegistry from "../../../../../../../../..";
import * as FernRegistry from "../../../../../../../../../index";

export interface ErrorDeclaration
extends FernRegistry.api.v1.read.WithDescription,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* This file was auto-generated by Fern from our API Definition.
*/

import * as FernRegistry from "../../../../../../../../..";
import * as FernRegistry from "../../../../../../../../../index";

export interface ErrorDeclarationV2
extends FernRegistry.api.v1.read.WithDescription,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* This file was auto-generated by Fern from our API Definition.
*/

import * as FernRegistry from "../../../../../../../../..";
import * as FernRegistry from "../../../../../../../../../index";

export interface ErrorExample extends FernRegistry.api.v1.read.WithDescription {
name?: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* This file was auto-generated by Fern from our API Definition.
*/

import * as FernRegistry from "../../../../../../../../..";
import * as FernRegistry from "../../../../../../../../../index";

export interface ExampleEndpointCall extends FernRegistry.api.v1.read.WithDescription {
name?: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* This file was auto-generated by Fern from our API Definition.
*/

import * as FernRegistry from "../../../../../../../../..";
import * as FernRegistry from "../../../../../../../../../index";

export type ExampleEndpointRequest =
| FernRegistry.api.v1.read.ExampleEndpointRequest.Json
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* This file was auto-generated by Fern from our API Definition.
*/

import * as FernRegistry from "../../../../../../../../..";
import * as FernRegistry from "../../../../../../../../../index";

export type ExampleEndpointResponse =
| FernRegistry.api.v1.read.ExampleEndpointResponse.Json
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* This file was auto-generated by Fern from our API Definition.
*/

import * as FernRegistry from "../../../../../../../../..";
import * as FernRegistry from "../../../../../../../../../index";

export type ExampleErrorResponse = FernRegistry.api.v1.read.ExampleErrorResponse.Json;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* This file was auto-generated by Fern from our API Definition.
*/

import * as FernRegistry from "../../../../../../../../..";
import * as FernRegistry from "../../../../../../../../../index";

export interface FilenameWithData {
filename: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* This file was auto-generated by Fern from our API Definition.
*/

import * as FernRegistry from "../../../../../../../../..";
import * as FernRegistry from "../../../../../../../../../index";

export type FormValue =
| FernRegistry.api.v1.read.FormValue.Json
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* This file was auto-generated by Fern from our API Definition.
*/

import * as FernRegistry from "../../../../../../../../..";
import * as FernRegistry from "../../../../../../../../../index";

export interface Header extends FernRegistry.api.v1.read.WithDescription, FernRegistry.api.v1.read.WithAvailability {
key: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* This file was auto-generated by Fern from our API Definition.
*/

import * as FernRegistry from "../../../../../../../../..";
import * as FernRegistry from "../../../../../../../../../index";

export interface HttpRequest extends FernRegistry.api.v1.read.WithDescription {
contentType: string;
Expand Down
Loading

0 comments on commit 252712d

Please sign in to comment.