@osdk/generator 0.0.0

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.
@@ -0,0 +1,31 @@
1
+ 'use strict';
2
+
3
+ var t = require('path');
4
+
5
+ function _interopNamespace(e) {
6
+ if (e && e.__esModule) return e;
7
+ var n = Object.create(null);
8
+ if (e) {
9
+ Object.keys(e).forEach(function (k) {
10
+ if (k !== 'default') {
11
+ var d = Object.getOwnPropertyDescriptor(e, k);
12
+ Object.defineProperty(n, k, d.get ? d : {
13
+ enumerable: true,
14
+ get: function () { return e[k]; }
15
+ });
16
+ }
17
+ });
18
+ }
19
+ n.default = e;
20
+ return Object.freeze(n);
21
+ }
22
+
23
+ var t__namespace = /*#__PURE__*/_interopNamespace(t);
24
+
25
+ async function y(n,o,e){let {rid:i,apiName:a,description:s,objectTypes:p,actionTypes:r,queryTypes:c}=n;await o.writeFile(t__namespace.join(e,"index.ts"),`// Path: ${t__namespace.join(e,"index.ts")}
26
+ export const ontologyRid = "${i}";
27
+ `);}
28
+
29
+ exports.generateClientSdkVersionOneDotOne = y;
30
+ //# sourceMappingURL=out.js.map
31
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/index.ts"],"names":["path","generateClientSdkVersionOneDotOne","ontology","fs","outDir","rid","apiName","description","objectTypes","actionTypes","queryTypes","q"],"mappings":"AAgBA,UAAYA,MAAU,OACtB,eAAsBC,EAAkCC,EAExDC,EAAIC,EAAQ,CACV,GAAM,CACJ,IAAAC,EACA,QAAAC,EACA,YAAAC,EACA,YAAAC,EACA,YAAAC,EACA,WAAAC,CACF,EAAIR,EACES,EAAI,MAAMR,EAAG,UAAe,OAAKC,EAAQ,UAAU,EAAG,YAAiB,OAAKA,EAAQ,UAAU,CAAC;AAAA,kCACrEC,CAAG;AAAA,KAChC,CACL","sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport * as path from \"node:path\";\nexport async function generateClientSdkVersionOneDotOne(ontology,\n// eslint-disable-next-line @typescript-eslint/consistent-type-imports\nfs, outDir) {\n const {\n rid,\n apiName,\n description,\n objectTypes,\n actionTypes,\n queryTypes\n } = ontology;\n const q = await fs.writeFile(path.join(outDir, \"index.ts\"), `// Path: ${path.join(outDir, \"index.ts\")}\n export const ontologyRid = \"${rid}\";\n `);\n}"]}
@@ -0,0 +1,9 @@
1
+ import * as t from 'path';
2
+
3
+ async function y(n,o,e){let {rid:i,apiName:a,description:s,objectTypes:p,actionTypes:r,queryTypes:c}=n;await o.writeFile(t.join(e,"index.ts"),`// Path: ${t.join(e,"index.ts")}
4
+ export const ontologyRid = "${i}";
5
+ `);}
6
+
7
+ export { y as generateClientSdkVersionOneDotOne };
8
+ //# sourceMappingURL=out.js.map
9
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/index.ts"],"names":["path","generateClientSdkVersionOneDotOne","ontology","fs","outDir","rid","apiName","description","objectTypes","actionTypes","queryTypes","q"],"mappings":"AAgBA,UAAYA,MAAU,OACtB,eAAsBC,EAAkCC,EAExDC,EAAIC,EAAQ,CACV,GAAM,CACJ,IAAAC,EACA,QAAAC,EACA,YAAAC,EACA,YAAAC,EACA,YAAAC,EACA,WAAAC,CACF,EAAIR,EACES,EAAI,MAAMR,EAAG,UAAe,OAAKC,EAAQ,UAAU,EAAG,YAAiB,OAAKA,EAAQ,UAAU,CAAC;AAAA,kCACrEC,CAAG;AAAA,KAChC,CACL","sourcesContent":["/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport * as path from \"node:path\";\nexport async function generateClientSdkVersionOneDotOne(ontology,\n// eslint-disable-next-line @typescript-eslint/consistent-type-imports\nfs, outDir) {\n const {\n rid,\n apiName,\n description,\n objectTypes,\n actionTypes,\n queryTypes\n } = ontology;\n const q = await fs.writeFile(path.join(outDir, \"index.ts\"), `// Path: ${path.join(outDir, \"index.ts\")}\n export const ontologyRid = \"${rid}\";\n `);\n}"]}
@@ -0,0 +1,15 @@
1
+ import type * as gateway from "@osdk/gateway";
2
+ export interface OntologyDefinition {
3
+ rid: string;
4
+ apiName: string;
5
+ description?: string;
6
+ objectTypes: {
7
+ [key: string]: gateway.components.ObjectTypeV2;
8
+ };
9
+ actionTypes: gateway.components.ActionTypeV2[];
10
+ queryTypes: gateway.components.QueryTypeV2[];
11
+ }
12
+ export type WriteFileFn = (path: string, contents: string) => Promise<void>;
13
+ export declare function generateClientSdkVersionOneDotOne(ontology: OntologyDefinition, fs: {
14
+ writeFile: WriteFileFn;
15
+ }, outDir: string): Promise<void>;
@@ -0,0 +1 @@
1
+ export {};
package/package.json ADDED
@@ -0,0 +1,56 @@
1
+ {
2
+ "name": "@osdk/generator",
3
+ "version": "0.0.0",
4
+ "description": "",
5
+ "access": "public",
6
+ "license": "Apache-2.0",
7
+ "exports": {
8
+ ".": {
9
+ "types": "./build/types/index.d.ts",
10
+ "import": "./build/js/index.mjs",
11
+ "require": "./build/js/index.js"
12
+ },
13
+ "./*": {
14
+ "types": "./build/types/public/*.d.ts",
15
+ "import": "./build/js/public/*.mjs",
16
+ "require": "./build/js/public/*.js"
17
+ }
18
+ },
19
+ "dependencies": {
20
+ "fetch-retry": "^5.0.6",
21
+ "tiny-invariant": "^1.3.1",
22
+ "@osdk/gateway": "0.0.0"
23
+ },
24
+ "devDependencies": {
25
+ "@types/node": "^16.11.11",
26
+ "ts-expect": "^1.3.0",
27
+ "typescript": "^5.2.2",
28
+ "vitest": "^0.34.6"
29
+ },
30
+ "publishConfig": {
31
+ "access": "public"
32
+ },
33
+ "imports": {
34
+ "#net": "./src/client/internal/net/index.ts",
35
+ "#util": "./src/util/index.ts",
36
+ "#ontology": "./src/ontology/index.ts",
37
+ "#client/converters": "./src/client/internal/conversions/index.ts",
38
+ "#client/query": "./src/client/query/index.ts"
39
+ },
40
+ "keywords": [],
41
+ "files": [
42
+ "build/types",
43
+ "build/js",
44
+ "CHANGELOG.md",
45
+ "package.json"
46
+ ],
47
+ "scripts": {
48
+ "clean": "rm -rf lib dist types build tsconfig.tsbuildinfo",
49
+ "dev:transpile": "tsup --watch",
50
+ "fix-lint": "eslint . --fix && dprint fmt --config $(find-up dprint.json)",
51
+ "lint": "eslint . && dprint check --config $(find-up dprint.json)",
52
+ "transpile": "tsup",
53
+ "transpileWatch": "tsup --watch",
54
+ "typecheck": "tsc-absolute --build"
55
+ }
56
+ }