From 08232a54bf7d8e8348affda30488c9bdf6d3b64c Mon Sep 17 00:00:00 2001 From: Hunter Miller Date: Wed, 10 Nov 2021 17:54:31 -0600 Subject: [PATCH] npm: removing intermediate ts files from pkg, fixing more bad references --- pkg/grid/package.json | 4 +-- pkg/grid/src/components/AppInfo.tsx | 29 +++++++++---------- pkg/grid/src/components/DocketImage.tsx | 2 +- pkg/grid/src/components/VatMeta.tsx | 2 +- pkg/grid/src/nav/SystemMenu.tsx | 2 +- .../nav/notifications/SystemNotification.tsx | 2 +- .../src/nav/preferences/NotificationPrefs.tsx | 2 +- pkg/grid/src/state/hark.ts | 2 +- pkg/grid/src/state/kiln.ts | 12 ++++++-- pkg/grid/src/state/settings.ts | 2 +- pkg/grid/src/state/util.ts | 2 +- pkg/interface/package.json | 4 +-- .../src/views/apps/notifications/NewBox.tsx | 2 +- pkg/npm/api/.gitignore | 1 + pkg/npm/api/package.json | 2 +- pkg/npm/api/tsconfig.json | 9 ++++-- pkg/npm/http-api/.gitignore | 3 +- pkg/npm/http-api/package.json | 2 +- pkg/npm/http-api/tsconfig.json | 4 +-- 19 files changed, 51 insertions(+), 37 deletions(-) create mode 100644 pkg/npm/api/.gitignore diff --git a/pkg/grid/package.json b/pkg/grid/package.json index 49011a190..c31e7ccda 100644 --- a/pkg/grid/package.json +++ b/pkg/grid/package.json @@ -22,8 +22,8 @@ "@radix-ui/react-toggle": "^0.0.10", "@tlon/sigil-js": "^1.4.4", "@types/lodash": "^4.14.172", - "@urbit/api": "^2.0.0", - "@urbit/http-api": "^2.0.0", + "@urbit/api": "2.1.0-dev.4", + "@urbit/http-api": "2.1.0-dev.4", "big-integer": "^1.6.48", "classnames": "^2.3.1", "clipboard-copy": "^4.0.1", diff --git a/pkg/grid/src/components/AppInfo.tsx b/pkg/grid/src/components/AppInfo.tsx index eb81100ea..a23597602 100644 --- a/pkg/grid/src/components/AppInfo.tsx +++ b/pkg/grid/src/components/AppInfo.tsx @@ -1,8 +1,7 @@ -import { chadIsRunning, Treaty } from '@urbit/api'; +import { chadIsRunning, Treaty, Vat } from '@urbit/api'; import clipboardCopy from 'clipboard-copy'; import React, { FC, useCallback, useState } from 'react'; import cn from 'classnames'; -import { Vat } from '@urbit/api/hood'; import { Button, PillButton } from './Button'; import { Dialog, DialogClose, DialogContent, DialogTrigger } from './Dialog'; import { DocketHeader } from './DocketHeader'; @@ -137,19 +136,19 @@ export const AppInfo: FC = ({ docket, vat, className }) => {
- {vat ? ( - <> -
- - - ) : null} - {!treaty ? null : ( - <> -
- - - )} -
+ {vat ? ( + <> +
+ + + ) : null} + {!treaty ? null : ( + <> +
+ + + )} + ); }; diff --git a/pkg/grid/src/components/DocketImage.tsx b/pkg/grid/src/components/DocketImage.tsx index 01267a7b5..682123426 100644 --- a/pkg/grid/src/components/DocketImage.tsx +++ b/pkg/grid/src/components/DocketImage.tsx @@ -1,5 +1,5 @@ import React, { useState } from 'react'; -import { Docket } from '@urbit/api/docket'; +import { Docket } from '@urbit/api'; import cn from 'classnames'; import { useTileColor } from '../tiles/useTileColor'; diff --git a/pkg/grid/src/components/VatMeta.tsx b/pkg/grid/src/components/VatMeta.tsx index ceb3a575a..f55351e41 100644 --- a/pkg/grid/src/components/VatMeta.tsx +++ b/pkg/grid/src/components/VatMeta.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import { Vat } from '@urbit/api/hood'; +import { Vat } from '@urbit/api'; import { Attribute } from './Attribute'; diff --git a/pkg/grid/src/nav/SystemMenu.tsx b/pkg/grid/src/nav/SystemMenu.tsx index d58c9ffb5..44f8379ca 100644 --- a/pkg/grid/src/nav/SystemMenu.tsx +++ b/pkg/grid/src/nav/SystemMenu.tsx @@ -3,7 +3,7 @@ import classNames from 'classnames'; import clipboardCopy from 'clipboard-copy'; import React, { HTMLAttributes, useCallback, useState } from 'react'; import { Link, Route, useHistory } from 'react-router-dom'; -import { Vat } from '@urbit/api/hood'; +import { Vat } from '@urbit/api'; import { Adjust } from '../components/icons/Adjust'; import { useVat } from '../state/kiln'; import { disableDefault, handleDropdownLink } from '../state/util'; diff --git a/pkg/grid/src/nav/notifications/SystemNotification.tsx b/pkg/grid/src/nav/notifications/SystemNotification.tsx index accb6a95c..5bc951849 100644 --- a/pkg/grid/src/nav/notifications/SystemNotification.tsx +++ b/pkg/grid/src/nav/notifications/SystemNotification.tsx @@ -1,6 +1,6 @@ import { pick } from 'lodash'; import React, { useCallback } from 'react'; -import { kilnBump } from '@urbit/api/hood'; +import { kilnBump } from '@urbit/api'; import { AppList } from '../../components/AppList'; import { Button } from '../../components/Button'; import { Dialog, DialogClose, DialogContent, DialogTrigger } from '../../components/Dialog'; diff --git a/pkg/grid/src/nav/preferences/NotificationPrefs.tsx b/pkg/grid/src/nav/preferences/NotificationPrefs.tsx index f7ca7b702..aca3bfccc 100644 --- a/pkg/grid/src/nav/preferences/NotificationPrefs.tsx +++ b/pkg/grid/src/nav/preferences/NotificationPrefs.tsx @@ -1,4 +1,4 @@ -import { setMentions } from '@urbit/api/dist'; +import { setMentions } from '@urbit/api'; import React from 'react'; import { Setting } from '../../components/Setting'; import { pokeOptimisticallyN } from '../../state/base'; diff --git a/pkg/grid/src/state/hark.ts b/pkg/grid/src/state/hark.ts index 9bea900fa..70bd25192 100644 --- a/pkg/grid/src/state/hark.ts +++ b/pkg/grid/src/state/hark.ts @@ -1,5 +1,6 @@ /* eslint-disable no-param-reassign */ import { + BigIntOrderedMap, makePatDa, decToUd, unixToDa, @@ -13,7 +14,6 @@ import { NotificationGraphConfig, archiveAll } from '@urbit/api'; -import BigIntOrderedMap from '@urbit/api/lib/BigIntOrderedMap'; /* eslint-disable-next-line camelcase */ import { unstable_batchedUpdates } from 'react-dom'; import produce from 'immer'; diff --git a/pkg/grid/src/state/kiln.ts b/pkg/grid/src/state/kiln.ts index 40222b6ed..06589f759 100644 --- a/pkg/grid/src/state/kiln.ts +++ b/pkg/grid/src/state/kiln.ts @@ -1,5 +1,13 @@ -import { getVats, Vats, scryLag, getBlockers, Vat, kilnInstall } from '@urbit/api'; -import { kilnPause, kilnResume } from '@urbit/api/hood'; +import { + getVats, + Vats, + scryLag, + getBlockers, + Vat, + kilnInstall, + kilnPause, + kilnResume +} from '@urbit/api'; import create from 'zustand'; import produce from 'immer'; import { useCallback } from 'react'; diff --git a/pkg/grid/src/state/settings.ts b/pkg/grid/src/state/settings.ts index 2ca2388ae..e1d56b283 100644 --- a/pkg/grid/src/state/settings.ts +++ b/pkg/grid/src/state/settings.ts @@ -5,7 +5,7 @@ import { putEntry as doPutEntry, getDeskSettings, DeskData -} from '@urbit/api/settings'; +} from '@urbit/api'; import _ from 'lodash'; import { BaseState, diff --git a/pkg/grid/src/state/util.ts b/pkg/grid/src/state/util.ts index a6375bbf0..9b57981e5 100644 --- a/pkg/grid/src/state/util.ts +++ b/pkg/grid/src/state/util.ts @@ -1,4 +1,4 @@ -import { Docket, DocketHref, Treaty } from '@urbit/api/docket'; +import { Docket, DocketHref, Treaty } from '@urbit/api'; import { hsla, parseToHsla } from 'color2k'; import _ from 'lodash'; diff --git a/pkg/interface/package.json b/pkg/interface/package.json index 457ffb2f7..ea6b171fd 100644 --- a/pkg/interface/package.json +++ b/pkg/interface/package.json @@ -15,8 +15,8 @@ "@tlon/indigo-light": "^1.0.7", "@tlon/indigo-react": "^1.2.23", "@tlon/sigil-js": "^1.4.3", - "@urbit/api": "2.1.0-dev.2", - "@urbit/http-api": "2.1.0-dev.2", + "@urbit/api": "2.1.0-dev.4", + "@urbit/http-api": "2.1.0-dev.4", "any-ascii": "^0.1.7", "aws-sdk": "^2.830.0", "big-integer": "^1.6.48", diff --git a/pkg/interface/src/views/apps/notifications/NewBox.tsx b/pkg/interface/src/views/apps/notifications/NewBox.tsx index 56fb99ea4..e0c953a96 100644 --- a/pkg/interface/src/views/apps/notifications/NewBox.tsx +++ b/pkg/interface/src/views/apps/notifications/NewBox.tsx @@ -1,7 +1,7 @@ import { Box, Center, Col, Text } from '@tlon/indigo-react'; import React from 'react'; import useHarkState, { HarkState } from '~/logic/state/hark'; -import { harkBinToId, HarkLid, Timebox } from '../../../../../npm/api/dist'; +import { harkBinToId, HarkLid, Timebox } from '@urbit/api'; import { Notification } from './notification'; const unseenLid = { unseen: null }; diff --git a/pkg/npm/api/.gitignore b/pkg/npm/api/.gitignore new file mode 100644 index 000000000..1c2f433de --- /dev/null +++ b/pkg/npm/api/.gitignore @@ -0,0 +1 @@ +tmp \ No newline at end of file diff --git a/pkg/npm/api/package.json b/pkg/npm/api/package.json index b6b376123..c1f5d2a88 100644 --- a/pkg/npm/api/package.json +++ b/pkg/npm/api/package.json @@ -1,6 +1,6 @@ { "name": "@urbit/api", - "version": "2.1.0", + "version": "2.1.0-dev.4", "description": "A library that provides bindings and types for Urbit's various userspace desks", "repository": { "type": "git", diff --git a/pkg/npm/api/tsconfig.json b/pkg/npm/api/tsconfig.json index dced7091b..73498e572 100644 --- a/pkg/npm/api/tsconfig.json +++ b/pkg/npm/api/tsconfig.json @@ -1,7 +1,7 @@ { "compilerOptions": { "baseUrl": ".", - "outDir": "./dist", + "outDir": "./tmp", "module": "ESNext", "noImplicitAny": true, "target": "ESNext", @@ -14,6 +14,11 @@ "strict": false, "noErrorTruncation": true }, - "exclude": ["node_modules", "./dist/**/*", "@types", "rollup.config.ts"], + "exclude": [ + "node_modules", + "./dist/**/*", + "./tmp/**/*", + "rollup.config.ts" + ], "include": ["./*.ts"] } diff --git a/pkg/npm/http-api/.gitignore b/pkg/npm/http-api/.gitignore index 0498e17dc..81d5c4f80 100644 --- a/pkg/npm/http-api/.gitignore +++ b/pkg/npm/http-api/.gitignore @@ -1,3 +1,4 @@ dist node_modules -coverage \ No newline at end of file +coverage +tmp \ No newline at end of file diff --git a/pkg/npm/http-api/package.json b/pkg/npm/http-api/package.json index 8b5f49767..e5cbe1145 100644 --- a/pkg/npm/http-api/package.json +++ b/pkg/npm/http-api/package.json @@ -1,6 +1,6 @@ { "name": "@urbit/http-api", - "version": "2.1.0", + "version": "2.1.0-dev.4", "license": "MIT", "description": "Library to interact with an Urbit ship over HTTP", "repository": { diff --git a/pkg/npm/http-api/tsconfig.json b/pkg/npm/http-api/tsconfig.json index eeca7930f..b6e90150c 100644 --- a/pkg/npm/http-api/tsconfig.json +++ b/pkg/npm/http-api/tsconfig.json @@ -1,8 +1,8 @@ { "include": ["src/**/*.ts"], - "exclude": ["node_modules", "dist", "@types"], + "exclude": ["node_modules", "dist", "tmp"], "compilerOptions": { - "outDir": "./dist", + "outDir": "./tmp", "module": "ESNext", "target": "ESNext", "lib": ["ESNext", "DOM"],