@gtkx/cli 2.0.0-beta.1 → 2.0.0-beta.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +43 -40
- package/bin/gtkx-dev-runner.js +5 -1
- package/bin/gtkx.js +5 -1
- package/dist/builder.d.ts +1 -0
- package/dist/builder.d.ts.map +1 -1
- package/dist/builder.js +44 -12
- package/dist/builder.js.map +1 -1
- package/dist/cli.d.ts +1 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +14 -2
- package/dist/cli.js.map +1 -1
- package/dist/codegen/config-dependencies.d.ts +3 -0
- package/dist/codegen/config-dependencies.d.ts.map +1 -0
- package/dist/codegen/config-dependencies.js +355 -0
- package/dist/codegen/config-dependencies.js.map +1 -0
- package/dist/codegen/freshness.d.ts.map +1 -1
- package/dist/codegen/freshness.js +5 -1
- package/dist/codegen/freshness.js.map +1 -1
- package/dist/codegen/reference.d.ts.map +1 -1
- package/dist/codegen/reference.js +1 -0
- package/dist/codegen/reference.js.map +1 -1
- package/dist/codegen/run-codegen.d.ts +6 -3
- package/dist/codegen/run-codegen.d.ts.map +1 -1
- package/dist/codegen/run-codegen.js +42 -18
- package/dist/codegen/run-codegen.js.map +1 -1
- package/dist/codegen/store-resolver.d.ts +3 -1
- package/dist/codegen/store-resolver.d.ts.map +1 -1
- package/dist/codegen/store-resolver.js +7 -4
- package/dist/codegen/store-resolver.js.map +1 -1
- package/dist/commands/build.d.ts +5 -0
- package/dist/commands/build.d.ts.map +1 -1
- package/dist/commands/build.js +83 -10
- package/dist/commands/build.js.map +1 -1
- package/dist/commands/cleanup.d.ts +9 -0
- package/dist/commands/cleanup.d.ts.map +1 -0
- package/dist/commands/cleanup.js +42 -0
- package/dist/commands/cleanup.js.map +1 -0
- package/dist/commands/codegen.d.ts +1 -0
- package/dist/commands/codegen.d.ts.map +1 -1
- package/dist/commands/codegen.js +6 -5
- package/dist/commands/codegen.js.map +1 -1
- package/dist/commands/deploy.d.ts +5 -0
- package/dist/commands/deploy.d.ts.map +1 -1
- package/dist/commands/deploy.js +10 -2
- package/dist/commands/deploy.js.map +1 -1
- package/dist/commands/dev.d.ts +9 -0
- package/dist/commands/dev.d.ts.map +1 -1
- package/dist/commands/dev.js +31 -4
- package/dist/commands/dev.js.map +1 -1
- package/dist/commands/docs.d.ts.map +1 -1
- package/dist/commands/docs.js +1 -0
- package/dist/commands/docs.js.map +1 -1
- package/dist/deploy/depends.d.ts.map +1 -1
- package/dist/deploy/depends.js +24 -2
- package/dist/deploy/depends.js.map +1 -1
- package/dist/deploy/download.d.ts +7 -3
- package/dist/deploy/download.d.ts.map +1 -1
- package/dist/deploy/download.js +19 -20
- package/dist/deploy/download.js.map +1 -1
- package/dist/deploy/freedesktop/metainfo.d.ts.map +1 -1
- package/dist/deploy/freedesktop/metainfo.js +41 -2
- package/dist/deploy/freedesktop/metainfo.js.map +1 -1
- package/dist/deploy/freedesktop/validate.d.ts.map +1 -1
- package/dist/deploy/freedesktop/validate.js +58 -14
- package/dist/deploy/freedesktop/validate.js.map +1 -1
- package/dist/deploy/native-addon.d.ts +5 -0
- package/dist/deploy/native-addon.d.ts.map +1 -0
- package/dist/deploy/native-addon.js +134 -0
- package/dist/deploy/native-addon.js.map +1 -0
- package/dist/deploy/nfpm/config.d.ts +3 -2
- package/dist/deploy/nfpm/config.d.ts.map +1 -1
- package/dist/deploy/nfpm/config.js +7 -4
- package/dist/deploy/nfpm/config.js.map +1 -1
- package/dist/deploy/nfpm/contents.d.ts.map +1 -1
- package/dist/deploy/nfpm/contents.js +8 -0
- package/dist/deploy/nfpm/contents.js.map +1 -1
- package/dist/deploy/node-runtime/download.js +2 -2
- package/dist/deploy/node-runtime/download.js.map +1 -1
- package/dist/deploy/node-runtime/elf.d.ts +4 -1
- package/dist/deploy/node-runtime/elf.d.ts.map +1 -1
- package/dist/deploy/node-runtime/elf.js +34 -5
- package/dist/deploy/node-runtime/elf.js.map +1 -1
- package/dist/deploy/node-runtime/guard.d.ts.map +1 -1
- package/dist/deploy/node-runtime/guard.js +7 -14
- package/dist/deploy/node-runtime/guard.js.map +1 -1
- package/dist/deploy/node-runtime/index.d.ts +3 -1
- package/dist/deploy/node-runtime/index.d.ts.map +1 -1
- package/dist/deploy/node-runtime/index.js +103 -10
- package/dist/deploy/node-runtime/index.js.map +1 -1
- package/dist/deploy/node-runtime/sonames.d.ts +5 -0
- package/dist/deploy/node-runtime/sonames.d.ts.map +1 -0
- package/dist/deploy/node-runtime/sonames.js +13 -0
- package/dist/deploy/node-runtime/sonames.js.map +1 -0
- package/dist/deploy/notices/node-runtime.js +2 -2
- package/dist/deploy/notices/node-runtime.js.map +1 -1
- package/dist/deploy/payload/launcher.d.ts.map +1 -1
- package/dist/deploy/payload/launcher.js +14 -1
- package/dist/deploy/payload/launcher.js.map +1 -1
- package/dist/deploy/payload/stage.d.ts +2 -1
- package/dist/deploy/payload/stage.d.ts.map +1 -1
- package/dist/deploy/payload/stage.js +46 -5
- package/dist/deploy/payload/stage.js.map +1 -1
- package/dist/deploy/run-deploy.d.ts +2 -0
- package/dist/deploy/run-deploy.d.ts.map +1 -1
- package/dist/deploy/run-deploy.js +197 -52
- package/dist/deploy/run-deploy.js.map +1 -1
- package/dist/deploy/settings/arch.d.ts +9 -3
- package/dist/deploy/settings/arch.d.ts.map +1 -1
- package/dist/deploy/settings/arch.js +27 -6
- package/dist/deploy/settings/arch.js.map +1 -1
- package/dist/deploy/settings/build-manifest.d.ts +6 -1
- package/dist/deploy/settings/build-manifest.d.ts.map +1 -1
- package/dist/deploy/settings/build-manifest.js +15 -4
- package/dist/deploy/settings/build-manifest.js.map +1 -1
- package/dist/deploy/settings/extra-files.d.ts +1 -1
- package/dist/deploy/settings/extra-files.d.ts.map +1 -1
- package/dist/deploy/settings/extra-files.js +25 -3
- package/dist/deploy/settings/extra-files.js.map +1 -1
- package/dist/deploy/settings/index.d.ts +3 -1
- package/dist/deploy/settings/index.d.ts.map +1 -1
- package/dist/deploy/settings/index.js +4 -2
- package/dist/deploy/settings/index.js.map +1 -1
- package/dist/deploy/settings/libraries.d.ts.map +1 -1
- package/dist/deploy/settings/libraries.js +2 -1
- package/dist/deploy/settings/libraries.js.map +1 -1
- package/dist/deploy/settings/paths.d.ts +4 -2
- package/dist/deploy/settings/paths.d.ts.map +1 -1
- package/dist/deploy/settings/paths.js +121 -12
- package/dist/deploy/settings/paths.js.map +1 -1
- package/dist/deploy/targets/appimage.d.ts.map +1 -1
- package/dist/deploy/targets/appimage.js +1 -0
- package/dist/deploy/targets/appimage.js.map +1 -1
- package/dist/deploy/targets/flatpak-pnpm.js +4 -4
- package/dist/deploy/targets/flatpak-pnpm.js.map +1 -1
- package/dist/deploy/targets/flatpak-source.d.ts.map +1 -1
- package/dist/deploy/targets/flatpak-source.js +13 -2
- package/dist/deploy/targets/flatpak-source.js.map +1 -1
- package/dist/deploy/targets/flatpak.d.ts.map +1 -1
- package/dist/deploy/targets/flatpak.js +1 -0
- package/dist/deploy/targets/flatpak.js.map +1 -1
- package/dist/deploy/targets/nfpm-target.d.ts.map +1 -1
- package/dist/deploy/targets/nfpm-target.js +13 -7
- package/dist/deploy/targets/nfpm-target.js.map +1 -1
- package/dist/deploy/types.d.ts +5 -2
- package/dist/deploy/types.d.ts.map +1 -1
- package/dist/deploy/types.js.map +1 -1
- package/dist/deploy/vendored/appimagetool.js +2 -2
- package/dist/deploy/vendored/appimagetool.js.map +1 -1
- package/dist/deploy/vendored/nfpm.js +1 -1
- package/dist/deploy/vendored/nfpm.js.map +1 -1
- package/dist/dev/catalog-writes.d.ts +8 -0
- package/dist/dev/catalog-writes.d.ts.map +1 -0
- package/dist/dev/catalog-writes.js +26 -0
- package/dist/dev/catalog-writes.js.map +1 -0
- package/dist/dev/entry-env.d.ts +2 -1
- package/dist/dev/entry-env.d.ts.map +1 -1
- package/dist/dev/entry-env.js +2 -1
- package/dist/dev/entry-env.js.map +1 -1
- package/dist/dev/font-dir.d.ts +3 -0
- package/dist/dev/font-dir.d.ts.map +1 -0
- package/dist/dev/font-dir.js +9 -0
- package/dist/dev/font-dir.js.map +1 -0
- package/dist/dev/headless.d.ts +3 -0
- package/dist/dev/headless.d.ts.map +1 -0
- package/dist/dev/headless.js +35 -0
- package/dist/dev/headless.js.map +1 -0
- package/dist/dev/runner-deps.d.ts +1 -1
- package/dist/dev/runner-deps.d.ts.map +1 -1
- package/dist/dev/runner-deps.js +12 -7
- package/dist/dev/runner-deps.js.map +1 -1
- package/dist/dev/runner-main.d.ts.map +1 -1
- package/dist/dev/runner-main.js +10 -3
- package/dist/dev/runner-main.js.map +1 -1
- package/dist/dev/runner.d.ts +2 -0
- package/dist/dev/runner.d.ts.map +1 -1
- package/dist/dev/runner.js +26 -7
- package/dist/dev/runner.js.map +1 -1
- package/dist/dev/supervisor.d.ts +3 -1
- package/dist/dev/supervisor.d.ts.map +1 -1
- package/dist/dev/supervisor.js +132 -29
- package/dist/dev/supervisor.js.map +1 -1
- package/dist/dev/vite-dev-server.d.ts +1 -1
- package/dist/dev/vite-dev-server.d.ts.map +1 -1
- package/dist/dev/vite-dev-server.js +14 -2
- package/dist/dev/vite-dev-server.js.map +1 -1
- package/dist/dev/watch-ignore.d.ts +3 -0
- package/dist/dev/watch-ignore.d.ts.map +1 -0
- package/dist/dev/watch-ignore.js +11 -0
- package/dist/dev/watch-ignore.js.map +1 -0
- package/dist/i18n/catalogs.d.ts +6 -2
- package/dist/i18n/catalogs.d.ts.map +1 -1
- package/dist/i18n/catalogs.js +10 -7
- package/dist/i18n/catalogs.js.map +1 -1
- package/dist/i18n/source-messages.d.ts +3 -1
- package/dist/i18n/source-messages.d.ts.map +1 -1
- package/dist/i18n/source-messages.js +973 -9
- package/dist/i18n/source-messages.js.map +1 -1
- package/dist/internal/agent-rules.d.ts.map +1 -1
- package/dist/internal/agent-rules.js +7 -2
- package/dist/internal/agent-rules.js.map +1 -1
- package/dist/internal/banner.d.ts +4 -2
- package/dist/internal/banner.d.ts.map +1 -1
- package/dist/internal/banner.js +19 -5
- package/dist/internal/banner.js.map +1 -1
- package/dist/internal/build-manifest.d.ts +5 -2
- package/dist/internal/build-manifest.d.ts.map +1 -1
- package/dist/internal/build-manifest.js +15 -2
- package/dist/internal/build-manifest.js.map +1 -1
- package/dist/internal/build-output.d.ts +8 -0
- package/dist/internal/build-output.d.ts.map +1 -0
- package/dist/internal/build-output.js +116 -0
- package/dist/internal/build-output.js.map +1 -0
- package/dist/internal/cache-root.d.ts +3 -0
- package/dist/internal/cache-root.d.ts.map +1 -0
- package/dist/internal/cache-root.js +9 -0
- package/dist/internal/cache-root.js.map +1 -0
- package/dist/internal/compile-cache-store.d.ts +4 -0
- package/dist/internal/compile-cache-store.d.ts.map +1 -0
- package/dist/internal/compile-cache-store.js +41 -0
- package/dist/internal/compile-cache-store.js.map +1 -0
- package/dist/internal/compile-cache.d.ts +4 -0
- package/dist/internal/compile-cache.d.ts.map +1 -0
- package/dist/internal/compile-cache.js +16 -0
- package/dist/internal/compile-cache.js.map +1 -0
- package/dist/internal/deploy-out-dir.d.ts +4 -0
- package/dist/internal/deploy-out-dir.d.ts.map +1 -0
- package/dist/internal/deploy-out-dir.js +5 -0
- package/dist/internal/deploy-out-dir.js.map +1 -0
- package/dist/internal/docs-elements.d.ts +1 -0
- package/dist/internal/docs-elements.d.ts.map +1 -1
- package/dist/internal/docs-elements.js +5 -4
- package/dist/internal/docs-elements.js.map +1 -1
- package/dist/internal/entry-arg.d.ts +4 -1
- package/dist/internal/entry-arg.d.ts.map +1 -1
- package/dist/internal/entry-arg.js +7 -1
- package/dist/internal/entry-arg.js.map +1 -1
- package/dist/internal/errors.d.ts +2 -1
- package/dist/internal/errors.d.ts.map +1 -1
- package/dist/internal/errors.js +1 -1
- package/dist/internal/errors.js.map +1 -1
- package/dist/internal/font-path.d.ts +4 -0
- package/dist/internal/font-path.d.ts.map +1 -0
- package/dist/internal/font-path.js +12 -0
- package/dist/internal/font-path.js.map +1 -0
- package/dist/internal/font-staging.d.ts +6 -0
- package/dist/internal/font-staging.d.ts.map +1 -0
- package/dist/internal/font-staging.js +94 -0
- package/dist/internal/font-staging.js.map +1 -0
- package/dist/internal/icon-staging.d.ts +3 -0
- package/dist/internal/icon-staging.d.ts.map +1 -0
- package/dist/internal/icon-staging.js +40 -0
- package/dist/internal/icon-staging.js.map +1 -0
- package/dist/internal/import-scan.d.ts +4 -0
- package/dist/internal/import-scan.d.ts.map +1 -0
- package/dist/internal/import-scan.js +138 -0
- package/dist/internal/import-scan.js.map +1 -0
- package/dist/internal/module-hash.d.ts +3 -0
- package/dist/internal/module-hash.d.ts.map +1 -0
- package/dist/internal/module-hash.js +19 -0
- package/dist/internal/module-hash.js.map +1 -0
- package/dist/internal/output-directory.d.ts +15 -0
- package/dist/internal/output-directory.d.ts.map +1 -0
- package/dist/internal/output-directory.js +490 -0
- package/dist/internal/output-directory.js.map +1 -0
- package/dist/internal/parent-process.d.ts +12 -0
- package/dist/internal/parent-process.d.ts.map +1 -0
- package/dist/internal/parent-process.js +74 -0
- package/dist/internal/parent-process.js.map +1 -0
- package/dist/internal/prepare-project.d.ts +3 -0
- package/dist/internal/prepare-project.d.ts.map +1 -1
- package/dist/internal/prepare-project.js +9 -3
- package/dist/internal/prepare-project.js.map +1 -1
- package/dist/internal/react-compiler-cache.d.ts +13 -0
- package/dist/internal/react-compiler-cache.d.ts.map +1 -0
- package/dist/internal/react-compiler-cache.js +182 -0
- package/dist/internal/react-compiler-cache.js.map +1 -0
- package/dist/internal/source-imports.d.ts +7 -2
- package/dist/internal/source-imports.d.ts.map +1 -1
- package/dist/internal/source-imports.js +31 -11
- package/dist/internal/source-imports.js.map +1 -1
- package/dist/internal/staging-file.d.ts +5 -0
- package/dist/internal/staging-file.d.ts.map +1 -0
- package/dist/internal/staging-file.js +35 -0
- package/dist/internal/staging-file.js.map +1 -0
- package/dist/internal/xdg-banner.d.ts +4 -0
- package/dist/internal/xdg-banner.d.ts.map +1 -0
- package/dist/internal/xdg-banner.js +11 -0
- package/dist/internal/xdg-banner.js.map +1 -0
- package/dist/internal/xdg-data-dirs.d.ts +2 -1
- package/dist/internal/xdg-data-dirs.d.ts.map +1 -1
- package/dist/internal/xdg-data-dirs.js +1 -1
- package/dist/internal/xdg-data-dirs.js.map +1 -1
- package/dist/mcp/client.js +2 -2
- package/dist/mcp/client.js.map +1 -1
- package/dist/settings/schema.d.ts.map +1 -1
- package/dist/settings/schema.js +3 -8
- package/dist/settings/schema.js.map +1 -1
- package/dist/vite-plugins/asset-extensions.d.ts.map +1 -1
- package/dist/vite-plugins/asset-extensions.js +2 -0
- package/dist/vite-plugins/asset-extensions.js.map +1 -1
- package/dist/vite-plugins/asset-imports.d.ts.map +1 -1
- package/dist/vite-plugins/asset-imports.js +20 -6
- package/dist/vite-plugins/asset-imports.js.map +1 -1
- package/dist/vite-plugins/asset-specifier.d.ts +5 -1
- package/dist/vite-plugins/asset-specifier.d.ts.map +1 -1
- package/dist/vite-plugins/asset-specifier.js +10 -1
- package/dist/vite-plugins/asset-specifier.js.map +1 -1
- package/dist/vite-plugins/build-manifest.d.ts +5 -1
- package/dist/vite-plugins/build-manifest.d.ts.map +1 -1
- package/dist/vite-plugins/build-manifest.js +2 -1
- package/dist/vite-plugins/build-manifest.js.map +1 -1
- package/dist/vite-plugins/built-url.d.ts.map +1 -1
- package/dist/vite-plugins/built-url.js +5 -2
- package/dist/vite-plugins/built-url.js.map +1 -1
- package/dist/vite-plugins/css.d.ts.map +1 -1
- package/dist/vite-plugins/css.js +13 -5
- package/dist/vite-plugins/css.js.map +1 -1
- package/dist/vite-plugins/ensure-store.d.ts +1 -1
- package/dist/vite-plugins/ensure-store.d.ts.map +1 -1
- package/dist/vite-plugins/ensure-store.js +2 -2
- package/dist/vite-plugins/ensure-store.js.map +1 -1
- package/dist/vite-plugins/fast-refresh/refresh-filter.d.ts +6 -1
- package/dist/vite-plugins/fast-refresh/refresh-filter.d.ts.map +1 -1
- package/dist/vite-plugins/fast-refresh/refresh-filter.js +3 -1
- package/dist/vite-plugins/fast-refresh/refresh-filter.js.map +1 -1
- package/dist/vite-plugins/fast-refresh/swc-refresh.d.ts.map +1 -1
- package/dist/vite-plugins/fast-refresh/swc-refresh.js +23 -14
- package/dist/vite-plugins/fast-refresh/swc-refresh.js.map +1 -1
- package/dist/vite-plugins/font-name.d.ts +3 -0
- package/dist/vite-plugins/font-name.d.ts.map +1 -0
- package/dist/vite-plugins/font-name.js +406 -0
- package/dist/vite-plugins/font-name.js.map +1 -0
- package/dist/vite-plugins/font-worker-env.d.ts +4 -0
- package/dist/vite-plugins/font-worker-env.d.ts.map +1 -0
- package/dist/vite-plugins/font-worker-env.js +19 -0
- package/dist/vite-plugins/font-worker-env.js.map +1 -0
- package/dist/vite-plugins/font.d.ts +4 -0
- package/dist/vite-plugins/font.d.ts.map +1 -0
- package/dist/vite-plugins/font.js +111 -0
- package/dist/vite-plugins/font.js.map +1 -0
- package/dist/vite-plugins/i18n.d.ts +11 -2
- package/dist/vite-plugins/i18n.d.ts.map +1 -1
- package/dist/vite-plugins/i18n.js +74 -8
- package/dist/vite-plugins/i18n.js.map +1 -1
- package/dist/vite-plugins/icon-worker-env.d.ts +4 -0
- package/dist/vite-plugins/icon-worker-env.d.ts.map +1 -0
- package/dist/vite-plugins/icon-worker-env.js +23 -0
- package/dist/vite-plugins/icon-worker-env.js.map +1 -0
- package/dist/vite-plugins/icons.d.ts.map +1 -1
- package/dist/vite-plugins/icons.js +4 -9
- package/dist/vite-plugins/icons.js.map +1 -1
- package/dist/vite-plugins/index.d.ts +10 -1
- package/dist/vite-plugins/index.d.ts.map +1 -1
- package/dist/vite-plugins/index.js +17 -3
- package/dist/vite-plugins/index.js.map +1 -1
- package/dist/vite-plugins/native.d.ts.map +1 -1
- package/dist/vite-plugins/native.js +0 -4
- package/dist/vite-plugins/native.js.map +1 -1
- package/dist/vite-plugins/react-compiler.d.ts.map +1 -1
- package/dist/vite-plugins/react-compiler.js +57 -18
- package/dist/vite-plugins/react-compiler.js.map +1 -1
- package/dist/vite-plugins/resource-shared.d.ts +3 -1
- package/dist/vite-plugins/resource-shared.d.ts.map +1 -1
- package/dist/vite-plugins/resource-shared.js +3 -1
- package/dist/vite-plugins/resource-shared.js.map +1 -1
- package/dist/vite-plugins/resources.d.ts.map +1 -1
- package/dist/vite-plugins/resources.js +9 -6
- package/dist/vite-plugins/resources.js.map +1 -1
- package/dist/vite-plugins/self-contained.d.ts.map +1 -1
- package/dist/vite-plugins/self-contained.js +159 -158
- package/dist/vite-plugins/self-contained.js.map +1 -1
- package/dist/vite-plugins/settings-worker-env.d.ts +1 -1
- package/dist/vite-plugins/settings-worker-env.d.ts.map +1 -1
- package/dist/vite-plugins/settings-worker-env.js +4 -4
- package/dist/vite-plugins/settings-worker-env.js.map +1 -1
- package/dist/vite-plugins/settings.d.ts.map +1 -1
- package/dist/vite-plugins/settings.js +25 -14
- package/dist/vite-plugins/settings.js.map +1 -1
- package/dist/vite-plugins/store-links.d.ts.map +1 -1
- package/dist/vite-plugins/store-links.js +9 -5
- package/dist/vite-plugins/store-links.js.map +1 -1
- package/dist/vite-plugins/undeclared-library.d.ts.map +1 -1
- package/dist/vite-plugins/undeclared-library.js +18 -15
- package/dist/vite-plugins/undeclared-library.js.map +1 -1
- package/dist/vite-plugins/worker.d.ts.map +1 -1
- package/dist/vite-plugins/worker.js +21 -13
- package/dist/vite-plugins/worker.js.map +1 -1
- package/dist/vitest-plugin.d.ts +4 -3
- package/dist/vitest-plugin.d.ts.map +1 -1
- package/dist/vitest-plugin.js +12 -8
- package/dist/vitest-plugin.js.map +1 -1
- package/env.d.ts +9 -0
- package/package.json +18 -13
- package/src/builder.ts +45 -12
- package/src/cli.ts +15 -2
- package/src/codegen/config-dependencies.ts +470 -0
- package/src/codegen/freshness.ts +5 -1
- package/src/codegen/reference.ts +1 -0
- package/src/codegen/run-codegen.ts +51 -21
- package/src/codegen/store-resolver.ts +9 -4
- package/src/commands/build.ts +13 -2
- package/src/commands/cleanup.ts +48 -0
- package/src/commands/codegen.ts +6 -5
- package/src/commands/deploy.ts +10 -2
- package/src/commands/dev.ts +45 -4
- package/src/commands/docs.ts +1 -0
- package/src/deploy/depends.ts +30 -3
- package/src/deploy/download.ts +33 -24
- package/src/deploy/freedesktop/metainfo.ts +73 -21
- package/src/deploy/freedesktop/validate.ts +80 -15
- package/src/deploy/native-addon.ts +183 -0
- package/src/deploy/nfpm/config.ts +13 -4
- package/src/deploy/nfpm/contents.ts +8 -0
- package/src/deploy/node-runtime/download.ts +2 -2
- package/src/deploy/node-runtime/elf.ts +46 -5
- package/src/deploy/node-runtime/guard.ts +10 -14
- package/src/deploy/node-runtime/index.ts +148 -12
- package/src/deploy/node-runtime/sonames.ts +17 -0
- package/src/deploy/notices/node-runtime.ts +2 -2
- package/src/deploy/payload/launcher.ts +20 -1
- package/src/deploy/payload/stage.ts +76 -5
- package/src/deploy/run-deploy.ts +227 -72
- package/src/deploy/settings/arch.ts +40 -8
- package/src/deploy/settings/build-manifest.ts +28 -3
- package/src/deploy/settings/extra-files.ts +30 -4
- package/src/deploy/settings/index.ts +7 -2
- package/src/deploy/settings/libraries.ts +2 -1
- package/src/deploy/settings/paths.ts +80 -13
- package/src/deploy/targets/appimage.ts +1 -0
- package/src/deploy/targets/flatpak-pnpm.ts +4 -4
- package/src/deploy/targets/flatpak-source.ts +15 -2
- package/src/deploy/targets/flatpak.ts +1 -0
- package/src/deploy/targets/nfpm-target.ts +14 -6
- package/src/deploy/types.ts +5 -1
- package/src/deploy/vendored/appimagetool.ts +2 -2
- package/src/deploy/vendored/nfpm.ts +1 -1
- package/src/dev/catalog-writes.ts +35 -0
- package/src/dev/entry-env.ts +2 -1
- package/src/dev/font-dir.ts +11 -0
- package/src/dev/headless.ts +40 -0
- package/src/dev/runner-deps.ts +20 -7
- package/src/dev/runner-main.ts +12 -3
- package/src/dev/runner.ts +37 -7
- package/src/dev/supervisor.ts +183 -32
- package/src/dev/vite-dev-server.ts +20 -2
- package/src/dev/watch-ignore.ts +16 -0
- package/src/i18n/catalogs.ts +21 -8
- package/src/i18n/source-messages.ts +1446 -29
- package/src/internal/agent-rules.ts +7 -2
- package/src/internal/banner.ts +27 -6
- package/src/internal/build-manifest.ts +25 -1
- package/src/internal/build-output.ts +171 -0
- package/src/internal/cache-root.ts +12 -0
- package/src/internal/compile-cache-store.ts +50 -0
- package/src/internal/compile-cache.ts +20 -0
- package/src/internal/deploy-out-dir.ts +8 -0
- package/src/internal/docs-elements.ts +10 -4
- package/src/internal/entry-arg.ts +8 -1
- package/src/internal/errors.ts +1 -1
- package/src/internal/font-path.ts +15 -0
- package/src/internal/font-staging.ts +131 -0
- package/src/internal/icon-staging.ts +58 -0
- package/src/internal/import-scan.ts +206 -0
- package/src/internal/module-hash.ts +22 -0
- package/src/internal/output-directory.ts +699 -0
- package/src/internal/parent-process.ts +110 -0
- package/src/internal/prepare-project.ts +11 -5
- package/src/internal/react-compiler-cache.ts +246 -0
- package/src/internal/source-imports.ts +57 -12
- package/src/internal/staging-file.ts +42 -0
- package/src/internal/xdg-banner.ts +13 -0
- package/src/internal/xdg-data-dirs.ts +1 -1
- package/src/mcp/client.ts +2 -2
- package/src/settings/schema.ts +4 -10
- package/src/vite-plugins/asset-extensions.ts +2 -0
- package/src/vite-plugins/asset-imports.ts +23 -5
- package/src/vite-plugins/asset-specifier.ts +17 -0
- package/src/vite-plugins/build-manifest.ts +7 -1
- package/src/vite-plugins/built-url.ts +6 -2
- package/src/vite-plugins/css.ts +16 -5
- package/src/vite-plugins/ensure-store.ts +2 -2
- package/src/vite-plugins/fast-refresh/refresh-filter.ts +10 -1
- package/src/vite-plugins/fast-refresh/swc-refresh.ts +33 -14
- package/src/vite-plugins/font-name.ts +582 -0
- package/src/vite-plugins/font-worker-env.ts +25 -0
- package/src/vite-plugins/font.ts +180 -0
- package/src/vite-plugins/i18n.ts +122 -11
- package/src/vite-plugins/icon-worker-env.ts +36 -0
- package/src/vite-plugins/icons.ts +4 -10
- package/src/vite-plugins/index.ts +34 -9
- package/src/vite-plugins/native.ts +0 -5
- package/src/vite-plugins/react-compiler.ts +83 -19
- package/src/vite-plugins/resource-shared.ts +4 -0
- package/src/vite-plugins/resources.ts +11 -5
- package/src/vite-plugins/self-contained.ts +184 -185
- package/src/vite-plugins/settings-worker-env.ts +4 -4
- package/src/vite-plugins/settings.ts +36 -16
- package/src/vite-plugins/store-links.ts +10 -5
- package/src/vite-plugins/undeclared-library.ts +19 -15
- package/src/vite-plugins/worker.ts +31 -15
- package/src/vitest-plugin.ts +12 -8
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nfpm-target.js","sourceRoot":"","sources":["../../../src/deploy/targets/nfpm-target.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,SAAS,EAAE,MAAM,MAAM,CAAC;AAEjC,OAAO,EAAqB,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"nfpm-target.js","sourceRoot":"","sources":["../../../src/deploy/targets/nfpm-target.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AACnC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,SAAS,EAAE,MAAM,MAAM,CAAC;AAEjC,OAAO,EAAE,sBAAsB,EAAqB,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAChG,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAElC,MAAM,iBAAiB,GAAG,WAAW,CAAC;AACtC,MAAM,MAAM,GAAG,MAAM,CAAC;AAEtB,MAAM,eAAe,GAAG,CAAC,OAAsB,EAAE,QAAsB,EAAU,EAAE,CAC/E,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,OAAO,EAAE,QAAQ,EAAE,iBAAiB,CAAC,CAAC;AAEtE,MAAM,eAAe,GAAG,CAAC,OAAsB,EAAE,QAAsB,EAAoB,EAAE;IACzF,MAAM,YAAY,GAAG,sBAAsB,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;IAE/D,IAAI,YAAY,KAAK,IAAI,EAAE,CAAC;QACxB,IAAI,CAAC,GAAG,QAAQ,8BAA8B,YAAY,EAAE,CAAC,CAAC;IAClE,CAAC;IAED,OAAO,CAAC;YACJ,IAAI,EAAE,eAAe,CAAC,OAAO,EAAE,QAAQ,CAAC;YACxC,QAAQ,EAAE,SAAS,CAAC,gBAAgB,CAAC,OAAO,EAAE,QAAQ,EAAE,YAAY,CAAC,EAAE,EAAE,SAAS,EAAE,CAAC,EAAE,CAAC;SAC3F,CAAC,CAAC;AACP,CAAC,CAAC;AAEF,MAAM,WAAW,GAAG,KAAK,EAAE,OAAsB,EAAE,QAAsB,EAA6B,EAAE,CAAC;IACrG,MAAM,YAAY,CAAC,OAAO,EAAE,QAAQ,EAAE,eAAe,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;CAC5E,CAAC;AAEF,MAAM,UAAU,GAAG,CAAC,QAAsB,EAAgB,EAAE,CAAC,CAAC;IAC1D,IAAI,EAAE,QAAQ;IACd,MAAM,EAAE,MAAM;IACd,UAAU,EAAE,KAAK;IACjB,KAAK,EAAE,CAAC,GAAG,CAAC;IACZ,MAAM,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,eAAe,CAAC,OAAO,EAAE,QAAQ,CAAC;IACvD,IAAI,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,WAAW,CAAC,OAAO,EAAE,QAAQ,CAAC;CACpD,CAAC,CAAC;AAEH,OAAO,EAAE,UAAU,EAAE,CAAC","sourcesContent":["import { info } from \"@gtkx/utils\";\nimport { join } from \"node:path\";\nimport { stringify } from \"yaml\";\nimport type { DeployArtifact, DeployManifest, DeployPayload, DeployTarget } from \"../types.js\";\nimport { glibcMinimumForPackage, type NfpmPackager, renderNfpmConfig } from \"../nfpm/config.js\";\nimport { packWithNfpm } from \"../nfpm/pack.js\";\nimport { TAR } from \"../tools.js\";\n\nconst MANIFEST_FILENAME = \"nfpm.yaml\";\nconst PREFIX = \"/usr\";\n\nconst manifestPathFor = (payload: DeployPayload, packager: NfpmPackager): string =>\n join(payload.settings.paths.targets, packager, MANIFEST_FILENAME);\n\nconst renderManifests = (payload: DeployPayload, packager: NfpmPackager): DeployManifest[] => {\n const glibcMinimum = glibcMinimumForPackage(payload, packager);\n\n if (glibcMinimum !== null) {\n info(`${packager} package requires glibc >= ${glibcMinimum}`);\n }\n\n return [{\n path: manifestPathFor(payload, packager),\n contents: stringify(renderNfpmConfig(payload, packager, glibcMinimum), { lineWidth: 0 }),\n }];\n};\n\nconst packPackage = async (payload: DeployPayload, packager: NfpmPackager): Promise<DeployArtifact[]> => [\n await packWithNfpm(payload, packager, manifestPathFor(payload, packager)),\n];\n\nconst nfpmTarget = (packager: NfpmPackager): DeployTarget => ({\n name: packager,\n prefix: PREFIX,\n isHostOnly: false,\n tools: [TAR],\n render: (payload) => renderManifests(payload, packager),\n pack: (payload) => packPackage(payload, packager),\n});\n\nexport { nfpmTarget };\n"]}
|
package/dist/deploy/types.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { Config } from "@gtkx/config";
|
|
2
2
|
import type { ResolvedApplicationIcon } from "../internal/icon-path.js";
|
|
3
3
|
type DeployConfig = NonNullable<Config["deploy"]>;
|
|
4
|
+
type DeployArchName = NonNullable<DeployConfig["architectures"]>[number];
|
|
4
5
|
type DeployTargetName = NonNullable<DeployConfig["targets"]>[number];
|
|
5
6
|
type PackageFamily = "arch" | "debian" | "fedora" | "suse" | "unknown";
|
|
6
7
|
type DeployTool = {
|
|
@@ -80,7 +81,7 @@ type DeployArch = {
|
|
|
80
81
|
rpm: string;
|
|
81
82
|
flatpak: string;
|
|
82
83
|
appimage: string;
|
|
83
|
-
node:
|
|
84
|
+
node: DeployArchName;
|
|
84
85
|
};
|
|
85
86
|
type DeployPaths = {
|
|
86
87
|
root: string;
|
|
@@ -98,6 +99,7 @@ type DeployPaths = {
|
|
|
98
99
|
};
|
|
99
100
|
type DeploySettings = {
|
|
100
101
|
applicationId: string;
|
|
102
|
+
configFile: string;
|
|
101
103
|
binaryName: string;
|
|
102
104
|
name: string;
|
|
103
105
|
genericName: string | null;
|
|
@@ -152,9 +154,10 @@ type DeployArtifact = {
|
|
|
152
154
|
type DeployTarget = {
|
|
153
155
|
name: DeployTargetName;
|
|
154
156
|
prefix: string;
|
|
157
|
+
isHostOnly: boolean;
|
|
155
158
|
tools: DeployTool[];
|
|
156
159
|
render: (payload: DeployPayload) => DeployManifest[];
|
|
157
160
|
pack: (payload: DeployPayload, manifests: DeployManifest[]) => Promise<DeployArtifact[]>;
|
|
158
161
|
};
|
|
159
|
-
export type { DeployArch, DeployArtifact, DeployConfig, DeployDesktopAction, DeployDeveloper, DeployExtraFile, DeployFileAssociation, DeployManifest, DeployPaths, DeployPayload, DeployRelease, DeployScreenshot, DeploySettings, DeployTarget, DeployTargetName, DeployTool, DeployVersions, NodeRuntime, Notice, NoticeSection, PackageFamily, StagedFile, };
|
|
162
|
+
export type { DeployArch, DeployArchName, DeployArtifact, DeployConfig, DeployDesktopAction, DeployDeveloper, DeployExtraFile, DeployFileAssociation, DeployManifest, DeployPaths, DeployPayload, DeployRelease, DeployScreenshot, DeploySettings, DeployTarget, DeployTargetName, DeployTool, DeployVersions, NodeRuntime, Notice, NoticeSection, PackageFamily, StagedFile, };
|
|
160
163
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/deploy/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAC;AAExE,KAAK,YAAY,GAAG,WAAW,CAAC,MAAM,CAAC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,QAAQ,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,KAAK,cAAc,GAAG;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,KAAK,YAAY,GAAG;IAChB,IAAI,EAAE,gBAAgB,CAAC;IACvB,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,OAAO,CAAC;IACpB,KAAK,EAAE,UAAU,EAAE,CAAC;IACpB,MAAM,EAAE,CAAC,OAAO,EAAE,aAAa,KAAK,cAAc,EAAE,CAAC;IACrD,IAAI,EAAE,CAAC,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,cAAc,EAAE,KAAK,OAAO,CAAC,cAAc,EAAE,CAAC,CAAC;CAC5F,CAAC;AAEF,YAAY,EACR,UAAU,EACV,cAAc,EACd,cAAc,EACd,YAAY,EACZ,mBAAmB,EACnB,eAAe,EACf,eAAe,EACf,qBAAqB,EACrB,cAAc,EACd,WAAW,EACX,aAAa,EACb,aAAa,EACb,gBAAgB,EAChB,cAAc,EACd,YAAY,EACZ,gBAAgB,EAChB,UAAU,EACV,cAAc,EACd,WAAW,EACX,MAAM,EACN,aAAa,EACb,aAAa,EACb,UAAU,GACb,CAAC"}
|
package/dist/deploy/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/deploy/types.ts"],"names":[],"mappings":"","sourcesContent":["import type { Config } from \"@gtkx/config\";\nimport type { ResolvedApplicationIcon } from \"../internal/icon-path.js\";\n\ntype DeployConfig = NonNullable<Config[\"deploy\"]>;\ntype DeployTargetName = NonNullable<DeployConfig[\"targets\"]>[number];\ntype PackageFamily = \"arch\" | \"debian\" | \"fedora\" | \"suse\" | \"unknown\";\n\ntype DeployTool = {\n command: string;\n purpose: string;\n isOptional: boolean;\n isPresent?: () => boolean;\n};\n\ntype StagedFile = {\n rel: string;\n abs: string;\n mode: number;\n};\n\ntype NodeRuntime = {\n path: string;\n licenseFile: string | null;\n version: string;\n glibcMinimum: string | null;\n isStripped: boolean;\n};\n\ntype Notice = {\n subject: string;\n license: string;\n source: string | null;\n copyright: string[];\n text: string | null;\n};\n\ntype NoticeSection = {\n title: string;\n files: string[];\n summary: string[];\n notices: Notice[];\n};\n\ntype DeployDeveloper = {\n id: string | null;\n name: string;\n email: string | null;\n};\n\ntype DeployScreenshot = {\n url: string;\n caption: string | null;\n isDefault: boolean;\n};\n\ntype DeployRelease = {\n version: string;\n date: string;\n type: string | null;\n urgency: string | null;\n notes: string[];\n url: string | null;\n};\n\ntype DeployFileAssociation = {\n extension: string;\n mimeType: string;\n description: string | null;\n};\n\ntype DeployExtraFile = {\n destination: string;\n source: string;\n mode: number | null;\n};\n\ntype DeployDesktopAction = {\n id: string;\n name: string;\n args: string[];\n icon: string | null;\n};\n\ntype DeployVersions = {\n upstream: string;\n packageVersion: string;\n debRevision: string;\n rpmRelease: string;\n epoch: number | null;\n};\n\ntype DeployArch = {\n deb: string;\n rpm: string;\n flatpak: string;\n appimage: string;\n node:
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/deploy/types.ts"],"names":[],"mappings":"","sourcesContent":["import type { Config } from \"@gtkx/config\";\nimport type { ResolvedApplicationIcon } from \"../internal/icon-path.js\";\n\ntype DeployConfig = NonNullable<Config[\"deploy\"]>;\ntype DeployArchName = NonNullable<DeployConfig[\"architectures\"]>[number];\ntype DeployTargetName = NonNullable<DeployConfig[\"targets\"]>[number];\ntype PackageFamily = \"arch\" | \"debian\" | \"fedora\" | \"suse\" | \"unknown\";\n\ntype DeployTool = {\n command: string;\n purpose: string;\n isOptional: boolean;\n isPresent?: () => boolean;\n};\n\ntype StagedFile = {\n rel: string;\n abs: string;\n mode: number;\n};\n\ntype NodeRuntime = {\n path: string;\n licenseFile: string | null;\n version: string;\n glibcMinimum: string | null;\n isStripped: boolean;\n};\n\ntype Notice = {\n subject: string;\n license: string;\n source: string | null;\n copyright: string[];\n text: string | null;\n};\n\ntype NoticeSection = {\n title: string;\n files: string[];\n summary: string[];\n notices: Notice[];\n};\n\ntype DeployDeveloper = {\n id: string | null;\n name: string;\n email: string | null;\n};\n\ntype DeployScreenshot = {\n url: string;\n caption: string | null;\n isDefault: boolean;\n};\n\ntype DeployRelease = {\n version: string;\n date: string;\n type: string | null;\n urgency: string | null;\n notes: string[];\n url: string | null;\n};\n\ntype DeployFileAssociation = {\n extension: string;\n mimeType: string;\n description: string | null;\n};\n\ntype DeployExtraFile = {\n destination: string;\n source: string;\n mode: number | null;\n};\n\ntype DeployDesktopAction = {\n id: string;\n name: string;\n args: string[];\n icon: string | null;\n};\n\ntype DeployVersions = {\n upstream: string;\n packageVersion: string;\n debRevision: string;\n rpmRelease: string;\n epoch: number | null;\n};\n\ntype DeployArch = {\n deb: string;\n rpm: string;\n flatpak: string;\n appimage: string;\n node: DeployArchName;\n};\n\ntype DeployPaths = {\n root: string;\n dist: string;\n outDir: string;\n metadata: string;\n runtime: string;\n stage: string;\n overlay: string;\n targets: string;\n output: string;\n applicationIcon: ResolvedApplicationIcon;\n licenseFile: string | null;\n schemaFiles: string[];\n};\n\ntype DeploySettings = {\n applicationId: string;\n configFile: string;\n binaryName: string;\n name: string;\n genericName: string | null;\n summary: string;\n description: string[];\n keywords: string[];\n categories: string[];\n mimeTypes: string[];\n developer: DeployDeveloper;\n license: string;\n metadataLicense: string;\n copyright: string;\n homepage: string | null;\n urls: Record<string, string>;\n screenshots: DeployScreenshot[];\n branding: { light: string; dark: string } | null;\n contentRating: Record<string, string>;\n releases: DeployRelease[];\n execArgs: string[];\n execToken: string | null;\n fileAssociations: DeployFileAssociation[];\n protocols: string[];\n desktopActions: DeployDesktopAction[];\n desktopEntry: Record<string, string>;\n isDbusActivatable: boolean;\n extraFiles: DeployExtraFile[];\n versions: DeployVersions;\n arch: DeployArch;\n paths: DeployPaths;\n libraries: string[];\n minimumLibraryVersions: Record<string, string>;\n deploy: DeployConfig;\n};\n\ntype DeployPayload = {\n settings: DeploySettings;\n node: NodeRuntime | null;\n stage: StagedFile[];\n notices: NoticeSection[];\n overlays: Record<DeployTargetName, StagedFile[]>;\n};\n\ntype DeployManifest = {\n path: string;\n contents: string;\n};\n\ntype DeployArtifact = {\n path: string;\n size: number;\n};\n\ntype DeployTarget = {\n name: DeployTargetName;\n prefix: string;\n isHostOnly: boolean;\n tools: DeployTool[];\n render: (payload: DeployPayload) => DeployManifest[];\n pack: (payload: DeployPayload, manifests: DeployManifest[]) => Promise<DeployArtifact[]>;\n};\n\nexport type {\n DeployArch,\n DeployArchName,\n DeployArtifact,\n DeployConfig,\n DeployDesktopAction,\n DeployDeveloper,\n DeployExtraFile,\n DeployFileAssociation,\n DeployManifest,\n DeployPaths,\n DeployPayload,\n DeployRelease,\n DeployScreenshot,\n DeploySettings,\n DeployTarget,\n DeployTargetName,\n DeployTool,\n DeployVersions,\n NodeRuntime,\n Notice,\n NoticeSection,\n PackageFamily,\n StagedFile,\n};\n"]}
|
|
@@ -26,14 +26,14 @@ const resolveAppimageTooling = async (arch) => {
|
|
|
26
26
|
url: `${APPIMAGETOOL_URL}/appimagetool-${arch}.AppImage`,
|
|
27
27
|
dest: join(dir, `appimagetool-${arch}`),
|
|
28
28
|
label: `appimagetool ${APPIMAGETOOL_VERSION}`,
|
|
29
|
-
|
|
29
|
+
digest: digestFor(APPIMAGETOOL_DIGESTS, arch, "appimagetool"),
|
|
30
30
|
mode: EXECUTABLE_MODE,
|
|
31
31
|
});
|
|
32
32
|
const runtime = await downloadFile({
|
|
33
33
|
url: `${RUNTIME_URL}/runtime-${arch}`,
|
|
34
34
|
dest: join(dir, `runtime-${arch}`),
|
|
35
35
|
label: `the AppImage runtime ${RUNTIME_VERSION}`,
|
|
36
|
-
|
|
36
|
+
digest: digestFor(RUNTIME_DIGESTS, arch, "the AppImage runtime"),
|
|
37
37
|
mode: EXECUTABLE_MODE,
|
|
38
38
|
});
|
|
39
39
|
return { tool, runtime };
|
|
@@ -1 +1 @@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EAAE,CAAC;QACvC,KAAK,EAAE,gBAAgB,oBAAoB,EAAE;QAC7C,MAAM,EAAE,SAAS,CAAC,oBAAoB,EAAE,IAAI,EAAE,cAAc,CAAC;QAC7D,IAAI,EAAE,eAAe;KACxB,CAAC,CAAC;IAEH,MAAM,OAAO,GAAG,MAAM,YAAY,CAAC;QAC/B,GAAG,EAAE,GAAG,WAAW,YAAY,IAAI,EAAE;QACrC,IAAI,EAAE,IAAI,CAAC,GAAG,EAAE,WAAW,IAAI,EAAE,CAAC;QAClC,KAAK,EAAE,wBAAwB,eAAe,EAAE;QAChD,MAAM,EAAE,SAAS,CAAC,eAAe,EAAE,IAAI,EAAE,sBAAsB,CAAC;QAChE,IAAI,EAAE,eAAe;KACxB,CAAC,CAAC;IAEH,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;AAC7B,CAAC,CAAC;AAEF,OAAO,EAAE,sBAAsB,EAAE,CAAC","sourcesContent":["import { join } from \"node:path\";\nimport { cacheDir, downloadFile } from \"../download.js\";\n\ntype AppimageTooling = {\n tool: string;\n runtime: string;\n};\n\nconst APPIMAGETOOL_VERSION = \"1.9.1\";\nconst RUNTIME_VERSION = \"20251108\";\nconst APPIMAGETOOL_URL = `https://github.com/AppImage/appimagetool/releases/download/${APPIMAGETOOL_VERSION}`;\nconst RUNTIME_URL = `https://github.com/AppImage/type2-runtime/releases/download/${RUNTIME_VERSION}`;\nconst EXECUTABLE_MODE = 0o755;\n\nconst APPIMAGETOOL_DIGESTS: Record<string, string> = {\n aarch64: \"f0837e7448a0c1e4e650a93bb3e85802546e60654ef287576f46c71c126a9158\",\n x86_64: \"ed4ce84f0d9caff66f50bcca6ff6f35aae54ce8135408b3fa33abfc3cb384eb0\",\n};\n\nconst RUNTIME_DIGESTS: Record<string, string> = {\n aarch64: \"00cbdfcf917cc6c0ff6d3347d59e0ca1f7f45a6df1a428a0d6d8a78664d87444\",\n x86_64: \"2fca8b443c92510f1483a883f60061ad09b46b978b2631c807cd873a47ec260d\",\n};\n\nconst digestFor = (digests: Record<string, string>, arch: string, subject: string): string => {\n const digest = digests[arch];\n\n if (digest === undefined) {\n throw new Error(`${subject} has no pinned build for ${arch}`);\n }\n\n return digest;\n};\n\nconst resolveAppimageTooling = async (arch: string): Promise<AppimageTooling> => {\n const dir = cacheDir([\"appimage\", `${APPIMAGETOOL_VERSION}-${RUNTIME_VERSION}`]);\n\n const tool = await downloadFile({\n url: `${APPIMAGETOOL_URL}/appimagetool-${arch}.AppImage`,\n dest: join(dir, `appimagetool-${arch}`),\n label: `appimagetool ${APPIMAGETOOL_VERSION}`,\n
|
|
1
|
+
{"version":3,"file":"appimagetool.js","sourceRoot":"","sources":["../../../src/deploy/vendored/appimagetool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAOxD,MAAM,oBAAoB,GAAG,OAAO,CAAC;AACrC,MAAM,eAAe,GAAG,UAAU,CAAC;AACnC,MAAM,gBAAgB,GAAG,8DAA8D,oBAAoB,EAAE,CAAC;AAC9G,MAAM,WAAW,GAAG,+DAA+D,eAAe,EAAE,CAAC;AACrG,MAAM,eAAe,GAAG,KAAK,CAAC;AAE9B,MAAM,oBAAoB,GAA2B;IACjD,OAAO,EAAE,kEAAkE;IAC3E,MAAM,EAAE,kEAAkE;CAC7E,CAAC;AAEF,MAAM,eAAe,GAA2B;IAC5C,OAAO,EAAE,kEAAkE;IAC3E,MAAM,EAAE,kEAAkE;CAC7E,CAAC;AAEF,MAAM,SAAS,GAAG,CAAC,OAA+B,EAAE,IAAY,EAAE,OAAe,EAAU,EAAE;IACzF,MAAM,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAE7B,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;QACvB,MAAM,IAAI,KAAK,CAAC,GAAG,OAAO,4BAA4B,IAAI,EAAE,CAAC,CAAC;IAClE,CAAC;IAED,OAAO,MAAM,CAAC;AAClB,CAAC,CAAC;AAEF,MAAM,sBAAsB,GAAG,KAAK,EAAE,IAAY,EAA4B,EAAE;IAC5E,MAAM,GAAG,GAAG,QAAQ,CAAC,CAAC,UAAU,EAAE,GAAG,oBAAoB,IAAI,eAAe,EAAE,CAAC,CAAC,CAAC;IAEjF,MAAM,IAAI,GAAG,MAAM,YAAY,CAAC;QAC5B,GAAG,EAAE,GAAG,gBAAgB,iBAAiB,IAAI,WAAW;QACxD,IAAI,EAAE,IAAI,CAAC,GAAG,EAAE,gBAAgB,IAAI,EAAE,CAAC;QACvC,KAAK,EAAE,gBAAgB,oBAAoB,EAAE;QAC7C,MAAM,EAAE,SAAS,CAAC,oBAAoB,EAAE,IAAI,EAAE,cAAc,CAAC;QAC7D,IAAI,EAAE,eAAe;KACxB,CAAC,CAAC;IAEH,MAAM,OAAO,GAAG,MAAM,YAAY,CAAC;QAC/B,GAAG,EAAE,GAAG,WAAW,YAAY,IAAI,EAAE;QACrC,IAAI,EAAE,IAAI,CAAC,GAAG,EAAE,WAAW,IAAI,EAAE,CAAC;QAClC,KAAK,EAAE,wBAAwB,eAAe,EAAE;QAChD,MAAM,EAAE,SAAS,CAAC,eAAe,EAAE,IAAI,EAAE,sBAAsB,CAAC;QAChE,IAAI,EAAE,eAAe;KACxB,CAAC,CAAC;IAEH,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;AAC7B,CAAC,CAAC;AAEF,OAAO,EAAE,sBAAsB,EAAE,CAAC","sourcesContent":["import { join } from \"node:path\";\nimport { cacheDir, downloadFile } from \"../download.js\";\n\ntype AppimageTooling = {\n tool: string;\n runtime: string;\n};\n\nconst APPIMAGETOOL_VERSION = \"1.9.1\";\nconst RUNTIME_VERSION = \"20251108\";\nconst APPIMAGETOOL_URL = `https://github.com/AppImage/appimagetool/releases/download/${APPIMAGETOOL_VERSION}`;\nconst RUNTIME_URL = `https://github.com/AppImage/type2-runtime/releases/download/${RUNTIME_VERSION}`;\nconst EXECUTABLE_MODE = 0o755;\n\nconst APPIMAGETOOL_DIGESTS: Record<string, string> = {\n aarch64: \"f0837e7448a0c1e4e650a93bb3e85802546e60654ef287576f46c71c126a9158\",\n x86_64: \"ed4ce84f0d9caff66f50bcca6ff6f35aae54ce8135408b3fa33abfc3cb384eb0\",\n};\n\nconst RUNTIME_DIGESTS: Record<string, string> = {\n aarch64: \"00cbdfcf917cc6c0ff6d3347d59e0ca1f7f45a6df1a428a0d6d8a78664d87444\",\n x86_64: \"2fca8b443c92510f1483a883f60061ad09b46b978b2631c807cd873a47ec260d\",\n};\n\nconst digestFor = (digests: Record<string, string>, arch: string, subject: string): string => {\n const digest = digests[arch];\n\n if (digest === undefined) {\n throw new Error(`${subject} has no pinned build for ${arch}`);\n }\n\n return digest;\n};\n\nconst resolveAppimageTooling = async (arch: string): Promise<AppimageTooling> => {\n const dir = cacheDir([\"appimage\", `${APPIMAGETOOL_VERSION}-${RUNTIME_VERSION}`]);\n\n const tool = await downloadFile({\n url: `${APPIMAGETOOL_URL}/appimagetool-${arch}.AppImage`,\n dest: join(dir, `appimagetool-${arch}`),\n label: `appimagetool ${APPIMAGETOOL_VERSION}`,\n digest: digestFor(APPIMAGETOOL_DIGESTS, arch, \"appimagetool\"),\n mode: EXECUTABLE_MODE,\n });\n\n const runtime = await downloadFile({\n url: `${RUNTIME_URL}/runtime-${arch}`,\n dest: join(dir, `runtime-${arch}`),\n label: `the AppImage runtime ${RUNTIME_VERSION}`,\n digest: digestFor(RUNTIME_DIGESTS, arch, \"the AppImage runtime\"),\n mode: EXECUTABLE_MODE,\n });\n\n return { tool, runtime };\n};\n\nexport { resolveAppimageTooling };\n"]}
|
|
@@ -43,7 +43,7 @@ const downloadNfpm = async (dir, binary) => {
|
|
|
43
43
|
url: `${NFPM_BASE_URL}/${assetName}`,
|
|
44
44
|
dest: join(dir, assetName),
|
|
45
45
|
label: `nfpm ${NFPM_VERSION}`,
|
|
46
|
-
|
|
46
|
+
digest: digestFor(process.arch),
|
|
47
47
|
});
|
|
48
48
|
extractNfpm(archive, binary);
|
|
49
49
|
return binary;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nfpm.js","sourceRoot":"","sources":["../../../src/deploy/vendored/nfpm.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAC1D,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAC5D,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAExD,MAAM,YAAY,GAAG,QAAQ,CAAC;AAC9B,MAAM,aAAa,GAAG,yDAAyD,YAAY,EAAE,CAAC;AAE9F,MAAM,eAAe,GAA2B;IAC5C,KAAK,EAAE,OAAO;IACd,GAAG,EAAE,QAAQ;CAChB,CAAC;AAEF,MAAM,YAAY,GAA2B;IACzC,KAAK,EAAE,kEAAkE;IACzE,MAAM,EAAE,kEAAkE;CAC7E,CAAC;AAEF,MAAM,YAAY,GAAG,CAAC,IAAY,EAAU,EAAE;IAC1C,MAAM,SAAS,GAAG,eAAe,CAAC,IAAI,CAAC,CAAC;IAExC,IAAI,SAAS,KAAK,SAAS,EAAE,CAAC;QAC1B,MAAM,IAAI,KAAK,CAAC,+BAA+B,IAAI,EAAE,CAAC,CAAC;IAC3D,CAAC;IAED,OAAO,SAAS,CAAC;AACrB,CAAC,CAAC;AAEF,MAAM,YAAY,GAAG,CAAC,IAAY,EAAU,EAAE,CAAC,QAAQ,YAAY,UAAU,YAAY,CAAC,IAAI,CAAC,SAAS,CAAC;AAEzG,MAAM,SAAS,GAAG,CAAC,IAAY,EAAU,EAAE;IACvC,MAAM,MAAM,GAAG,YAAY,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC;IAEhD,IAAI,MAAM,KAAK,SAAS,EAAE,CA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,GAAG,KAAK,IAAqB,EAAE;IAC5C,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC;IAEvC,IAAI,QAAQ,KAAK,SAAS,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAChD,OAAO,QAAQ,CAAC;IACpB,CAAC;IAED,MAAM,GAAG,GAAG,QAAQ,CAAC,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC,CAAC;IAE7C,OAAO,YAAY,CAAC,GAAG,EAAE,IAAI,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC,CAAC;AAChD,CAAC,CAAC;AAEF,OAAO,EAAE,WAAW,EAAE,CAAC","sourcesContent":["import { mkdtempSync, renameSync, rmSync } from \"node:fs\";\nimport { join } from \"node:path\";\nimport { runCliTool } from \"../../internal/run-cli-tool.js\";\nimport { cacheDir, downloadFile } from \"../download.js\";\n\nconst NFPM_VERSION = \"2.47.0\";\nconst NFPM_BASE_URL = `https://github.com/goreleaser/nfpm/releases/download/v${NFPM_VERSION}`;\n\nconst NFPM_ASSET_ARCH: Record<string, string> = {\n arm64: \"arm64\",\n x64: \"x86_64\",\n};\n\nconst NFPM_DIGESTS: Record<string, string> = {\n arm64: \"1c0f5f2999b9a974bfb04fdb0cc3306096de530ac5dbb25d739cc5f5219c919c\",\n x86_64: \"0660ca602b2d2d2ae4781a06c692b3eeb9d437ffea05b831d76e41f4a3188783\",\n};\n\nconst assetArchFor = (arch: string): string => {\n const assetArch = NFPM_ASSET_ARCH[arch];\n\n if (assetArch === undefined) {\n throw new Error(`nfpm has no Linux build for ${arch}`);\n }\n\n return assetArch;\n};\n\nconst assetNameFor = (arch: string): string => `nfpm_${NFPM_VERSION}_Linux_${assetArchFor(arch)}.tar.gz`;\n\nconst digestFor = (arch: string): string => {\n const digest = NFPM_DIGESTS[assetArchFor(arch)];\n\n if (digest === undefined) {\n throw new Error(`nfpm ${NFPM_VERSION} has no pinned digest for ${arch}`);\n }\n\n return digest;\n};\n\nconst extractNfpm = (archive: string, binary: string): void => {\n const dir = mkdtempSync(`${binary}-`);\n\n try {\n runCliTool({ tool: \"tar\", args: [\"-xzf\", archive, \"-C\", dir, \"nfpm\"], target: assetNameFor(process.arch) });\n renameSync(join(dir, \"nfpm\"), binary);\n } finally {\n rmSync(dir, { recursive: true, force: true, maxRetries: 5 });\n }\n};\n\nconst downloadNfpm = async (dir: string, binary: string): Promise<string> => {\n const assetName = assetNameFor(process.arch);\n\n const archive = await downloadFile({\n url: `${NFPM_BASE_URL}/${assetName}`,\n dest: join(dir, assetName),\n label: `nfpm ${NFPM_VERSION}`,\n
|
|
1
|
+
{"version":3,"file":"nfpm.js","sourceRoot":"","sources":["../../../src/deploy/vendored/nfpm.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAC1D,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAC5D,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAExD,MAAM,YAAY,GAAG,QAAQ,CAAC;AAC9B,MAAM,aAAa,GAAG,yDAAyD,YAAY,EAAE,CAAC;AAE9F,MAAM,eAAe,GAA2B;IAC5C,KAAK,EAAE,OAAO;IACd,GAAG,EAAE,QAAQ;CAChB,CAAC;AAEF,MAAM,YAAY,GAA2B;IACzC,KAAK,EAAE,kEAAkE;IACzE,MAAM,EAAE,kEAAkE;CAC7E,CAAC;AAEF,MAAM,YAAY,GAAG,CAAC,IAAY,EAAU,EAAE;IAC1C,MAAM,SAAS,GAAG,eAAe,CAAC,IAAI,CAAC,CAAC;IAExC,IAAI,SAAS,KAAK,SAAS,EAAE,CAAC;QAC1B,MAAM,IAAI,KAAK,CAAC,+BAA+B,IAAI,EAAE,CAAC,CAAC;IAC3D,CAAC;IAED,OAAO,SAAS,CAAC;AACrB,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S,EAAE;QACpC,IAAI,EAAE,IAAI,CAAC,GAAG,EAAE,SAAS,CAAC;QAC1B,KAAK,EAAE,QAAQ,YAAY,EAAE;QAC7B,MAAM,EAAE,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC;KAClC,CAAC,CAAC;IAEH,WAAW,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;IAE7B,OAAO,MAAM,CAAC;AAClB,CAAC,CAAC;AAEF,MAAM,WAAW,GAAG,KAAK,IAAqB,EAAE;IAC5C,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC;IAEvC,IAAI,QAAQ,KAAK,SAAS,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAChD,OAAO,QAAQ,CAAC;IACpB,CAAC;IAED,MAAM,GAAG,GAAG,QAAQ,CAAC,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC,CAAC;IAE7C,OAAO,YAAY,CAAC,GAAG,EAAE,IAAI,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC,CAAC;AAChD,CAAC,CAAC;AAEF,OAAO,EAAE,WAAW,EAAE,CAAC","sourcesContent":["import { mkdtempSync, renameSync, rmSync } from \"node:fs\";\nimport { join } from \"node:path\";\nimport { runCliTool } from \"../../internal/run-cli-tool.js\";\nimport { cacheDir, downloadFile } from \"../download.js\";\n\nconst NFPM_VERSION = \"2.47.0\";\nconst NFPM_BASE_URL = `https://github.com/goreleaser/nfpm/releases/download/v${NFPM_VERSION}`;\n\nconst NFPM_ASSET_ARCH: Record<string, string> = {\n arm64: \"arm64\",\n x64: \"x86_64\",\n};\n\nconst NFPM_DIGESTS: Record<string, string> = {\n arm64: \"1c0f5f2999b9a974bfb04fdb0cc3306096de530ac5dbb25d739cc5f5219c919c\",\n x86_64: \"0660ca602b2d2d2ae4781a06c692b3eeb9d437ffea05b831d76e41f4a3188783\",\n};\n\nconst assetArchFor = (arch: string): string => {\n const assetArch = NFPM_ASSET_ARCH[arch];\n\n if (assetArch === undefined) {\n throw new Error(`nfpm has no Linux build for ${arch}`);\n }\n\n return assetArch;\n};\n\nconst assetNameFor = (arch: string): string => `nfpm_${NFPM_VERSION}_Linux_${assetArchFor(arch)}.tar.gz`;\n\nconst digestFor = (arch: string): string => {\n const digest = NFPM_DIGESTS[assetArchFor(arch)];\n\n if (digest === undefined) {\n throw new Error(`nfpm ${NFPM_VERSION} has no pinned digest for ${arch}`);\n }\n\n return digest;\n};\n\nconst extractNfpm = (archive: string, binary: string): void => {\n const dir = mkdtempSync(`${binary}-`);\n\n try {\n runCliTool({ tool: \"tar\", args: [\"-xzf\", archive, \"-C\", dir, \"nfpm\"], target: assetNameFor(process.arch) });\n renameSync(join(dir, \"nfpm\"), binary);\n } finally {\n rmSync(dir, { recursive: true, force: true, maxRetries: 5 });\n }\n};\n\nconst downloadNfpm = async (dir: string, binary: string): Promise<string> => {\n const assetName = assetNameFor(process.arch);\n\n const archive = await downloadFile({\n url: `${NFPM_BASE_URL}/${assetName}`,\n dest: join(dir, assetName),\n label: `nfpm ${NFPM_VERSION}`,\n digest: digestFor(process.arch),\n });\n\n extractNfpm(archive, binary);\n\n return binary;\n};\n\nconst resolveNfpm = async (): Promise<string> => {\n const override = process.env.GTKX_NFPM;\n\n if (override !== undefined && override.length > 0) {\n return override;\n }\n\n const dir = cacheDir([\"nfpm\", NFPM_VERSION]);\n\n return downloadNfpm(dir, join(dir, \"nfpm\"));\n};\n\nexport { resolveNfpm };\n"]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { WrittenCatalog } from "../i18n/catalogs.js";
|
|
2
|
+
type CatalogWrites = {
|
|
3
|
+
record: (catalogs: WrittenCatalog[]) => void;
|
|
4
|
+
hasWritten: (path: string) => boolean;
|
|
5
|
+
};
|
|
6
|
+
declare const createCatalogWrites: () => CatalogWrites;
|
|
7
|
+
export { type CatalogWrites, createCatalogWrites };
|
|
8
|
+
//# sourceMappingURL=catalog-writes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"catalog-writes.d.ts","sourceRoot":"","sources":["../../src/dev/catalog-writes.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAE1D,KAAK,aAAa,GAAG;IACjB,MAAM,EAAE,CAAC,QAAQ,EAAE,cAAc,EAAE,KAAK,IAAI,CAAC;IAC7C,UAAU,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC;CACzC,CAAC;AAUF,QAAA,MAAM,mBAAmB,QAAO,aAe/B,CAAC;AAEF,OAAO,EAAE,KAAK,aAAa,EAAE,mBAAmB,EAAE,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { readFileSync } from "node:fs";
|
|
2
|
+
import { resolve } from "node:path";
|
|
3
|
+
const hasContent = (path, content) => {
|
|
4
|
+
try {
|
|
5
|
+
return readFileSync(path).equals(content);
|
|
6
|
+
}
|
|
7
|
+
catch {
|
|
8
|
+
return false;
|
|
9
|
+
}
|
|
10
|
+
};
|
|
11
|
+
const createCatalogWrites = () => {
|
|
12
|
+
const contents = new Map();
|
|
13
|
+
return {
|
|
14
|
+
record: (catalogs) => {
|
|
15
|
+
for (const catalog of catalogs) {
|
|
16
|
+
contents.set(resolve(catalog.path), catalog.content);
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
hasWritten: (path) => {
|
|
20
|
+
const content = contents.get(resolve(path));
|
|
21
|
+
return content !== undefined && hasContent(path, content);
|
|
22
|
+
},
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
export { createCatalogWrites };
|
|
26
|
+
//# sourceMappingURL=catalog-writes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"catalog-writes.js","sourceRoot":"","sources":["../../src/dev/catalog-writes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAQpC,MAAM,UAAU,GAAG,CAAC,IAAY,EAAE,OAAe,EAAW,EAAE;IAC1D,IAAI,CAAC;QACD,OAAO,YAAY,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IAC9C,CAAC;IAAC,MAAM,CAAC;QACL,OAAO,KAAK,CAAC;IACjB,CAAC;AACL,CAAC,CAAC;AAEF,MAAM,mBAAmB,GAAG,GAAkB,EAAE;IAC5C,MAAM,QAAQ,GAAwB,IAAI,GAAG,EAAE,CAAC;IAEhD,OAAO;QACH,MAAM,EAAE,CAAC,QAAQ,EAAE,EAAE;YACjB,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE,CAAC;gBAC7B,QAAQ,CAAC,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;YACzD,CAAC;QACL,CAAC;QACD,UAAU,EAAE,CAAC,IAAI,EAAE,EAAE;YACjB,MAAM,OAAO,GAAG,QAAQ,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;YAE5C,OAAO,OAAO,KAAK,SAAS,IAAI,UAAU,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QAC9D,CAAC;KACJ,CAAC;AACN,CAAC,CAAC;AAEF,OAAO,EAAsB,mBAAmB,EAAE,CAAC","sourcesContent":["import { readFileSync } from \"node:fs\";\nimport { resolve } from \"node:path\";\nimport type { WrittenCatalog } from \"../i18n/catalogs.js\";\n\ntype CatalogWrites = {\n record: (catalogs: WrittenCatalog[]) => void;\n hasWritten: (path: string) => boolean;\n};\n\nconst hasContent = (path: string, content: Buffer): boolean => {\n try {\n return readFileSync(path).equals(content);\n } catch {\n return false;\n }\n};\n\nconst createCatalogWrites = (): CatalogWrites => {\n const contents: Map<string, Buffer> = new Map();\n\n return {\n record: (catalogs) => {\n for (const catalog of catalogs) {\n contents.set(resolve(catalog.path), catalog.content);\n }\n },\n hasWritten: (path) => {\n const content = contents.get(resolve(path));\n\n return content !== undefined && hasContent(path, content);\n },\n };\n};\n\nexport { type CatalogWrites, createCatalogWrites };\n"]}
|
package/dist/dev/entry-env.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entry-env.d.ts","sourceRoot":"","sources":["../../src/dev/entry-env.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,aAAa,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"entry-env.d.ts","sourceRoot":"","sources":["../../src/dev/entry-env.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,aAAa,mBAAmB,CAAC;AACvC,QAAA,MAAM,cAAc,oBAAoB,CAAC;AAEzC,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,CAAC"}
|
package/dist/dev/entry-env.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entry-env.js","sourceRoot":"","sources":["../../src/dev/entry-env.ts"],"names":[],"mappings":"AAAA,MAAM,aAAa,GAAG,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"entry-env.js","sourceRoot":"","sources":["../../src/dev/entry-env.ts"],"names":[],"mappings":"AAAA,MAAM,aAAa,GAAG,gBAAgB,CAAC;AACvC,MAAM,cAAc,GAAG,iBAAiB,CAAC;AAEzC,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,CAAC","sourcesContent":["const DEV_ENTRY_ENV = \"GTKX_DEV_ENTRY\";\nconst DEV_CONFIG_ENV = \"GTKX_DEV_CONFIG\";\n\nexport { DEV_CONFIG_ENV, DEV_ENTRY_ENV };\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"font-dir.d.ts","sourceRoot":"","sources":["../../src/dev/font-dir.ts"],"names":[],"mappings":"AAGA,QAAA,MAAM,iBAAiB,GAAI,MAAM,MAAM,KAAG,MAKzC,CAAC;AAEF,OAAO,EAAE,iBAAiB,EAAE,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { stageProjectFonts } from "../internal/font-staging.js";
|
|
2
|
+
import { prependXdgDataDir } from "../internal/xdg-data-dirs.js";
|
|
3
|
+
const prepareDevFontDir = (root) => {
|
|
4
|
+
const shareDir = stageProjectFonts(root);
|
|
5
|
+
process.env.XDG_DATA_DIRS = prependXdgDataDir(shareDir, process.env.XDG_DATA_DIRS);
|
|
6
|
+
return shareDir;
|
|
7
|
+
};
|
|
8
|
+
export { prepareDevFontDir };
|
|
9
|
+
//# sourceMappingURL=font-dir.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"font-dir.js","sourceRoot":"","sources":["../../src/dev/font-dir.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AAEjE,MAAM,iBAAiB,GAAG,CAAC,IAAY,EAAU,EAAE;IAC/C,MAAM,QAAQ,GAAG,iBAAiB,CAAC,IAAI,CAAC,CAAC;IACzC,OAAO,CAAC,GAAG,CAAC,aAAa,GAAG,iBAAiB,CAAC,QAAQ,EAAE,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;IAEnF,OAAO,QAAQ,CAAC;AACpB,CAAC,CAAC;AAEF,OAAO,EAAE,iBAAiB,EAAE,CAAC","sourcesContent":["import { stageProjectFonts } from \"../internal/font-staging.js\";\nimport { prependXdgDataDir } from \"../internal/xdg-data-dirs.js\";\n\nconst prepareDevFontDir = (root: string): string => {\n const shareDir = stageProjectFonts(root);\n process.env.XDG_DATA_DIRS = prependXdgDataDir(shareDir, process.env.XDG_DATA_DIRS);\n\n return shareDir;\n};\n\nexport { prepareDevFontDir };\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"headless.d.ts","sourceRoot":"","sources":["../../src/dev/headless.ts"],"names":[],"mappings":"AAWA,QAAA,MAAM,uBAAuB,GAAU,OAAO,MAAM,KAAG,OAAO,CAAC,MAAM,IAAI,CA0BxE,CAAC;AAEF,OAAO,EAAE,uBAAuB,EAAE,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { MCP_SOCKET_PATH_ENV, resolveMcpSocketPath } from "@gtkx/mcp/internal";
|
|
2
|
+
import { resolveHeadlessOptions, startHeadlessDisplay } from "@gtkx/vitest/headless";
|
|
3
|
+
const restoreEnvironment = (name, value) => {
|
|
4
|
+
if (value === undefined) {
|
|
5
|
+
Reflect.deleteProperty(process.env, name);
|
|
6
|
+
}
|
|
7
|
+
else {
|
|
8
|
+
process.env[name] = value;
|
|
9
|
+
}
|
|
10
|
+
};
|
|
11
|
+
const startHeadlessDevDisplay = async (size) => {
|
|
12
|
+
const previousSocketPath = process.env[MCP_SOCKET_PATH_ENV];
|
|
13
|
+
process.env[MCP_SOCKET_PATH_ENV] = resolveMcpSocketPath();
|
|
14
|
+
try {
|
|
15
|
+
const stopDisplay = await startHeadlessDisplay(resolveHeadlessOptions({ ...(size !== undefined && { size }) }));
|
|
16
|
+
let isStopped = false;
|
|
17
|
+
const stop = () => {
|
|
18
|
+
if (isStopped) {
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
isStopped = true;
|
|
22
|
+
process.removeListener("exit", stop);
|
|
23
|
+
stopDisplay();
|
|
24
|
+
restoreEnvironment(MCP_SOCKET_PATH_ENV, previousSocketPath);
|
|
25
|
+
};
|
|
26
|
+
process.once("exit", stop);
|
|
27
|
+
return stop;
|
|
28
|
+
}
|
|
29
|
+
catch (error) {
|
|
30
|
+
restoreEnvironment(MCP_SOCKET_PATH_ENV, previousSocketPath);
|
|
31
|
+
throw error;
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
export { startHeadlessDevDisplay };
|
|
35
|
+
//# sourceMappingURL=headless.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"headless.js","sourceRoot":"","sources":["../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CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACb,kBAAkB,CAAC,mBAAmB,EAAE,kBAAkB,CAAC,CAAC;QAC5D,MAAM,KAAK,CAAC;IAChB,CAAC;AACL,CAAC,CAAC;AAEF,OAAO,EAAE,uBAAuB,EAAE,CAAC","sourcesContent":["import { MCP_SOCKET_PATH_ENV, resolveMcpSocketPath } from \"@gtkx/mcp/internal\";\nimport { resolveHeadlessOptions, startHeadlessDisplay } from \"@gtkx/vitest/headless\";\n\nconst restoreEnvironment = (name: string, value: string | undefined): void => {\n if (value === undefined) {\n Reflect.deleteProperty(process.env, name);\n } else {\n process.env[name] = value;\n }\n};\n\nconst startHeadlessDevDisplay = async (size?: string): Promise<() => void> => {\n const previousSocketPath = process.env[MCP_SOCKET_PATH_ENV];\n process.env[MCP_SOCKET_PATH_ENV] = resolveMcpSocketPath();\n\n try {\n const stopDisplay = await startHeadlessDisplay(resolveHeadlessOptions({ ...(size !== undefined && { size }) }));\n let isStopped = false;\n\n const stop = (): void => {\n if (isStopped) {\n return;\n }\n\n isStopped = true;\n process.removeListener(\"exit\", stop);\n stopDisplay();\n restoreEnvironment(MCP_SOCKET_PATH_ENV, previousSocketPath);\n };\n\n process.once(\"exit\", stop);\n\n return stop;\n } catch (error) {\n restoreEnvironment(MCP_SOCKET_PATH_ENV, previousSocketPath);\n throw error;\n }\n};\n\nexport { startHeadlessDevDisplay };\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { DevRunnerDeps } from "./runner.js";
|
|
2
|
-
declare const defaultDevRunnerDeps: () => DevRunnerDeps;
|
|
2
|
+
declare const defaultDevRunnerDeps: (configFile: string, deployOutDir: string | undefined) => DevRunnerDeps;
|
|
3
3
|
export { defaultDevRunnerDeps };
|
|
4
4
|
//# sourceMappingURL=runner-deps.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runner-deps.d.ts","sourceRoot":"","sources":["../../src/dev/runner-deps.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"runner-deps.d.ts","sourceRoot":"","sources":["../../src/dev/runner-deps.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAoGjD,QAAA,MAAM,oBAAoB,GAAI,YAAY,MAAM,EAAE,cAAc,MAAM,GAAG,SAAS,KAAG,aACb,CAAC;AAEzE,OAAO,EAAE,oBAAoB,EAAE,CAAC"}
|
package/dist/dev/runner-deps.js
CHANGED
|
@@ -11,6 +11,7 @@ import { isRefreshBoundary, performRefresh, staleExportName } from "../refresh-r
|
|
|
11
11
|
import { gtkxFastRefresh } from "../vite-plugins/fast-refresh/swc-refresh.js";
|
|
12
12
|
import { gtkxVitePlugins } from "../vite-plugins/index.js";
|
|
13
13
|
import { gtkxReactDomPrebundle } from "../vite-plugins/react-dom-prebundle.js";
|
|
14
|
+
import { createCatalogWrites } from "./catalog-writes.js";
|
|
14
15
|
const DEV_MODE = "development";
|
|
15
16
|
const APPLICATION_POLL_INTERVAL_MS = 50;
|
|
16
17
|
const currentApplicationId = () => Gio.Application.getDefault()?.applicationId ?? null;
|
|
@@ -28,11 +29,16 @@ const waitForApplicationId = async (timeoutMs, shouldKeepWaiting) => {
|
|
|
28
29
|
return applicationId;
|
|
29
30
|
};
|
|
30
31
|
const readFileRevision = (path) => readFile(path, "utf8");
|
|
31
|
-
const
|
|
32
|
+
const devPlugins = (configFile, catalogWrites) => (entryPath) => [
|
|
33
|
+
...gtkxVitePlugins({ mode: DEV_MODE, entryPath, configFile, onCatalogsWritten: catalogWrites.record }),
|
|
34
|
+
...gtkxFastRefresh(),
|
|
35
|
+
gtkxReactDomPrebundle(),
|
|
36
|
+
];
|
|
37
|
+
const createDevRunnerDeps = (configFile, deployOutDir, catalogWrites) => ({
|
|
32
38
|
createServer,
|
|
33
39
|
waitForApplicationId,
|
|
34
40
|
getConfiguredApplicationId: async (root) => {
|
|
35
|
-
const loaded = await loadConfig(root, { mode: DEV_MODE });
|
|
41
|
+
const loaded = await loadConfig(root, { mode: DEV_MODE, configFile });
|
|
36
42
|
return loaded.config.applicationId;
|
|
37
43
|
},
|
|
38
44
|
startMcpClient: (applicationId, loadAppModule) => {
|
|
@@ -67,13 +73,12 @@ const defaultDevRunnerDeps = () => ({
|
|
|
67
73
|
isRefreshBoundary,
|
|
68
74
|
staleExportName,
|
|
69
75
|
readFileRevision,
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
gtkxReactDomPrebundle(),
|
|
74
|
-
],
|
|
76
|
+
hasWrittenCatalog: catalogWrites.hasWritten,
|
|
77
|
+
deployOutDir,
|
|
78
|
+
plugins: devPlugins(configFile, catalogWrites),
|
|
75
79
|
log: info,
|
|
76
80
|
exit: (code) => process.exit(code),
|
|
77
81
|
});
|
|
82
|
+
const defaultDevRunnerDeps = (configFile, deployOutDir) => createDevRunnerDeps(configFile, deployOutDir, createCatalogWrites());
|
|
78
83
|
export { defaultDevRunnerDeps };
|
|
79
84
|
//# sourceMappingURL=runner-deps.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runner-deps.js","sourceRoot":"","sources":["../../src/dev/runner-deps.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,KAAK,GAAG,MAAM,cAAc,CAAC;AACpC,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAA4B,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAC1F,OAAO,EAAE,IAAI,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAC;AAC5D,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,MAAM,CAAC;AAEpC,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAA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EAAE,GAAG,EAAE;QACzB,MAAM,WAAW,GAAG,GAAG,CAAC,WAAW,CAAC,UAAU,EAAE,CAAC;QAEjD,IAAI,WAAW,EAAE,CAAC;YACd,eAAe,CAAC,WAAW,CAAC,CAAC;QACjC,CAAC;IACL,CAAC;IACD,cAAc;IACd,iBAAiB;IACjB,eAAe;IACf,gBAAgB;IAChB,iBAAiB,EAAE,aAAa,CAAC,UAAU;IAC3C,YAAY;IACZ,OAAO,EAAE,UAAU,CAAC,UAAU,EAAE,aAAa,CAAC;IAC9C,GAAG,EAAE,IAAI;IACT,IAAI,EAAE,CAAC,IAAY,EAAS,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC;CACpD,CAAC,CAAC;AAEH,MAAM,oBAAoB,GAAG,CAAC,UAAkB,EAAE,YAAgC,EAAiB,EAAE,CACjG,mBAAmB,CAAC,UAAU,EAAE,YAAY,EAAE,mBAAmB,EAAE,CAAC,CAAC;AAEzE,OAAO,EAAE,oBAAoB,EAAE,CAAC","sourcesContent":["import { loadConfig } from \"@gtkx/config\";\nimport * as Gio from \"@gtkx/gi/gio\";\nimport { quitApplication } from \"@gtkx/runtime\";\nimport { type ApplicationInstance, getApplicationInstance } from \"@gtkx/runtime/internal\";\nimport { info, installGracefulShutdown } from \"@gtkx/utils\";\nimport { readFile } from \"node:fs/promises\";\nimport { createServer } from \"vite\";\nimport type { DevRunnerDeps } from \"./runner.js\";\nimport { startMcpClient, stopMcpClient } from \"../mcp/index.js\";\nimport {\n mergeTestingModule,\n setTestingModuleLoader,\n type TestingInternalModule,\n type TestingPublicModule,\n} from \"../mcp/testing-loader.js\";\nimport { isRefreshBoundary, performRefresh, staleExportName } from \"../refresh-runtime.js\";\nimport { gtkxFastRefresh } from \"../vite-plugins/fast-refresh/swc-refresh.js\";\nimport { gtkxVitePlugins } from \"../vite-plugins/index.js\";\nimport { gtkxReactDomPrebundle } from \"../vite-plugins/react-dom-prebundle.js\";\nimport { type CatalogWrites, createCatalogWrites } from \"./catalog-writes.js\";\n\nconst DEV_MODE = \"development\";\nconst APPLICATION_POLL_INTERVAL_MS = 50;\n\nconst currentApplicationId = (): string | null => Gio.Application.getDefault()?.applicationId ?? null;\n\nconst currentApplicationInstance = (): ApplicationInstance => {\n const application = Gio.Application.getDefault();\n\n return application === null ? \"unregistered\" : getApplicationInstance(application);\n};\n\nconst waitForApplicationId = async (timeoutMs: number, shouldKeepWaiting: () => boolean): Promise<string | null> => {\n const deadline = Date.now() + timeoutMs;\n let applicationId = currentApplicationId();\n\n while (applicationId === null && Date.now() < deadline && shouldKeepWaiting()) {\n await new Promise((resolve) => setTimeout(resolve, APPLICATION_POLL_INTERVAL_MS));\n applicationId = currentApplicationId();\n }\n\n return applicationId;\n};\n\nconst readFileRevision = (path: string): Promise<string> => readFile(path, \"utf8\");\n\nconst devPlugins = (configFile: string, catalogWrites: CatalogWrites): DevRunnerDeps[\"plugins\"] =>\n (entryPath) => [\n ...gtkxVitePlugins({ mode: DEV_MODE, entryPath, configFile, onCatalogsWritten: catalogWrites.record }),\n ...gtkxFastRefresh(),\n gtkxReactDomPrebundle(),\n ];\n\nconst createDevRunnerDeps = (\n configFile: string,\n deployOutDir: string | undefined,\n catalogWrites: CatalogWrites,\n): DevRunnerDeps => ({\n createServer,\n waitForApplicationId,\n getConfiguredApplicationId: async (root: string) => {\n const loaded = await loadConfig(root, { mode: DEV_MODE, configFile });\n\n return loaded.config.applicationId;\n },\n startMcpClient: (applicationId, loadAppModule) => {\n setTestingModuleLoader(async () => {\n const [publicApi, internals] = await Promise.all([\n loadAppModule(\"@gtkx/testing\") as Promise<TestingPublicModule>,\n loadAppModule(\"@gtkx/testing/internal\") as Promise<TestingInternalModule>,\n ]);\n\n return mergeTestingModule(publicApi, internals);\n });\n\n return startMcpClient(applicationId);\n },\n stopMcpClient,\n watchApplicationShutdown: (onShutdown) => {\n Gio.Application.getDefault()?.on(\"shutdown\", onShutdown);\n },\n watchUncaughtErrors: (onUncaughtError) => {\n process.on(\"uncaughtException\", onUncaughtError);\n process.on(\"unhandledRejection\", onUncaughtError);\n },\n getApplicationInstance: currentApplicationInstance,\n installShutdownHandlers: (onSignal) => {\n installGracefulShutdown({ onSignal });\n },\n quitDefaultApplication: () => {\n const application = Gio.Application.getDefault();\n\n if (application) {\n quitApplication(application);\n }\n },\n performRefresh,\n isRefreshBoundary,\n staleExportName,\n readFileRevision,\n hasWrittenCatalog: catalogWrites.hasWritten,\n deployOutDir,\n plugins: devPlugins(configFile, catalogWrites),\n log: info,\n exit: (code: number): never => process.exit(code),\n});\n\nconst defaultDevRunnerDeps = (configFile: string, deployOutDir: string | undefined): DevRunnerDeps =>\n createDevRunnerDeps(configFile, deployOutDir, createCatalogWrites());\n\nexport { defaultDevRunnerDeps };\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runner-main.d.ts","sourceRoot":"","sources":["../../src/dev/runner-main.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"runner-main.d.ts","sourceRoot":"","sources":["../../src/dev/runner-main.ts"],"names":[],"mappings":"AAUA,QAAA,MAAM,IAAI,QAAa,OAAO,CAAC,IAAI,CA+BlC,CAAC;AAEF,OAAO,EAAE,IAAI,EAAE,CAAC"}
|
package/dist/dev/runner-main.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { loadConfig } from "@gtkx/config";
|
|
2
2
|
import { error } from "@gtkx/utils";
|
|
3
3
|
import { resolve } from "node:path";
|
|
4
|
-
import { DEV_ENTRY_ENV } from "./entry-env.js";
|
|
4
|
+
import { DEV_CONFIG_ENV, DEV_ENTRY_ENV } from "./entry-env.js";
|
|
5
|
+
import { prepareDevFontDir } from "./font-dir.js";
|
|
5
6
|
import { prepareDevIconDir } from "./icon-dir.js";
|
|
6
7
|
import { prepareDevLocaleDir } from "./locale-dir.js";
|
|
7
8
|
import { createDevRunner } from "./runner.js";
|
|
@@ -18,13 +19,19 @@ const main = async () => {
|
|
|
18
19
|
error(`Missing ${DEV_ENTRY_ENV}`);
|
|
19
20
|
process.exit(1);
|
|
20
21
|
}
|
|
21
|
-
const
|
|
22
|
+
const configFile = process.env[DEV_CONFIG_ENV];
|
|
23
|
+
if (!configFile) {
|
|
24
|
+
error(`Missing ${DEV_CONFIG_ENV}`);
|
|
25
|
+
process.exit(1);
|
|
26
|
+
}
|
|
27
|
+
const { config, root } = await loadConfig(cwd, { mode: "development", configFile });
|
|
22
28
|
prepareDevLocaleDir(root, config.applicationId);
|
|
23
29
|
prepareDevSchemaDir(root);
|
|
24
30
|
prepareDevIconDir(root, config.applicationId, config.applicationIcon);
|
|
31
|
+
prepareDevFontDir(root);
|
|
25
32
|
const entryPath = resolve(cwd, entryArg);
|
|
26
33
|
const { defaultDevRunnerDeps } = await import("./runner-deps.js");
|
|
27
|
-
const runner = createDevRunner(defaultDevRunnerDeps());
|
|
34
|
+
const runner = createDevRunner(defaultDevRunnerDeps(configFile, config.deploy?.outDir));
|
|
28
35
|
await runner.run(entryPath);
|
|
29
36
|
};
|
|
30
37
|
export { main };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runner-main.js","sourceRoot":"","sources":["../../src/dev/runner-main.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACpC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/
|
|
1
|
+
{"version":3,"file":"runner-main.js","sourceRoot":"","sources":["../../src/dev/runner-main.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACpC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,MAA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AAI,EAAE,MAAM,CAAC,aAAa,EAAE,MAAM,CAAC,eAAe,CAAC,CAAC;IACtE,iBAAiB,CAAC,IAAI,CAAC,CAAC;IACxB,MAAM,SAAS,GAAG,OAAO,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC;IACzC,MAAM,EAAE,oBAAoB,EAAE,GAAG,MAAM,MAAM,CAAC,kBAAkB,CAAC,CAAC;IAClE,MAAM,MAAM,GAAG,eAAe,CAAC,oBAAoB,CAAC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IACxF,MAAM,MAAM,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;AAChC,CAAC,CAAC;AAEF,OAAO,EAAE,IAAI,EAAE,CAAC","sourcesContent":["import { loadConfig } from \"@gtkx/config\";\nimport { error } from \"@gtkx/utils\";\nimport { resolve } from \"node:path\";\nimport { DEV_CONFIG_ENV, DEV_ENTRY_ENV } from \"./entry-env.js\";\nimport { prepareDevFontDir } from \"./font-dir.js\";\nimport { prepareDevIconDir } from \"./icon-dir.js\";\nimport { prepareDevLocaleDir } from \"./locale-dir.js\";\nimport { createDevRunner } from \"./runner.js\";\nimport { prepareDevSchemaDir } from \"./schema-dir.js\";\n\nconst main = async (): Promise<void> => {\n if (process.channel) {\n process.once(\"disconnect\", () => {\n process.exit(0);\n });\n }\n\n const cwd = process.cwd();\n const entryArg = process.env[DEV_ENTRY_ENV];\n\n if (!entryArg) {\n error(`Missing ${DEV_ENTRY_ENV}`);\n process.exit(1);\n }\n\n const configFile = process.env[DEV_CONFIG_ENV];\n\n if (!configFile) {\n error(`Missing ${DEV_CONFIG_ENV}`);\n process.exit(1);\n }\n\n const { config, root } = await loadConfig(cwd, { mode: \"development\", configFile });\n prepareDevLocaleDir(root, config.applicationId);\n prepareDevSchemaDir(root);\n prepareDevIconDir(root, config.applicationId, config.applicationIcon);\n prepareDevFontDir(root);\n const entryPath = resolve(cwd, entryArg);\n const { defaultDevRunnerDeps } = await import(\"./runner-deps.js\");\n const runner = createDevRunner(defaultDevRunnerDeps(configFile, config.deploy?.outDir));\n await runner.run(entryPath);\n};\n\nexport { main };\n"]}
|
package/dist/dev/runner.d.ts
CHANGED
|
@@ -17,6 +17,8 @@ type DevRunnerDeps = {
|
|
|
17
17
|
isRefreshBoundary(module: Record<string, unknown>): boolean;
|
|
18
18
|
staleExportName(previous: Record<string, unknown>, current: Record<string, unknown>): string | null;
|
|
19
19
|
readFileRevision(path: string): Promise<string>;
|
|
20
|
+
hasWrittenCatalog(path: string): boolean;
|
|
21
|
+
deployOutDir: string | undefined;
|
|
20
22
|
plugins(entryPath: string): Plugin[];
|
|
21
23
|
log(message: string): void;
|
|
22
24
|
exit(code: number): never;
|
package/dist/dev/runner.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runner.d.ts","sourceRoot":"","sources":["../../src/dev/runner.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAClE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"runner.d.ts","sourceRoot":"","sources":["../../src/dev/runner.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAClE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAUjD,OAAO,EAEH,KAAK,SAAS,EAIjB,MAAM,sBAAsB,CAAC;AAE9B,KAAK,aAAa,GAAG,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;AAEtE,KAAK,aAAa,GAAG;IACjB,YAAY,CAAC,MAAM,EAAE,YAAY,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC;IACvD,oBAAoB,CAAC,SAAS,EAAE,MAAM,EAAE,iBA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EF,KAAK,SAAS,GAAG;IACb,GAAG,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACzC,CAAC;AAilBF,QAAA,MAAM,eAAe,GAAI,MAAM,aAAa,KAAG,SAiB7C,CAAC;AAEH,OAAO,EAAE,eAAe,EAAE,KAAK,aAAa,EAAE,CAAC"}
|
package/dist/dev/runner.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { error, warn } from "@gtkx/utils";
|
|
2
2
|
import { isCatalogSource } from "../i18n/catalogs.js";
|
|
3
|
+
import { hasUnstagedFontImport } from "../internal/font-staging.js";
|
|
3
4
|
import { loadModuleExclusively, withExclusiveLoad } from "../internal/module-loads.js";
|
|
4
5
|
import { createChangeQueue } from "./change-queue.js";
|
|
5
6
|
import { createFailureTracker } from "./failure-tracker.js";
|
|
@@ -214,17 +215,35 @@ const restartForServerConfig = async (session, changedPath) => {
|
|
|
214
215
|
session.deps.log(`Server config changed: ${changedPath}`);
|
|
215
216
|
await requestRestart(session);
|
|
216
217
|
};
|
|
217
|
-
const
|
|
218
|
-
|
|
218
|
+
const restartForFont = async (session, changedPath) => {
|
|
219
|
+
session.deps.log(`Font import added: ${changedPath}`);
|
|
220
|
+
await requestRestart(session);
|
|
221
|
+
};
|
|
222
|
+
const restartForCatalog = async (session, changedPath) => {
|
|
223
|
+
if (session.deps.hasWrittenCatalog(changedPath)) {
|
|
219
224
|
return;
|
|
220
225
|
}
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
226
|
+
session.deps.log(`Translation catalog changed: ${changedPath}`);
|
|
227
|
+
await requestRestart(session);
|
|
228
|
+
};
|
|
229
|
+
const didRestartForChange = async (session, change) => {
|
|
230
|
+
const { root } = session.server.config;
|
|
231
|
+
if (isCatalogSource(root, change.path)) {
|
|
232
|
+
await restartForCatalog(session, change.path);
|
|
233
|
+
return true;
|
|
225
234
|
}
|
|
226
235
|
if (isServerConfigFile(session.server.config, change.path)) {
|
|
227
236
|
await restartForServerConfig(session, change.path);
|
|
237
|
+
return true;
|
|
238
|
+
}
|
|
239
|
+
if (change.event !== "unlink" && hasUnstagedFontImport(root, change.path)) {
|
|
240
|
+
await restartForFont(session, change.path);
|
|
241
|
+
return true;
|
|
242
|
+
}
|
|
243
|
+
return false;
|
|
244
|
+
};
|
|
245
|
+
const applyChange = async (session, change) => {
|
|
246
|
+
if (session.controller.isShuttingDown() || await didRestartForChange(session, change)) {
|
|
228
247
|
return;
|
|
229
248
|
}
|
|
230
249
|
if (change.event === "add") {
|
|
@@ -387,7 +406,7 @@ const createSession = (server, deps) => {
|
|
|
387
406
|
};
|
|
388
407
|
const createDevRunner = (deps) => ({
|
|
389
408
|
async run(entryPath) {
|
|
390
|
-
const server = await deps.createServer(createDevServerConfig(process.cwd(), deps.plugins(entryPath)));
|
|
409
|
+
const server = await deps.createServer(createDevServerConfig(process.cwd(), deps.deployOutDir, deps.plugins(entryPath)));
|
|
391
410
|
const session = createSession(server, deps);
|
|
392
411
|
deps.installShutdownHandlers(onShutdownSignal(session));
|
|
393
412
|
deps.watchUncaughtErrors((cause) => {
|