Skip to content

Commit

Permalink
Refactor prep for ontology as code (#420)
Browse files Browse the repository at this point in the history
* Split out simplecache

* Migrate conjure junk to its own packages
  • Loading branch information
ericanderson authored Jun 27, 2024
1 parent 416c50b commit 392b70d
Show file tree
Hide file tree
Showing 2,810 changed files with 486 additions and 165 deletions.
2 changes: 2 additions & 0 deletions .changeset/sharp-penguins-double.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
---
2 changes: 2 additions & 0 deletions .monorepolint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ const esmOnlyPackages = [
"@osdk/cli",
"@osdk/client",
"@osdk/client.api",
"@osdk/client.unstable",
"@osdk/client.unstable.osw",
"@osdk/create-app",
"@osdk/example-generator",
"@osdk/foundry.*",
Expand Down
49 changes: 49 additions & 0 deletions packages/client.unstable.osw/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{
"name": "@osdk/client.unstable.osw",
"version": "0.0.0",
"license": "Apache-2.0",
"repository": {
"type": "git",
"url": "https://github.com/palantir/osdk-ts.git"
},
"exports": {
".": {
"browser": "./build/browser/index.js",
"import": "./build/esm/index.js"
},
"./*": {
"browser": "./build/browser/public/*.js",
"import": "./build/esm/public/*.js"
}
},
"scripts": {
"check-attw": "../../scripts/build_common/check-attw.sh esm",
"clean": "rm -rf lib dist types build tsconfig.tsbuildinfo",
"fix-lint": "eslint . --fix && dprint fmt --config $(find-up dprint.json)",
"lint": "eslint . && dprint check --config $(find-up dprint.json)",
"transpile": "tsup",
"typecheck": "../../scripts/build_common/typecheck.sh esm"
},
"dependencies": {
"conjure-lite": "^0.4.4"
},
"devDependencies": {
"typescript": "^5.4.5"
},
"publishConfig": {
"access": "public"
},
"files": [
"build/cjs",
"build/esm",
"build/browser",
"CHANGELOG.md",
"package.json",
"templates",
"*.d.ts"
],
"main": "./build/cjs/index.cjs",
"module": "./build/esm/index.js",
"types": "./build/esm/index.d.ts",
"type": "module"
}
36 changes: 36 additions & 0 deletions packages/client.unstable.osw/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/*
* Copyright 2024 Palantir Technologies, Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

export type {
StreamMessage,
SubscriptionClosed,
} from "./generated/object-set-watcher/objectsetwatcher/api/index.js";
export type {
Message,
Message_objectSetChanged,
} from "./generated/object-set-watcher/objectsetwatcher/api/Message.js";
export type { FoundryObject } from "./generated/object-set-watcher/objectsetwatcher/api/object/FoundryObject.js";
export type { ObjectSetSubscribeRequest } from "./generated/object-set-watcher/objectsetwatcher/api/ObjectSetSubscribeRequest.js";
export type { ObjectSetSubscribeRequests } from "./generated/object-set-watcher/objectsetwatcher/api/ObjectSetSubscribeRequests.js";
export type { ObjectSetSubscribeResponses } from "./generated/object-set-watcher/objectsetwatcher/api/ObjectSetSubscribeResponses.js";
export type {
ObjectUpdate_object,
} from "./generated/object-set-watcher/objectsetwatcher/api/ObjectUpdate.js";
export type { RefreshObjectSet } from "./generated/object-set-watcher/objectsetwatcher/api/RefreshObjectSet.js";
export type { StreamMessage_objectSetChanged } from "./generated/object-set-watcher/objectsetwatcher/api/StreamMessage.js";
export type { StreamMessage_subscribeResponses } from "./generated/object-set-watcher/objectsetwatcher/api/StreamMessage.js";

export { batchEnableWatcher } from "./generated/object-set-watcher/objectsetwatcher/api/ObjectSetWatchService.js";
14 changes: 14 additions & 0 deletions packages/client.unstable.osw/tsconfig.cjs.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"module": "CommonJS",
"moduleResolution": "Node",
"target": "ES6",
"rootDir": "src",
"outDir": "build/cjs"
},
"include": [
"./src/**/*"
],
"references": []
}
11 changes: 11 additions & 0 deletions packages/client.unstable.osw/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"extends": "../../monorepo/tsconfig/tsconfig.base.json",
"compilerOptions": {
"rootDir": "src",
"outDir": "build/esm"
},
"include": [
"./src/**/*"
],
"references": []
}
23 changes: 23 additions & 0 deletions packages/client.unstable.osw/tsup.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/*
* Copyright 2023 Palantir Technologies, Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

import { defineConfig } from "tsup";

export default defineConfig(async (options) =>
(await import("mytsup")).default(options, {
esmOnly: true,
})
);
49 changes: 49 additions & 0 deletions packages/client.unstable/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{
"name": "@osdk/client.unstable",
"version": "0.0.0",
"license": "Apache-2.0",
"repository": {
"type": "git",
"url": "https://github.com/palantir/osdk-ts.git"
},
"exports": {
".": {
"browser": "./build/browser/index.js",
"import": "./build/esm/index.js"
},
"./*": {
"browser": "./build/browser/public/*.js",
"import": "./build/esm/public/*.js"
}
},
"scripts": {
"check-attw": "../../scripts/build_common/check-attw.sh esm",
"clean": "rm -rf lib dist types build tsconfig.tsbuildinfo",
"fix-lint": "eslint . --fix && dprint fmt --config $(find-up dprint.json)",
"lint": "eslint . && dprint check --config $(find-up dprint.json)",
"transpile": "tsup",
"typecheck": "../../scripts/build_common/typecheck.sh esm"
},
"dependencies": {
"conjure-lite": "^0.4.4"
},
"devDependencies": {
"typescript": "^5.4.5"
},
"publishConfig": {
"access": "public"
},
"files": [
"build/cjs",
"build/esm",
"build/browser",
"CHANGELOG.md",
"package.json",
"templates",
"*.d.ts"
],
"main": "./build/cjs/index.cjs",
"module": "./build/esm/index.js",
"types": "./build/esm/index.d.ts",
"type": "module"
}
Loading

0 comments on commit 392b70d

Please sign in to comment.