Skip to content
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion packages/ai-bot/lib/debug.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { setTitle } from './set-title.ts';
import type OpenAI from 'openai';

import { errorReporter } from './sentry.ts';
import type { MatrixEvent as DiscreteMatrixEvent } from 'https://cardstack.com/base/matrix-event';
import type { MatrixEvent as DiscreteMatrixEvent } from '@cardstack/base/matrix-event';
import {
constructHistory,
getPromptParts,
Expand Down
2 changes: 1 addition & 1 deletion packages/ai-bot/lib/matrix/response-publisher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
APP_BOXEL_HAS_CONTINUATION_CONTENT_KEY,
} from '@cardstack/runtime-common';
import { sendErrorEvent, sendMessageEvent } from '@cardstack/runtime-common/ai';
import type { CardMessageContent } from 'https://cardstack.com/base/matrix-event';
import type { CardMessageContent } from '@cardstack/base/matrix-event';
import ResponseEventData from './response-event-data.ts';
import { logger } from '@cardstack/runtime-common';
import type { MatrixClient } from 'matrix-js-sdk';
Expand Down
2 changes: 1 addition & 1 deletion packages/ai-bot/lib/read-realm-file.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { logger, SupportedMimeType } from '@cardstack/runtime-common';
import { ensureTrailingSlash } from '@cardstack/runtime-common/paths';
import { DelegatedUserRealmSessionError } from '@cardstack/runtime-common/user-delegated-realm-server-session';
import type { Tool } from 'https://cardstack.com/base/matrix-event';
import type { Tool } from '@cardstack/base/matrix-event';
import type {
ChatCompletion,
ChatCompletionMessageToolCall,
Expand Down
2 changes: 1 addition & 1 deletion packages/ai-bot/lib/set-title.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import type {
EncodedCommandRequest,
CodePatchResultContent,
CardMessageContent,
} from 'https://cardstack.com/base/matrix-event';
} from '@cardstack/base/matrix-event';
import type { ChatCompletionMessageParam } from 'openai/resources';
import {
type OpenAIPromptMessage,
Expand Down
2 changes: 1 addition & 1 deletion packages/ai-bot/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ import {
setTitle,
roomTitleAlreadySet,
} from './lib/set-title.ts';
import type { MatrixEvent as DiscreteMatrixEvent } from 'https://cardstack.com/base/matrix-event';
import type { MatrixEvent as DiscreteMatrixEvent } from '@cardstack/base/matrix-event';
import * as Sentry from '@sentry/node';

import { spendUsageCost } from '@cardstack/billing/ai-billing';
Expand Down
2 changes: 1 addition & 1 deletion packages/ai-bot/tests/chat-titling-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
setTitle,
shouldSetRoomTitle,
} from '../lib/set-title.ts';
import type { MatrixEvent as DiscreteMatrixEvent } from 'https://cardstack.com/base/matrix-event';
import type { MatrixEvent as DiscreteMatrixEvent } from '@cardstack/base/matrix-event';
import {
APP_BOXEL_CODE_PATCH_RESULT_EVENT_TYPE,
APP_BOXEL_CODE_PATCH_RESULT_MSGTYPE,
Expand Down
2 changes: 1 addition & 1 deletion packages/ai-bot/tests/debug-test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import QUnit from 'qunit';
const { module, test } = QUnit;
import { APP_BOXEL_MESSAGE_MSGTYPE } from '@cardstack/runtime-common';
import type { MatrixEvent as DiscreteMatrixEvent } from 'https://cardstack.com/base/matrix-event';
import type { MatrixEvent as DiscreteMatrixEvent } from '@cardstack/base/matrix-event';
import { handleDebugCommands } from '../lib/debug.ts';
import { FakeMatrixClient } from './helpers/fake-matrix-client.ts';

Expand Down
2 changes: 1 addition & 1 deletion packages/ai-bot/tests/history-construction-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { EventStatus, type IRoomEvent } from 'matrix-js-sdk';
import type {
CardMessageEvent,
MatrixEvent as DiscreteMatrixEvent,
} from 'https://cardstack.com/base/matrix-event';
} from '@cardstack/base/matrix-event';
import { FakeMatrixClient } from './helpers/fake-matrix-client.ts';

