Skip to content

Commit

Permalink
fix: skip namespace in typescript
Browse files Browse the repository at this point in the history
  • Loading branch information
patrick-zippenfenig committed Oct 16, 2023
1 parent 07c5e69 commit 4c1e1f8
Show file tree
Hide file tree
Showing 44 changed files with 140 additions and 81 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,11 @@ More information on how to use the compiled schema files can be found in the dir
```bash
flatc --swift -o swift/Sources/OpenMeteoSdk/ flatbuffers/*.fbs
flatc --python --python-typing -o python/ flatbuffers/*.fbs
flatc --ts -o ts/ flatbuffers/*.fbs


cp -r flatbuffers/ flatbuffers_no_namespace/
find flatbuffers_no_namespace -type f -exec sed -i '' -e "s/namespace\ openmeteo_sdk;//" {} \;
flatc --ts -o ts/ flatbuffers_no_namespace/*.fbs
rm -R flatbuffers_no_namespace
```


Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"name": "@openmeteo/sdk",
"version": "0.0.0",
"description": "Open-Meteo SDK",
"main": "./lib/openmeteo-sdk.js",
"files": [
"lib/**/*"
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

import * as flatbuffers from 'flatbuffers';

import { AirQualityCurrent } from '../openmeteo-sdk/air-quality-current.js';
import { AirQualityHourly } from '../openmeteo-sdk/air-quality-hourly.js';
import { AirQualityModel } from '../openmeteo-sdk/air-quality-model.js';
import { TimeRange } from '../openmeteo-sdk/time-range.js';
import { AirQualityCurrent } from './air-quality-current.js';
import { AirQualityHourly } from './air-quality-hourly.js';
import { AirQualityModel } from './air-quality-model.js';
import { TimeRange } from './time-range.js';


export class AirQualityApiResponse {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import * as flatbuffers from 'flatbuffers';

import { ValueAndUnit } from '../openmeteo-sdk/value-and-unit.js';
import { ValueAndUnit } from './value-and-unit.js';


export class AirQualityCurrent {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

import * as flatbuffers from 'flatbuffers';

import { TimeRange } from '../openmeteo-sdk/time-range.js';
import { ValuesAndUnit } from '../openmeteo-sdk/values-and-unit.js';
import { TimeRange } from './time-range.js';
import { ValuesAndUnit } from './values-and-unit.js';


export class AirQualityHourly {
Expand Down
File renamed without changes.
13 changes: 12 additions & 1 deletion ts/air_quality_api.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
// automatically generated by the FlatBuffers compiler, do not modify

export * as openmeteo_sdk from './openmeteo-sdk.js';
export { AirQualityApiResponse } from './air-quality-api-response.js';
export { AirQualityCurrent } from './air-quality-current.js';
export { AirQualityHourly } from './air-quality-hourly.js';
export { AirQualityModel } from './air-quality-model.js';
export { SiUnit } from './si-unit.js';
export { TimeRange } from './time-range.js';
export { ValueAndUnit } from './value-and-unit.js';
export { ValuesAndLevelAndMember } from './values-and-level-and-member.js';
export { ValuesAndMember } from './values-and-member.js';
export { ValuesAndUnit } from './values-and-unit.js';
export { ValuesUnitAndMember } from './values-unit-and-member.js';
export { ValuesUnitPressureLevelAndMember } from './values-unit-pressure-level-and-member.js';
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

import * as flatbuffers from 'flatbuffers';

import { ClimateDaily } from '../openmeteo-sdk/climate-daily.js';
import { ClimateModel } from '../openmeteo-sdk/climate-model.js';
import { ClimateDaily } from './climate-daily.js';
import { ClimateModel } from './climate-model.js';


export class ClimateApiResponse {
Expand Down
4 changes: 2 additions & 2 deletions ts/openmeteo-sdk/climate-daily.ts → ts/climate-daily.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

import * as flatbuffers from 'flatbuffers';

import { TimeRange } from '../openmeteo-sdk/time-range.js';
import { ValuesAndUnit } from '../openmeteo-sdk/values-and-unit.js';
import { TimeRange } from './time-range.js';
import { ValuesAndUnit } from './values-and-unit.js';


export class ClimateDaily {
Expand Down
File renamed without changes.
12 changes: 11 additions & 1 deletion ts/climate_api.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
// automatically generated by the FlatBuffers compiler, do not modify

export * as openmeteo_sdk from './openmeteo-sdk.js';
export { ClimateApiResponse } from './climate-api-response.js';
export { ClimateDaily } from './climate-daily.js';
export { ClimateModel } from './climate-model.js';
export { SiUnit } from './si-unit.js';
export { TimeRange } from './time-range.js';
export { ValueAndUnit } from './value-and-unit.js';
export { ValuesAndLevelAndMember } from './values-and-level-and-member.js';
export { ValuesAndMember } from './values-and-member.js';
export { ValuesAndUnit } from './values-and-unit.js';
export { ValuesUnitAndMember } from './values-unit-and-member.js';
export { ValuesUnitPressureLevelAndMember } from './values-unit-pressure-level-and-member.js';
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

import * as flatbuffers from 'flatbuffers';

import { EnsembleDaily } from '../openmeteo-sdk/ensemble-daily.js';
import { EnsembleHourly } from '../openmeteo-sdk/ensemble-hourly.js';
import { EnsembleModel } from '../openmeteo-sdk/ensemble-model.js';
import { EnsembleDaily } from './ensemble-daily.js';
import { EnsembleHourly } from './ensemble-hourly.js';
import { EnsembleModel } from './ensemble-model.js';


export class EnsembleApiResponse {
Expand Down
4 changes: 2 additions & 2 deletions ts/openmeteo-sdk/ensemble-daily.ts → ts/ensemble-daily.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

import * as flatbuffers from 'flatbuffers';

import { TimeRange } from '../openmeteo-sdk/time-range.js';
import { ValuesUnitAndMember } from '../openmeteo-sdk/values-unit-and-member.js';
import { TimeRange } from './time-range.js';
import { ValuesUnitAndMember } from './values-unit-and-member.js';


export class EnsembleDaily {
Expand Down
8 changes: 4 additions & 4 deletions ts/openmeteo-sdk/ensemble-hourly.ts → ts/ensemble-hourly.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

import * as flatbuffers from 'flatbuffers';

import { TimeRange } from '../openmeteo-sdk/time-range.js';
import { ValuesAndLevelAndMember } from '../openmeteo-sdk/values-and-level-and-member.js';
import { ValuesUnitAndMember } from '../openmeteo-sdk/values-unit-and-member.js';
import { ValuesUnitPressureLevelAndMember } from '../openmeteo-sdk/values-unit-pressure-level-and-member.js';
import { TimeRange } from './time-range.js';
import { ValuesAndLevelAndMember } from './values-and-level-and-member.js';
import { ValuesUnitAndMember } from './values-unit-and-member.js';
import { ValuesUnitPressureLevelAndMember } from './values-unit-pressure-level-and-member.js';


export class EnsembleHourly {
Expand Down
File renamed without changes.
13 changes: 12 additions & 1 deletion ts/ensemble_api.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
// automatically generated by the FlatBuffers compiler, do not modify

export * as openmeteo_sdk from './openmeteo-sdk.js';
export { EnsembleApiResponse } from './ensemble-api-response.js';
export { EnsembleDaily } from './ensemble-daily.js';
export { EnsembleHourly } from './ensemble-hourly.js';
export { EnsembleModel } from './ensemble-model.js';
export { SiUnit } from './si-unit.js';
export { TimeRange } from './time-range.js';
export { ValueAndUnit } from './value-and-unit.js';
export { ValuesAndLevelAndMember } from './values-and-level-and-member.js';
export { ValuesAndMember } from './values-and-member.js';
export { ValuesAndUnit } from './values-and-unit.js';
export { ValuesUnitAndMember } from './values-unit-and-member.js';
export { ValuesUnitPressureLevelAndMember } from './values-unit-pressure-level-and-member.js';
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

import * as flatbuffers from 'flatbuffers';

import { FloodDaily } from '../openmeteo-sdk/flood-daily.js';
import { FloodModel } from '../openmeteo-sdk/flood-model.js';
import { TimeRange } from '../openmeteo-sdk/time-range.js';
import { FloodDaily } from './flood-daily.js';
import { FloodModel } from './flood-model.js';
import { TimeRange } from './time-range.js';


export class FloodApiResponse {
Expand Down
6 changes: 3 additions & 3 deletions ts/openmeteo-sdk/flood-daily.ts → ts/flood-daily.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

import * as flatbuffers from 'flatbuffers';

import { TimeRange } from '../openmeteo-sdk/time-range.js';
import { ValuesAndUnit } from '../openmeteo-sdk/values-and-unit.js';
import { ValuesUnitAndMember } from '../openmeteo-sdk/values-unit-and-member.js';
import { TimeRange } from './time-range.js';
import { ValuesAndUnit } from './values-and-unit.js';
import { ValuesUnitAndMember } from './values-unit-and-member.js';


export class FloodDaily {
Expand Down
File renamed without changes.
12 changes: 11 additions & 1 deletion ts/flood_api.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
// automatically generated by the FlatBuffers compiler, do not modify

export * as openmeteo_sdk from './openmeteo-sdk.js';
export { FloodApiResponse } from './flood-api-response.js';
export { FloodDaily } from './flood-daily.js';
export { FloodModel } from './flood-model.js';
export { SiUnit } from './si-unit.js';
export { TimeRange } from './time-range.js';
export { ValueAndUnit } from './value-and-unit.js';
export { ValuesAndLevelAndMember } from './values-and-level-and-member.js';
export { ValuesAndMember } from './values-and-member.js';
export { ValuesAndUnit } from './values-and-unit.js';
export { ValuesUnitAndMember } from './values-unit-and-member.js';
export { ValuesUnitPressureLevelAndMember } from './values-unit-pressure-level-and-member.js';
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

import * as flatbuffers from 'flatbuffers';

import { MarineCurrent } from '../openmeteo-sdk/marine-current.js';
import { MarineDaily } from '../openmeteo-sdk/marine-daily.js';
import { MarineHourly } from '../openmeteo-sdk/marine-hourly.js';
import { MarineModel } from '../openmeteo-sdk/marine-model.js';
import { MarineCurrent } from './marine-current.js';
import { MarineDaily } from './marine-daily.js';
import { MarineHourly } from './marine-hourly.js';
import { MarineModel } from './marine-model.js';


export class MarineApiResponse {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import * as flatbuffers from 'flatbuffers';

import { ValueAndUnit } from '../openmeteo-sdk/value-and-unit.js';
import { ValueAndUnit } from './value-and-unit.js';


export class MarineCurrent {
Expand Down
4 changes: 2 additions & 2 deletions ts/openmeteo-sdk/marine-daily.ts → ts/marine-daily.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

import * as flatbuffers from 'flatbuffers';

import { TimeRange } from '../openmeteo-sdk/time-range.js';
import { ValuesAndUnit } from '../openmeteo-sdk/values-and-unit.js';
import { TimeRange } from './time-range.js';
import { ValuesAndUnit } from './values-and-unit.js';


export class MarineDaily {
Expand Down
4 changes: 2 additions & 2 deletions ts/openmeteo-sdk/marine-hourly.ts → ts/marine-hourly.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

import * as flatbuffers from 'flatbuffers';

import { TimeRange } from '../openmeteo-sdk/time-range.js';
import { ValuesAndUnit } from '../openmeteo-sdk/values-and-unit.js';
import { TimeRange } from './time-range.js';
import { ValuesAndUnit } from './values-and-unit.js';


export class MarineHourly {
Expand Down
File renamed without changes.
14 changes: 13 additions & 1 deletion ts/marine_api.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
// automatically generated by the FlatBuffers compiler, do not modify

export * as openmeteo_sdk from './openmeteo-sdk.js';
export { MarineApiResponse } from './marine-api-response.js';
export { MarineCurrent } from './marine-current.js';
export { MarineDaily } from './marine-daily.js';
export { MarineHourly } from './marine-hourly.js';
export { MarineModel } from './marine-model.js';
export { SiUnit } from './si-unit.js';
export { TimeRange } from './time-range.js';
export { ValueAndUnit } from './value-and-unit.js';
export { ValuesAndLevelAndMember } from './values-and-level-and-member.js';
export { ValuesAndMember } from './values-and-member.js';
export { ValuesAndUnit } from './values-and-unit.js';
export { ValuesUnitAndMember } from './values-unit-and-member.js';
export { ValuesUnitPressureLevelAndMember } from './values-unit-pressure-level-and-member.js';
17 changes: 0 additions & 17 deletions ts/openmeteo-sdk.ts

This file was deleted.

File renamed without changes.
File renamed without changes.
9 changes: 8 additions & 1 deletion ts/units.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
// automatically generated by the FlatBuffers compiler, do not modify

export * as openmeteo_sdk from './openmeteo-sdk.js';
export { SiUnit } from './si-unit.js';
export { TimeRange } from './time-range.js';
export { ValueAndUnit } from './value-and-unit.js';
export { ValuesAndLevelAndMember } from './values-and-level-and-member.js';
export { ValuesAndMember } from './values-and-member.js';
export { ValuesAndUnit } from './values-and-unit.js';
export { ValuesUnitAndMember } from './values-unit-and-member.js';
export { ValuesUnitPressureLevelAndMember } from './values-unit-pressure-level-and-member.js';
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import * as flatbuffers from 'flatbuffers';

import { SiUnit } from '../openmeteo-sdk/si-unit.js';
import { SiUnit } from './si-unit.js';


export class ValueAndUnit {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import * as flatbuffers from 'flatbuffers';

import { ValuesAndMember } from '../openmeteo-sdk/values-and-member.js';
import { ValuesAndMember } from './values-and-member.js';


export class ValuesAndLevelAndMember {
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import * as flatbuffers from 'flatbuffers';

import { SiUnit } from '../openmeteo-sdk/si-unit.js';
import { SiUnit } from './si-unit.js';


export class ValuesAndUnit {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

import * as flatbuffers from 'flatbuffers';

import { SiUnit } from '../openmeteo-sdk/si-unit.js';
import { ValuesAndMember } from '../openmeteo-sdk/values-and-member.js';
import { SiUnit } from './si-unit.js';
import { ValuesAndMember } from './values-and-member.js';


export class ValuesUnitAndMember {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

import * as flatbuffers from 'flatbuffers';

import { SiUnit } from '../openmeteo-sdk/si-unit.js';
import { ValuesAndLevelAndMember } from '../openmeteo-sdk/values-and-level-and-member.js';
import { SiUnit } from './si-unit.js';
import { ValuesAndLevelAndMember } from './values-and-level-and-member.js';


export class ValuesUnitPressureLevelAndMember {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

import * as flatbuffers from 'flatbuffers';

import { SiUnit } from '../openmeteo-sdk/si-unit.js';
import { ValuesAndLevel } from '../openmeteo-sdk/values-and-level.js';
import { SiUnit } from './si-unit.js';
import { ValuesAndLevel } from './values-and-level.js';


export class ValuesUnitPressureLevel {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

import * as flatbuffers from 'flatbuffers';

import { WeatherCurrent } from '../openmeteo-sdk/weather-current.js';
import { WeatherDaily } from '../openmeteo-sdk/weather-daily.js';
import { WeatherHourly } from '../openmeteo-sdk/weather-hourly.js';
import { WeatherModel } from '../openmeteo-sdk/weather-model.js';
import { WeatherCurrent } from './weather-current.js';
import { WeatherDaily } from './weather-daily.js';
import { WeatherHourly } from './weather-hourly.js';
import { WeatherModel } from './weather-model.js';


export class WeatherApiResponse {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import * as flatbuffers from 'flatbuffers';

import { ValueAndUnit } from '../openmeteo-sdk/value-and-unit.js';
import { ValueAndUnit } from './value-and-unit.js';


export class WeatherCurrent {
Expand Down
4 changes: 2 additions & 2 deletions ts/openmeteo-sdk/weather-daily.ts → ts/weather-daily.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

import * as flatbuffers from 'flatbuffers';

import { TimeRange } from '../openmeteo-sdk/time-range.js';
import { ValuesAndUnit } from '../openmeteo-sdk/values-and-unit.js';
import { TimeRange } from './time-range.js';
import { ValuesAndUnit } from './values-and-unit.js';


export class WeatherDaily {
Expand Down
Loading

0 comments on commit 4c1e1f8

Please sign in to comment.