Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
bd86739
Merge remote-tracking branch 'origin/main' into maanil/fe-2196-d2-build
MaanilVerma Sep 16, 2026
7ad2414
build(ingest-types): compile to dist for publish
MaanilVerma Sep 16, 2026
93273f1
build(account): compile the non-Vue entries to dist for publish
MaanilVerma Sep 16, 2026
5fa9127
build(account): use explicit .js specifiers so the built entries reso…
MaanilVerma Sep 16, 2026
a195220
build(account): cover the Vue subpath and publish from dist
MaanilVerma Sep 16, 2026
6e339f7
build(ingest-types): emit .js import extensions so the declarations r…
MaanilVerma Sep 16, 2026
c0eb4c1
ci: pack check for account and ingest-types
MaanilVerma Sep 16, 2026
6082d36
test(account): make the SFC type proof discriminating
MaanilVerma Sep 16, 2026
5da2078
chore(ingest-types): keep the package private until the publish go
MaanilVerma Sep 16, 2026
a1ef967
build(account): move the Vue source copy out of the package script
MaanilVerma Sep 16, 2026
65756db
build(account,ingest-types): build on prepack
MaanilVerma Sep 16, 2026
4c7e091
chore(account,ingest-types): ship an MIT LICENSE per package
MaanilVerma Sep 16, 2026
ae9273f
test(account): fail the type proof on any-typed declarations
MaanilVerma Sep 16, 2026
a22ca6d
Merge branch 'maanil/fe-2196-d2-consumability' into maanil/fe-2196-d2…
MaanilVerma Sep 16, 2026
e9455bd
Merge branch 'maanil/fe-2196-d2-consumability' into maanil/fe-2196-d2…
MaanilVerma Sep 16, 2026
5087971
Merge branch 'maanil/fe-2196-d2-consumability' into maanil/fe-2196-d2…
MaanilVerma Sep 16, 2026
5be024d
Merge branch 'maanil/fe-2196-d2-consumability' into maanil/fe-2196-d2…
MaanilVerma Sep 16, 2026
98691b6
Merge branch 'maanil/fe-2196-d2-consumability' into maanil/fe-2196-d2…
MaanilVerma Sep 16, 2026
eb70654
Merge branch 'maanil/fe-2196-d2-consumability' into maanil/fe-2196-d2…
MaanilVerma Sep 16, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
140 changes: 140 additions & 0 deletions .github/workflows/ci-account-pack.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
name: 'CI: Account Pack Check'