module('constructHistory', (hooks) => {
Expand Down
2 changes: 1 addition & 1 deletion packages/ai-bot/tests/matrix-util-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import type { Method } from 'matrix-js-sdk';
import type {
CardMessageEvent,
MatrixEvent as DiscreteMatrixEvent,
} from 'https://cardstack.com/base/matrix-event';
} from '@cardstack/base/matrix-event';
import { APP_BOXEL_MESSAGE_MSGTYPE } from '@cardstack/runtime-common';
import { getRoomEvents, sendErrorEvent } from '@cardstack/runtime-common/ai';
import { OpenAIError } from 'openai/error';
Expand Down
4 changes: 2 additions & 2 deletions packages/ai-bot/tests/prompt-construction-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ import type {
MatrixEvent as DiscreteMatrixEvent,
Tool,
CardMessageContent,
} from 'https://cardstack.com/base/matrix-event';
} from '@cardstack/base/matrix-event';
import { EventStatus } from 'matrix-js-sdk';
import type { CardDef } from 'https://cardstack.com/base/card-api';
import type { CardDef } from '@cardstack/base/card-api';
import fsExtra from 'fs-extra';
const { readFileSync } = fsExtra;
import * as path from 'path';
Expand Down
6 changes: 6 additions & 0 deletions packages/ai-bot/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@
"skipLibCheck": true,
"strict": true,
"paths": {
"@cardstack/base/*": [
"../base/*.gts",
"../base/*.ts",
"../base/*.d.ts",
"../base/*"
],
"https://cardstack.com/base/*": [
"../base/*.gts",
"../base/*.ts",
Expand Down
4 changes: 2 additions & 2 deletions packages/base/color.gts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Component } from 'https://cardstack.com/base/card-api';
import StringField from 'https://cardstack.com/base/string';
import { Component } from '@cardstack/base/card-api';
import StringField from '@cardstack/base/string';
import { Swatch } from '@cardstack/boxel-ui/components';
import { markdownEscape } from '@cardstack/boxel-ui/helpers';
import PaletteIcon from '@cardstack/boxel-icons/palette';
Expand Down
2 changes: 1 addition & 1 deletion packages/base/default-templates/head.gts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import GlimmerComponent from '@glimmer/component';
import type { BaseDef, CardDef } from '../card-api';
import type BrandGuide from 'https://cardstack.com/base/brand-guide';
import type BrandGuide from '@cardstack/base/brand-guide';

export default class DefaultHeadTemplate extends GlimmerComponent<{
Args: {
Expand Down
2 changes: 1 addition & 1 deletion packages/base/rich-markdown.gts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ import { CardContextConsumer } from './field-component';
*
* Usage:
* ```
* import RichMarkdownField from 'https://cardstack.com/base/rich-markdown';
* import RichMarkdownField from '@cardstack/base/rich-markdown';
*
* class MyCard extends CardDef {
* @field body = contains(RichMarkdownField);
Expand Down
6 changes: 6 additions & 0 deletions packages/billing/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@
"skipLibCheck": true,
"strict": true,
"paths": {
"@cardstack/base/*": [
"../base/*.gts",
"../base/*.ts",
"../base/*.d.ts",
"../base/*"
],
"https://cardstack.com/base/*": [
"../base/*.gts",
"../base/*.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/bot-runner/lib/command-runner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
type RunCommandResponse,
} from '@cardstack/runtime-common';
import { enqueueRunCommandJob } from '@cardstack/runtime-common/jobs/run-command';
import type { BotTriggerContent as BotTriggerEventContent } from 'https://cardstack.com/base/matrix-event';
import type { BotTriggerContent as BotTriggerEventContent } from '@cardstack/base/matrix-event';

const log = logger('bot-runner');

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {
toBranchName,
type RunCommandResponse,
} from '@cardstack/runtime-common';
import type { BotTriggerContent } from 'https://cardstack.com/base/matrix-event';
import type { BotTriggerContent } from '@cardstack/base/matrix-event';
import { createHash } from 'node:crypto';
import type { GitHubClient, OpenPullRequestResult } from '../github.ts';

Expand Down
6 changes: 6 additions & 0 deletions packages/bot-runner/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@
"skipLibCheck": true,
"strict": true,
"paths": {
"@cardstack/base/*": [
"../base/*.gts",
"../base/*.ts",
"../base/*.d.ts",
"../base/*"
],
"https://cardstack.com/base/*": [
"../base/*.gts",
"../base/*.ts",
Expand Down
1 change: 1 addition & 0 deletions packages/boxel-cli/src/commands/parse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -560,6 +560,7 @@ async function runGlintCheck(
// resolvable `@cardstack/local-types` package in node_modules.
types: ['qunit-dom'],
paths: {
'@cardstack/base/*': [`${BASE_PKG_PATH}/*`],
'https://cardstack.com/base/*': [`${BASE_PKG_PATH}/*`],
'@cardstack/host/tests/*': [`${HOST_TESTS_PATH}/*`],
'@cardstack/host/*': [`${HOST_APP_PATH}/*`],
Expand Down
6 changes: 3 additions & 3 deletions packages/boxel-cli/tests/commands/ingest-card-graph.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ const GADGET_MODULE_ABS = `${ROOT}widgets/gadget/gadget`;

const REALM_FILES: Record<string, string> = {
'widgets/gadget/gadget.gts': `
import StringField from 'https://cardstack.com/base/string';
import { CardDef, field, contains } from 'https://cardstack.com/base/card-api';
import StringField from '@cardstack/base/string';
import { CardDef, field, contains } from '@cardstack/base/card-api';
import { formatLabel } from '../shared/format-utils';
import { WidgetPart } from './parts/widget-part';
import type { GadgetTuning } from '../shared/tuning-types';
Expand Down Expand Up @@ -79,7 +79,7 @@ export interface GadgetTuning { level: number; }
}),
// --- everything below must NOT be ingested ---
'standalone/clock.gts': `
import { CardDef } from 'https://cardstack.com/base/card-api';
import { CardDef } from '@cardstack/base/card-api';
export class Clock extends CardDef {}
`,
'Clock/c1.json': JSON.stringify({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ const ROOT = 'https://realms.example.test/garage/';

const REALM_FILES: Record<string, string> = {
'garage.gts': `
import { CardDef, field, linksToMany } from 'https://cardstack.com/base/card-api';
import { CardDef, field, linksToMany } from '@cardstack/base/card-api';
import { Tool } from './tool';
export class Garage extends CardDef {
@field tools = linksToMany(() => Tool);
}
`,
'tool.gts': `
import StringField from 'https://cardstack.com/base/string';
import { CardDef, field, contains } from 'https://cardstack.com/base/card-api';
import StringField from '@cardstack/base/string';
import { CardDef, field, contains } from '@cardstack/base/card-api';
export class Tool extends CardDef {
@field name = contains(StringField);
}
Expand Down
16 changes: 12 additions & 4 deletions packages/boxel-cli/tests/commands/ingest-card.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,21 +32,21 @@ describe('ingest-card helpers', () => {
describe('extractImportSpecifiers', () => {
it('captures value, type, namespace, re-export, and side-effect imports', () => {
let src = `
import { contains, field } from 'https://cardstack.com/base/card-api';
import { contains, field } from '@cardstack/base/card-api';
import type { MortgageCalculator } from '../mortgage-calculator';
import * as utils from './components/utils';
export { Foo } from './foo';
import './side-effect';
import StringField from 'https://cardstack.com/base/string';
import StringField from '@cardstack/base/string';
`;
expect(new Set(extractImportSpecifiers(src))).toEqual(
new Set([
'https://cardstack.com/base/card-api',
'@cardstack/base/card-api',
'../mortgage-calculator',
'./components/utils',
'./foo',
'./side-effect',
'https://cardstack.com/base/string',
'@cardstack/base/string',
]),
);
});
Expand Down Expand Up @@ -108,6 +108,14 @@ describe('ingest-card helpers', () => {
fileSet,
),
).toBeNull();
expect(
resolveSameRealmFile(
'@cardstack/base/string',
fromAbs,
realmRoot,
fileSet,
),
).toBeNull();
expect(
resolveSameRealmFile('@glimmer/component', fromAbs, realmRoot, fileSet),
).toBeNull();
Expand Down
4 changes: 2 additions & 2 deletions packages/boxel-cli/tests/commands/parse-glimmer-types.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ import {
Component as CardComponent,
field,
contains,
} from 'https://cardstack.com/base/card-api';
import NumberField from 'https://cardstack.com/base/number';
} from '@cardstack/base/card-api';
import NumberField from '@cardstack/base/number';

class CounterWidget extends Component<{ Args: { start?: number } }> {
@tracked count = this.args.start ?? 0;
Expand Down
4 changes: 2 additions & 2 deletions packages/boxel-cli/tests/integration/file-read.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ const SOURCE_GTS = `import {
CardDef,
field,
contains,
} from 'https://cardstack.com/base/card-api';
import StringField from 'https://cardstack.com/base/string';
} from '@cardstack/base/card-api';
import StringField from '@cardstack/base/string';

export class FileReadCheck extends CardDef {
static displayName = 'File Read Check';
Expand Down
8 changes: 4 additions & 4 deletions packages/boxel-cli/tests/integration/file-touch.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ const SOURCE_GTS = `import {
CardDef,
field,
contains,
} from 'https://cardstack.com/base/card-api';
import StringField from 'https://cardstack.com/base/string';
} from '@cardstack/base/card-api';
import StringField from '@cardstack/base/string';

export class TouchCheck extends CardDef {
static displayName = 'Touch Check';
Expand All @@ -36,8 +36,8 @@ const SOURCE_GTS_WITH_MARKER_IN_STRING = `import {
CardDef,
field,
contains,
} from 'https://cardstack.com/base/card-api';
import StringField from 'https://cardstack.com/base/string';
} from '@cardstack/base/card-api';
import StringField from '@cardstack/base/string';

export class MarkerInString extends CardDef {
static displayName = 'Marker In String';
Expand Down
4 changes: 2 additions & 2 deletions packages/boxel-cli/tests/integration/read-transpiled.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ const SOURCE_GTS = `import {
CardDef,
field,
contains,
} from 'https://cardstack.com/base/card-api';
import StringField from 'https://cardstack.com/base/string';
} from '@cardstack/base/card-api';
import StringField from '@cardstack/base/string';

export class TranspiledCheck extends CardDef {
static displayName = 'Transpiled Check';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ const testRealmURL = new URL('http://127.0.0.1:4445/test/');

const REALM_FILES: Record<string, string> = {
'widgets/gadget/gadget.gts': `
import StringField from 'https://cardstack.com/base/string';
import { CardDef, field, contains } from 'https://cardstack.com/base/card-api';
import StringField from '@cardstack/base/string';
import { CardDef, field, contains } from '@cardstack/base/card-api';
import { formatLabel } from '../shared/format-utils';
import { WidgetPart } from './parts/widget-part';

Expand Down Expand Up @@ -86,7 +86,7 @@ export function formatLabel(value: string) { return value.toUpperCase(); }
}),
// --- everything below must NOT be ingested ---
'standalone/clock.gts': `
import { CardDef } from 'https://cardstack.com/base/card-api';
import { CardDef } from '@cardstack/base/card-api';
export class Clock extends CardDef {
static displayName = 'Clock';
}
Expand Down Expand Up @@ -233,7 +233,7 @@ describe('realm ingest-card (integration)', () => {
path.join(localDir, 'widgets/gadget/gadget.gts'),
'utf8',
);
expect(gadget).toContain(`from 'https://cardstack.com/base/card-api'`);
expect(gadget).toContain(`from '@cardstack/base/card-api'`);
expect(fs.existsSync(path.join(localDir, 'base'))).toBe(false);
expect(fs.existsSync(path.join(localDir, 'card-api.gts'))).toBe(false);
});
Expand Down
3 changes: 3 additions & 0 deletions packages/boxel-ui/addon/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@
"target": "es2020",
"traceResolution": false,
"paths": {
"@cardstack/base/*": [
"../../base/*"
],
"https://cardstack.com/base/*": [
"../../base/*"
],
Expand Down
6 changes: 6 additions & 0 deletions packages/catalog/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@
"skipLibCheck": true,
"paths": {
"lodash": ["node_modules/@types/lodash-es"],
"@cardstack/base/*": [
"../base/*.gts",
"../base/*.ts",
"../base/*.d.ts",
"../base/*"
],
"https://cardstack.com/base/*": [
"../base/*.gts",
"../base/*.ts",
Expand Down
4 changes: 2 additions & 2 deletions packages/experiments-realm/adorn-overflow-demo.gts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import {
contains,
field,
linksToMany,
} from 'https://cardstack.com/base/card-api';
import StringField from 'https://cardstack.com/base/string';
} from '@cardstack/base/card-api';
import StringField from '@cardstack/base/string';

export class ProjectInitiativeTask extends CardDef {
static displayName = 'Cross-Functional Strategic Initiative Planning Task';
Expand Down
4 changes: 2 additions & 2 deletions packages/experiments-realm/animated.gts
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ import { fadeOut } from 'ember-animated/motions/opacity';
import fade from 'ember-animated/transitions/fade';
import { toLeft, toRight } from 'ember-animated/transitions/move-over';

import { CardDef } from 'https://cardstack.com/base/card-api';
import { Component } from 'https://cardstack.com/base/card-api';
import { CardDef } from '@cardstack/base/card-api';
import { Component } from '@cardstack/base/card-api';

import { BoxelContainer, IconButton } from '@cardstack/boxel-ui/components';
import { gte, lte } from '@cardstack/boxel-ui/helpers';
Expand Down
Loading
Loading