Skip to content

Commit 00ffb8f

Browse files
authored
Merge pull request #89 from tudvari/replace_gulp
remove gulp
2 parents d5239c1 + b5b1834 commit 00ffb8f

File tree

5 files changed

+1700
-11182
lines changed

5 files changed

+1700
-11182
lines changed

compile-ts-types.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
const fs = require('fs')
2+
const compiler = require('json-schema-to-typescript')
3+
4+
async function f() {
5+
const compiledTs = await compiler.compileFromFile('schema.json');
6+
fs.writeFileSync('index.d.ts', compiledTs)
7+
}
8+
9+
f();
10+

gulpfile.js

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

index.d.ts

Lines changed: 27 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
/* tslint:disable */
2+
/**
3+
* This file was automatically generated by json-schema-to-typescript.
4+
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
5+
* and run json-schema-to-typescript to regenerate this file.
6+
*/
7+
18
export type DefinitionsDeployment = {
29
mode?: string;
310
replicas?: number;
@@ -22,7 +29,17 @@ export type DefinitionsDeployment = {
2229
placement?: {
2330
constraints?: string[];
2431
};
25-
} & ({
32+
} & Deployment;
33+
export type Labels =
34+
| {
35+
/**
36+
* This interface was referenced by `undefined`'s JSON-Schema definition
37+
* via the `patternProperty` ".+".
38+
*/
39+
[k: string]: string;
40+
}
41+
| string[];
42+
export type Deployment = {
2643
mode?: string;
2744
replicas?: number;
2845
labels?: Labels;
@@ -46,16 +63,7 @@ export type DefinitionsDeployment = {
4663
placement?: {
4764
constraints?: string[];
4865
};
49-
} | null);
50-
export type Labels =
51-
| {
52-
/**
53-
* This interface was referenced by `undefined`'s JSON-Schema definition
54-
* via the `patternProperty` ".+".
55-
*/
56-
[k: string]: string;
57-
}
58-
| string[];
66+
} | null;
5967
export type ListOrDict =
6068
| {
6169
/**
@@ -73,6 +81,7 @@ export type StringOrList = string | ListOfStrings;
7381
*/
7482
export type DefinitionsNetwork = {
7583
driver?: string;
84+
name?: string;
7685
driver_opts?: {
7786
/**
7887
* This interface was referenced by `undefined`'s JSON-Schema definition
@@ -93,8 +102,10 @@ export type DefinitionsNetwork = {
93102
};
94103
internal?: boolean;
95104
labels?: Labels;
96-
} & ({
105+
} & Network;
106+
export type Network = {
97107
driver?: string;
108+
name?: string;
98109
driver_opts?: {
99110
/**
100111
* This interface was referenced by `undefined`'s JSON-Schema definition
@@ -115,7 +126,7 @@ export type DefinitionsNetwork = {
115126
};
116127
internal?: boolean;
117128
labels?: Labels;
118-
} | null);
129+
} | null;
119130
/**
120131
* This interface was referenced by `PropertiesVolumes`'s JSON-Schema definition
121132
* via the `patternProperty` "^[a-zA-Z0-9._-]+$".
@@ -135,7 +146,8 @@ export type DefinitionsVolume = {
135146
name?: string;
136147
};
137148
labels?: Labels;
138-
} & ({
149+
} & Volume;
150+
export type Volume = {
139151
driver?: string;
140152
driver_opts?: {
141153
/**
@@ -150,7 +162,7 @@ export type DefinitionsVolume = {
150162
name?: string;
151163
};
152164
labels?: Labels;
153-
} | null);
165+
} | null;
154166

155167
export interface ConfigSchemaV30Json {
156168
version: string;

0 commit comments

Comments
 (0)