@osdk/generator 1.0.0 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -0
- package/build/js/index.cjs +1429 -176
- package/build/js/index.cjs.map +1 -1
- package/build/js/index.mjs +1428 -175
- package/build/js/index.mjs.map +1 -1
- package/build/types/MinimalFs.d.ts +2 -0
- package/build/types/WireOntologyDefinition.d.ts +6 -0
- package/build/types/shared/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.d.ts +3 -0
- package/build/types/shared/sanitizeMetadata.d.ts +8 -1
- package/build/types/shared/wireObjectTypeV2ToSdkObjectConst.d.ts +1 -0
- package/build/types/util/test/TodoWireOntology.d.ts +1 -0
- package/build/types/util/test/createMockMinimalFiles.d.ts +2 -1
- package/build/types/util/verifyOutdir.d.ts +8 -0
- package/build/types/v2.0/generateClientSdkVersionTwoPointZero.d.ts +2 -2
- package/package.json +3 -3
|
@@ -1,3 +1,9 @@
|
|
|
1
1
|
import type * as gateway from "@osdk/gateway";
|
|
2
|
+
import type { ObjectTypeV2 } from "@osdk/gateway/types";
|
|
2
3
|
export interface WireOntologyDefinition extends gateway.components.OntologyFullMetadata {
|
|
3
4
|
}
|
|
5
|
+
export interface __UNSTABLE_InterfaceType extends Omit<ObjectTypeV2, "primaryKey"> {
|
|
6
|
+
}
|
|
7
|
+
export interface __UNSTABLE_WireOntologyDefinitionV2 extends WireOntologyDefinition {
|
|
8
|
+
__UNSTABLE_interfaceTypes?: Record<string, __UNSTABLE_InterfaceType>;
|
|
9
|
+
}
|
|
@@ -1,2 +1,9 @@
|
|
|
1
|
-
import type { WireOntologyDefinition } from "../WireOntologyDefinition";
|
|
1
|
+
import type { __UNSTABLE_WireOntologyDefinitionV2, WireOntologyDefinition } from "../WireOntologyDefinition";
|
|
2
|
+
/**
|
|
3
|
+
* @internal
|
|
4
|
+
*/
|
|
5
|
+
export declare function sanitizeMetadata(ontology: __UNSTABLE_WireOntologyDefinitionV2): __UNSTABLE_WireOntologyDefinitionV2;
|
|
6
|
+
/**
|
|
7
|
+
* @internal
|
|
8
|
+
*/
|
|
2
9
|
export declare function sanitizeMetadata(ontology: WireOntologyDefinition): WireOntologyDefinition;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import type { WriteFileFn } from "../../MinimalFs";
|
|
1
|
+
import type { ReaddirFn, WriteFileFn } from "../../MinimalFs";
|
|
2
2
|
export declare function createMockMinimalFiles(): {
|
|
3
3
|
minimalFiles: {
|
|
4
4
|
writeFile: WriteFileFn;
|
|
5
5
|
mkdir: () => Promise<void>;
|
|
6
|
+
readdir: ReaddirFn;
|
|
6
7
|
};
|
|
7
8
|
getFiles: () => {
|
|
8
9
|
[k: string]: string;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { MinimalFs } from "../MinimalFs";
|
|
2
|
+
/**
|
|
3
|
+
* Verify that the target outDir does not yet exist OR is empty.
|
|
4
|
+
*
|
|
5
|
+
* Re-generating an ontology on top of itself is not supported and may leave old
|
|
6
|
+
* files around or refuse to update files with new contents in some cases.
|
|
7
|
+
*/
|
|
8
|
+
export declare function verifyOutdir(outDir: string, fs: MinimalFs): Promise<void>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { MinimalFs } from "../MinimalFs";
|
|
2
|
-
import type {
|
|
3
|
-
export declare function generateClientSdkVersionTwoPointZero(ontology:
|
|
2
|
+
import type { __UNSTABLE_WireOntologyDefinitionV2 } from "../WireOntologyDefinition";
|
|
3
|
+
export declare function generateClientSdkVersionTwoPointZero(ontology: __UNSTABLE_WireOntologyDefinitionV2, fs: MinimalFs, outDir: string, packageType?: "module" | "commonjs"): Promise<void>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@osdk/generator",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "",
|
|
5
5
|
"access": "public",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
"prettier": "^3.0.3",
|
|
22
22
|
"prettier-plugin-organize-imports": "^3.2.3",
|
|
23
23
|
"tiny-invariant": "^1.3.1",
|
|
24
|
-
"@osdk/api": "1.0.
|
|
25
|
-
"@osdk/gateway": "1.0.
|
|
24
|
+
"@osdk/api": "1.0.1",
|
|
25
|
+
"@osdk/gateway": "1.0.1"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@types/node": "^16.11.11",
|