on:
pull_request:
branches-ignore: [wip/*, draft/*, temp/*]
paths:
- 'packages/account/**'
- 'packages/ingest-types/**'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions:
contents: read

jobs:
verify-pack-contents:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
package: [account, ingest-types]
steps:
- uses: actions/checkout@v7

- name: Setup frontend
uses: ./.github/actions/setup-frontend

- name: Typecheck
run: pnpm -C packages/${{ matrix.package }} typecheck

- name: Build package
run: pnpm -C packages/${{ matrix.package }} build

- name: Verify packed tarball only contains compiled dist output
shell: bash
run: |
set -euo pipefail
UNEXPECTED=$(
pnpm -C packages/${{ matrix.package }} pack --dry-run --json |
jq -r '
.files[].path
| select(
. != "package.json"
and . != "LICENSE"
and . != "README.md"
and (startswith("dist/") | not)
)
'
)
if [ -n "$UNEXPECTED" ]; then
echo "::error title=Unexpected files in tarball::Packed tarball contains files outside dist:" >&2
echo "$UNEXPECTED" >&2
exit 1
fi
echo 'Packed tarball contains only expected files.'

- name: Verify published manifest resolves to dist and pins real versions
shell: bash
run: |
set -euo pipefail
PACK_DIR="$RUNNER_TEMP/${{ matrix.package }}-pack"
rm -rf "$PACK_DIR"
mkdir -p "$PACK_DIR"
pnpm -C packages/${{ matrix.package }} pack --pack-destination "$PACK_DIR"
TARBALL=$(find "$PACK_DIR" -maxdepth 1 -name '*.tgz' | head -n 1)
if [ -z "$TARBALL" ]; then
echo "::error title=Pack failed::No tarball produced in $PACK_DIR" >&2
exit 1
fi
MANIFEST=$(tar -xzOf "$TARBALL" package/package.json)
NON_DIST_EXPORTS=$(
printf '%s' "$MANIFEST" |
jq -r '
[
.exports
| ..
| strings
| select(. != "./package.json" and (startswith("./dist/") | not))
]
| join(", ")
'
)
if [ -n "$NON_DIST_EXPORTS" ]; then
echo "::error title=Exports escape dist::Published exports must resolve to compiled dist output, got: $NON_DIST_EXPORTS" >&2
exit 1
fi
PACKED_FILES=$(tar -tzf "$TARBALL" | sed -n 's#^package/##p')
MISSING_TARGETS=''
while IFS= read -r TARGET; do
[ -n "$TARGET" ] || continue
PATTERN=${TARGET#./}
FOUND=''
while IFS= read -r PACKED; do
# Unquoted: pattern exports like ./dist/* must glob-match.
case "$PACKED" in
$PATTERN)
FOUND=yes
break
;;
esac
done <<< "$PACKED_FILES"
if [ -z "$FOUND" ]; then
MISSING_TARGETS="${MISSING_TARGETS}${TARGET}"$'\n'
fi
done <<< "$(printf '%s' "$MANIFEST" | jq -r '[.exports | .. | strings] | unique[]')"
if [ -n "$MISSING_TARGETS" ]; then
echo "::error title=Exports missing from tarball::Published exports point at files the tarball does not contain:" >&2
printf '%s' "$MISSING_TARGETS" >&2
echo "Packed files:" >&2
printf '%s\n' "$PACKED_FILES" >&2
exit 1
fi
UNRESOLVED=$(
printf '%s' "$MANIFEST" |
jq -r '
(.dependencies // {}) + (.peerDependencies // {})
| to_entries[]
| select(.value | test("^(catalog:|workspace:)"))
| "\(.key)@\(.value)"
'
)
if [ -n "$UNRESOLVED" ]; then
echo "::error title=Unresolved workspace specifiers::Published manifest must not contain catalog:/workspace: ranges:" >&2
echo "$UNRESOLVED" >&2
exit 1
fi
echo 'Published manifest resolves to dist with real dependency ranges.'

smoke-consumer:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7

- name: Setup frontend
uses: ./.github/actions/setup-frontend

- name: Install the packed tarballs into a clean consumer and import every entry
run: pnpm --filter @comfyorg/account smoke:pack
1 change: 1 addition & 0 deletions eslint.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,7 @@ export default defineConfig([
'packages/account-ui/vitest.config.ts',
'packages/billing-contract/vitest.config.ts',
'packages/design-system/vitest.config.ts',
'packages/ingest-types/openapi-ts.config.ts',
'packages/object-info-parser/vitest.config.ts',
'packages/shared-frontend-utils/vitest.config.ts',
'vite.electron.config.mts',
Expand Down
21 changes: 21 additions & 0 deletions packages/account/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2026 Comfy Org

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
106 changes: 103 additions & 3 deletions packages/account/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@
"keywords": [],
"license": "MIT",
"files": [
"src",
"!src/**/*.test.ts",
"!src/**/__fixtures__"
"dist"
],
"type": "module",
"exports": {
Expand Down Expand Up @@ -39,9 +37,111 @@
"./package.json": "./package.json"
},
"publishConfig": {
"exports": {
"./boundedOperation": {
"types": "./dist/core/boundedOperation.d.ts",
"import": "./dist/core/boundedOperation.js"
},
"./lazyIdentity": {
"types": "./dist/core/lazyIdentity.d.ts",
"import": "./dist/core/lazyIdentity.js"
},
"./session": {
"types": "./dist/core/session.d.ts",
"import": "./dist/core/session.js"
},
"./billing": {
"types": "./dist/core/billing/index.d.ts",
"import": "./dist/core/billing/index.js"
},
"./firebase": {
"types": "./dist/firebase/index.d.ts",
"import": "./dist/firebase/index.js"
},
"./web": {
"types": "./dist/web/crossTabRefresh.d.ts",
"import": "./dist/web/crossTabRefresh.js"
},
"./vue/PasswordRules": {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These seven ./vue/* published entries are the Vue layer the plan keeps out of the core artifact. Remove them from publishConfig.exports; keep the src-pointing dev exports so the monorepo is unchanged until #17854 moves the files to @comfyorg/account-ui (./auth/*).

"types": "./dist/vue/PasswordRules.vue.d.ts",
"import": "./dist/vue/PasswordRules.vue"
},
"./vue/SocialAuthButtons": {
"types": "./dist/vue/SocialAuthButtons.vue.d.ts",
"import": "./dist/vue/SocialAuthButtons.vue"
},
"./vue/TurnstileWidget": {
"types": "./dist/vue/TurnstileWidget.vue.d.ts",
"import": "./dist/vue/TurnstileWidget.vue"
},
"./vue/regionGate": {
"types": "./dist/vue/regionGate.d.ts",
"import": "./dist/vue/regionGate.js"
},
"./vue/turnstileGate": {
"types": "./dist/vue/turnstileGate.d.ts",
"import": "./dist/vue/turnstileGate.js"
},
"./vue/lifecycleScope": {
"types": "./dist/vue/lifecycleScope.d.ts",
"import": "./dist/vue/lifecycleScope.js"
},
"./vue/useGenerationGuard": {
"types": "./dist/vue/useGenerationGuard.d.ts",
"import": "./dist/vue/useGenerationGuard.js"
},
"./testing": {
"types": "./dist/testing.d.ts",
"import": "./dist/testing.js"
},
"./customerRecovery": {
"types": "./dist/core/customerRecovery.d.ts",
"import": "./dist/core/customerRecovery.js"
},
"./signInSchemas": {
"types": "./dist/signInSchemas.d.ts",
"import": "./dist/signInSchemas.js"
},
"./turnstile": {
"types": "./dist/turnstile.d.ts",
"import": "./dist/turnstile.js"
},
"./turnstileScript": {
"types": "./dist/turnstileScript.d.ts",
"import": "./dist/turnstileScript.js"
},
"./firebaseAuthError": {
"types": "./dist/firebaseAuthError.d.ts",
"import": "./dist/firebaseAuthError.js"
},
"./provisioning": {
"types": "./dist/provisioning.d.ts",
"import": "./dist/provisioning.js"
},
"./redirect": {
"types": "./dist/redirect.d.ts",
"import": "./dist/redirect.js"
},
"./region": {
"types": "./dist/region.d.ts",
"import": "./dist/region.js"
},
"./telemetry": {
"types": "./dist/telemetry.d.ts",
"import": "./dist/telemetry.js"
},
"./webviewDetection": {
"types": "./dist/webviewDetection.d.ts",
"import": "./dist/webviewDetection.js"
},
"./package.json": "./package.json"
},
"access": "public"
},
"scripts": {
"build": "pnpm run clean && vue-tsc -p tsconfig.build.json && tsx scripts/copyVueSources.ts",

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tsc -p tsconfig.build.json is enough once src/vue is out of the build include; no vue-tsc emit and no copy post-step. vue-tsc --noEmit for the workspace typecheck can stay until #17854 drops the Vue dependency.

"clean": "node --input-type=module -e \"import { rmSync } from 'node:fs'; rmSync('dist', { recursive: true, force: true })\"",
"prepack": "pnpm run build",
"lint": "oxlint src --type-aware && eslint src",
"smoke:pack": "tsx scripts/smokePack.ts",
"test": "vitest run",
Expand Down
18 changes: 18 additions & 0 deletions packages/account/scripts/copyVueSources.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/**
* The Vue SFCs ship as source for the consumer's bundler: vue-tsc emits their

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Delete: the SFCs are not part of the published core. They ship from @comfyorg/account-ui after #17854, where a library build for .vue sources belongs if one is ever needed.

* declarations, this copies the `.vue` files next to them and drops the
* script-only `.vue.js` vue-tsc also writes.
*/
import { copyFileSync, readdirSync, rmSync } from 'node:fs'
import { join } from 'node:path'
import { fileURLToPath } from 'node:url'

const packageDir = fileURLToPath(new URL('..', import.meta.url))
const sourceDir = join(packageDir, 'src', 'vue')
const distDir = join(packageDir, 'dist', 'vue')

for (const name of readdirSync(sourceDir)) {
if (!name.endsWith('.vue')) continue
rmSync(join(distDir, `${name}.js`), { force: true })
copyFileSync(join(sourceDir, name), join(distDir, name))
}
Loading
Loading