[fix] publish (#1222)
- fixes an invalid usage of process.env in the editor package - fixes some bublic paths in the publishing infra code
This commit is contained in:
parent
f44f6e2c9f
commit
b63e871420
5 changed files with 9 additions and 6 deletions
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/env sh
|
#!/usr/bin/env sh
|
||||||
. "$(dirname -- "$0")/_/husky.sh"
|
. "$(dirname -- "$0")/_/husky.sh"
|
||||||
|
|
||||||
yarn lazy run build-api
|
npx lazy run build-api
|
||||||
git add packages/*/api-report.md
|
git add packages/*/api-report.md
|
||||||
yarn lint-staged
|
npx lint-staged
|
||||||
|
|
|
@ -603,6 +603,7 @@ export const debugFlags: {
|
||||||
peopleMenu: Atom<boolean, unknown>;
|
peopleMenu: Atom<boolean, unknown>;
|
||||||
logMessages: Atom<never[], unknown>;
|
logMessages: Atom<never[], unknown>;
|
||||||
resetConnectionEveryPing: Atom<boolean, unknown>;
|
resetConnectionEveryPing: Atom<boolean, unknown>;
|
||||||
|
newLiveCollaborators: Atom<boolean, unknown>;
|
||||||
};
|
};
|
||||||
|
|
||||||
// @internal (undocumented)
|
// @internal (undocumented)
|
||||||
|
|
|
@ -135,7 +135,7 @@ export const Canvas = track(function Canvas({
|
||||||
<HintedShapeIndicator />
|
<HintedShapeIndicator />
|
||||||
<SnapLinesWrapper />
|
<SnapLinesWrapper />
|
||||||
<HandlesWrapper />
|
<HandlesWrapper />
|
||||||
{process.env.NEXT_PUBLIC_TLDRAW_NEW_COLLABORATORS ? (
|
{debugFlags.newLiveCollaborators.value ? (
|
||||||
<LiveCollaboratorsNext />
|
<LiveCollaboratorsNext />
|
||||||
) : (
|
) : (
|
||||||
<LiveCollaborators />
|
<LiveCollaborators />
|
||||||
|
|
|
@ -23,6 +23,7 @@ export const debugFlags = {
|
||||||
peopleMenu: createDebugValue('tldrawPeopleMenu', false),
|
peopleMenu: createDebugValue('tldrawPeopleMenu', false),
|
||||||
logMessages: createDebugValue('tldrawUiLog', []),
|
logMessages: createDebugValue('tldrawUiLog', []),
|
||||||
resetConnectionEveryPing: createDebugValue('tldrawResetConnectionEveryPing', false),
|
resetConnectionEveryPing: createDebugValue('tldrawResetConnectionEveryPing', false),
|
||||||
|
newLiveCollaborators: createDebugValue('tldrawNewLiveCollaborators', false),
|
||||||
}
|
}
|
||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
import { execSync } from 'child_process'
|
import { execSync } from 'child_process'
|
||||||
import { fetch } from 'cross-fetch'
|
import { fetch } from 'cross-fetch'
|
||||||
import { existsSync, readdirSync, readFileSync, writeFileSync } from 'fs'
|
import { existsSync, readdirSync, readFileSync, writeFileSync } from 'fs'
|
||||||
import path from 'path'
|
import path, { join } from 'path'
|
||||||
import { compare, parse } from 'semver'
|
import { compare, parse } from 'semver'
|
||||||
|
import { BUBLIC_ROOT } from './file'
|
||||||
|
|
||||||
export type PackageDetails = {
|
export type PackageDetails = {
|
||||||
name: string
|
name: string
|
||||||
|
@ -31,9 +32,9 @@ function getPackageDetails(dir: string): PackageDetails | null {
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getAllPackageDetails(): Record<string, PackageDetails> {
|
export function getAllPackageDetails(): Record<string, PackageDetails> {
|
||||||
const dirs = readdirSync('bublic/packages')
|
const dirs = readdirSync(join(BUBLIC_ROOT, 'packages'))
|
||||||
const results = dirs
|
const results = dirs
|
||||||
.map((dir) => getPackageDetails(path.join('bublic/packages', dir)))
|
.map((dir) => getPackageDetails(path.join(BUBLIC_ROOT, 'packages', dir)))
|
||||||
.filter((x): x is PackageDetails => Boolean(x))
|
.filter((x): x is PackageDetails => Boolean(x))
|
||||||
|
|
||||||
return Object.fromEntries(results.map((result) => [result.name, result]))
|
return Object.fromEntries(results.map((result) => [result.name, result]))
|
||||||
|
|
Loading…
Reference in a new issue