@tuya-sat/microapp-kit 0.0.0-stage → 0.1.26-alpha.1
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/AUDIT.md +43 -0
- package/CHANGELOG.md +53 -0
- package/MAINTAINING.md +178 -0
- package/README.md +53 -2
- package/START-HERE.md +44 -0
- package/bootstrap/build-install-page.mjs +46 -0
- package/bootstrap/install-node.ps1 +80 -0
- package/bootstrap/install-node.sh +94 -0
- package/bootstrap/install.md.in +29 -0
- package/bundle.json +852 -0
- package/cli.mjs +3 -0
- package/package.json +68 -4
- package/resources/contracts/project-permissions.json +596 -0
- package/resources/contracts/standard-api.catalog.json +5 -0
- package/resources/examples/group-display.mjs +23 -0
- package/resources/preview/README.md +104 -0
- package/resources/preview/agent-open.mjs +1221 -0
- package/resources/preview/application-icon.mjs +27 -0
- package/resources/preview/authorization-panel.js +243 -0
- package/resources/preview/authorization-routes.mjs +634 -0
- package/resources/preview/authorization.mjs +353 -0
- package/resources/preview/backend-entry.mjs +22 -0
- package/resources/preview/backend-process.mjs +26 -0
- package/resources/preview/bridge.js +50 -0
- package/resources/preview/control.mjs +48 -0
- package/resources/preview/device-fixtures.mjs +38 -0
- package/resources/preview/fixtures/context.json +10 -0
- package/resources/preview/fixtures/device-catalog.json +363 -0
- package/resources/preview/host-contract.mjs +104 -0
- package/resources/preview/host.js +841 -0
- package/resources/preview/local-dev-provider.mjs +27 -0
- package/resources/preview/menu-icons.json +82 -0
- package/resources/preview/mock-store.mjs +1147 -0
- package/resources/preview/run.mjs +131 -0
- package/resources/preview/server.mjs +476 -0
- package/resources/preview/theme-tokens.mjs +49 -0
- package/resources/preview/themes.json +1036 -0
- package/resources/resource-manifest.json +210 -0
- package/resources/scripts/backend-build-context.mjs +101 -0
- package/resources/scripts/backend-runtime.mjs +68 -0
- package/resources/scripts/build-backend-image.sh +23 -0
- package/resources/scripts/build-safety.mjs +18 -0
- package/resources/scripts/build.mjs +138 -0
- package/resources/scripts/command-invocation.mjs +10 -0
- package/resources/scripts/diagnostics.mjs +34 -0
- package/resources/scripts/init-project.mjs +62 -0
- package/resources/scripts/package-release.mjs +80 -0
- package/resources/scripts/prepare-locales.mjs +77 -0
- package/resources/scripts/project-identity.mjs +21 -0
- package/resources/scripts/registry-client.mjs +189 -0
- package/resources/scripts/resource-files.mjs +22 -0
- package/resources/scripts/scaffold.mjs +31 -0
- package/resources/scripts/test-backend-image.mjs +162 -0
- package/resources/scripts/update-preview-themes.mjs +26 -0
- package/resources/scripts/update-resource-manifest.mjs +9 -0
- package/resources/scripts/validate-resources.mjs +9 -0
- package/resources/template/_gitignore +5 -0
- package/resources/template/backend/.dockerignore +7 -0
- package/resources/template/backend/.node-version +1 -0
- package/resources/template/backend/Dockerfile +62 -0
- package/resources/template/backend/deploy/README.md +105 -0
- package/resources/template/backend/deploy/data/README.md +3 -0
- package/resources/template/backend/deploy/manifest.json +4 -0
- package/resources/template/backend/deploy/tasks/README.md +3 -0
- package/resources/template/backend/migrations/README.md +5 -0
- package/resources/template/backend/next-env.d.ts +6 -0
- package/resources/template/backend/next.config.ts +19 -0
- package/resources/template/backend/operations.json +4 -0
- package/resources/template/backend/package.json +35 -0
- package/resources/template/backend/pnpm-lock.yaml +775 -0
- package/resources/template/backend/preview-contract.json +4 -0
- package/resources/template/backend/public/.keep +0 -0
- package/resources/template/backend/scripts/check-runtime.mjs +12 -0
- package/resources/template/backend/scripts/dev-deploy-prepare.mjs +362 -0
- package/resources/template/backend/scripts/dev-diagnose-database.mjs +199 -0
- package/resources/template/backend/scripts/dev-start-backend.sh +30 -0
- package/resources/template/backend/src/app/[[...path]]/route.ts +11 -0
- package/resources/template/backend/src/app/api/[...path]/route.ts +11 -0
- package/resources/template/backend/src/app/api/health/route.ts +16 -0
- package/resources/template/backend/src/app/api/preview/context/route.ts +36 -0
- package/resources/template/backend/src/instrumentation.ts +10 -0
- package/resources/template/backend/src/lib/api-response.mjs +119 -0
- package/resources/template/backend/src/lib/business-logger.mjs +29 -0
- package/resources/template/backend/src/lib/database-errors.mjs +15 -0
- package/resources/template/backend/src/lib/dev-authorization.mjs +84 -0
- package/resources/template/backend/src/lib/dev-context.mjs +58 -0
- package/resources/template/backend/src/lib/gateway-ingress.mjs +79 -0
- package/resources/template/backend/src/lib/gateway-nonce-store.mjs +31 -0
- package/resources/template/backend/src/lib/gateway-verification.mjs +197 -0
- package/resources/template/backend/src/lib/request-observability.mjs +93 -0
- package/resources/template/backend/src/lib/standard-api.ts +28 -0
- package/resources/template/backend/src/microapp-identity.json +1 -0
- package/resources/template/backend/src/proxy.ts +40 -0
- package/resources/template/backend/tests/api-response.test.mjs +77 -0
- package/resources/template/backend/tests/database-diagnostics.test.mjs +198 -0
- package/resources/template/backend/tests/deployment-connection.test.mjs +100 -0
- package/resources/template/backend/tests/deployment-postgres.test.mjs +109 -0
- package/resources/template/backend/tests/deployment.test.mjs +196 -0
- package/resources/template/backend/tests/dev-authorization.test.mjs +88 -0
- package/resources/template/backend/tests/dev-context.test.mjs +35 -0
- package/resources/template/backend/tests/gateway-verification.test.mjs +287 -0
- package/resources/template/backend/tests/request-observability.test.mjs +125 -0
- package/resources/template/backend/tests/routes.test.mjs +253 -0
- package/resources/template/backend/tests/startup.test.mjs +147 -0
- package/resources/template/backend/tsconfig.json +34 -0
- package/resources/template/micro-app/.editorconfig +15 -0
- package/resources/template/micro-app/.eslintrc +15 -0
- package/resources/template/micro-app/.prettierignore +4 -0
- package/resources/template/micro-app/.prettierrc +6 -0
- package/resources/template/micro-app/_gitignore +6 -0
- package/resources/template/micro-app/_locales/en.json +5 -0
- package/resources/template/micro-app/_locales/zh-CN.json +5 -0
- package/resources/template/micro-app/antd.less.overwrite.js +4 -0
- package/resources/template/micro-app/babel.config.json +3 -0
- package/resources/template/micro-app/manifest.json +46 -0
- package/resources/template/micro-app/micro.config.js +4 -0
- package/resources/template/micro-app/mock/index.json +4 -0
- package/resources/template/micro-app/package.json +61 -0
- package/resources/template/micro-app/public/favicon.ico +0 -0
- package/resources/template/micro-app/public/index.ejs +13 -0
- package/resources/template/micro-app/src/App.less +0 -0
- package/resources/template/micro-app/src/App.tsx +99 -0
- package/resources/template/micro-app/src/api/api-request.mjs +85 -0
- package/resources/template/micro-app/src/api/custom-api-headers.mjs +55 -0
- package/resources/template/micro-app/src/api/custom-api.ts +10 -0
- package/resources/template/micro-app/src/api/errors.mjs +108 -0
- package/resources/template/micro-app/src/api/index.ts +34 -0
- package/resources/template/micro-app/src/api/presentation.mjs +33 -0
- package/resources/template/micro-app/src/api/req.ts +9 -0
- package/resources/template/micro-app/src/api/request-url.mjs +20 -0
- package/resources/template/micro-app/src/api/res.ts +9 -0
- package/resources/template/micro-app/src/api/submission-errors.mjs +84 -0
- package/resources/template/micro-app/src/components/CapsuleFilters/index.module.less +121 -0
- package/resources/template/micro-app/src/components/CapsuleFilters/index.tsx +100 -0
- package/resources/template/micro-app/src/components/MicroAppUI/DataTable.tsx +48 -0
- package/resources/template/micro-app/src/components/MicroAppUI/EllipsisText.tsx +25 -0
- package/resources/template/micro-app/src/components/MicroAppUI/Layouts.tsx +54 -0
- package/resources/template/micro-app/src/components/MicroAppUI/ModalForm.tsx +230 -0
- package/resources/template/micro-app/src/components/MicroAppUI/StatusBadge.tsx +19 -0
- package/resources/template/micro-app/src/components/MicroAppUI/index.module.less +99 -0
- package/resources/template/micro-app/src/components/MicroAppUI/index.ts +13 -0
- package/resources/template/micro-app/src/index.css +16 -0
- package/resources/template/micro-app/src/index.tsx +66 -0
- package/resources/template/micro-app/src/interfaces.ts +545 -0
- package/resources/template/micro-app/src/lang/en.ts +1 -0
- package/resources/template/micro-app/src/lang/index.ts +31 -0
- package/resources/template/micro-app/src/lang/zh.ts +1 -0
- package/resources/template/micro-app/src/language-codes.mjs +32 -0
- package/resources/template/micro-app/src/language-policy.ts +6 -0
- package/resources/template/micro-app/src/microapp-identity.json +1 -0
- package/resources/template/micro-app/src/pages/index.module.less +3 -0
- package/resources/template/micro-app/src/pages/index.tsx +6 -0
- package/resources/template/micro-app/src/public-path.js +4 -0
- package/resources/template/micro-app/src/utils/antdLang.ts +244 -0
- package/resources/template/micro-app/tests/template.test.cjs +15 -0
- package/resources/template/micro-app/tsconfig.extend.json +8 -0
- package/resources/template/micro-app/tsconfig.json +24 -0
- package/resources/template/micro-app/typings.d.ts +19 -0
- package/resources/template/micro-app/yarn.lock +7491 -0
- package/resources/tests/agent-open-catalog.test.mjs +43 -0
- package/resources/tests/agent-open-preview.test.mjs +878 -0
- package/resources/tests/api-request.test.mjs +121 -0
- package/resources/tests/api-response.test.mjs +2 -0
- package/resources/tests/application-icon-build.test.mjs +34 -0
- package/resources/tests/authorization-proxy.test.mjs +202 -0
- package/resources/tests/authorization.test.mjs +462 -0
- package/resources/tests/backend-context.test.mjs +33 -0
- package/resources/tests/backend-preview.test.mjs +67 -0
- package/resources/tests/backend-request-logging.test.mjs +2 -0
- package/resources/tests/backend-runtime.test.mjs +96 -0
- package/resources/tests/browser-authorization-smoke.mjs +111 -0
- package/resources/tests/browser-design-smoke.mjs +107 -0
- package/resources/tests/browser-language-compat-smoke.mjs +48 -0
- package/resources/tests/browser-preview-smoke.mjs +148 -0
- package/resources/tests/browser-standard-ui-smoke.mjs +331 -0
- package/resources/tests/build-safety.test.mjs +69 -0
- package/resources/tests/business-build.test.mjs +86 -0
- package/resources/tests/command-invocation.test.mjs +35 -0
- package/resources/tests/custom-api-headers.test.mjs +96 -0
- package/resources/tests/custom-route.test.mjs +63 -0
- package/resources/tests/custom-script-policy.test.mjs +34 -0
- package/resources/tests/database-errors.test.mjs +81 -0
- package/resources/tests/deployment-package.test.mjs +45 -0
- package/resources/tests/dockerfile-logging.test.mjs +31 -0
- package/resources/tests/fixtures/capsule-page.tsx +46 -0
- package/resources/tests/fixtures/standard-ui-page.tsx +222 -0
- package/resources/tests/group-display.test.mjs +28 -0
- package/resources/tests/host-contract.test.mjs +84 -0
- package/resources/tests/image-test.test.mjs +110 -0
- package/resources/tests/initialization.test.mjs +98 -0
- package/resources/tests/language-selection.test.mjs +188 -0
- package/resources/tests/locale-keys.test.mjs +88 -0
- package/resources/tests/preview-control.test.mjs +56 -0
- package/resources/tests/preview-icon.test.mjs +117 -0
- package/resources/tests/preview-state.test.mjs +183 -0
- package/resources/tests/preview-theme.test.mjs +17 -0
- package/resources/tests/real-preview-smoke.mjs +34 -0
- package/resources/tests/registry-client.test.mjs +272 -0
- package/resources/tests/request-errors.test.mjs +51 -0
- package/resources/tests/request-method-contract.test.mjs +65 -0
- package/resources/tests/resources.test.mjs +31 -0
- package/resources/tests/saas-presentation.test.mjs +41 -0
- package/resources/tests/sandbox-scripts.test.mjs +144 -0
- package/resources/tests/space-permission-guidance.test.mjs +78 -0
- package/resources/tests/standard-api-preview.test.mjs +55 -0
- package/resources/tests/submission-errors.test.mjs +118 -0
- package/resources/tests/version-description-package.test.mjs +60 -0
- package/resources/ui/component-sources.json +36 -0
- package/runtime/assemble.mjs +66 -0
- package/runtime/auth/hidden-input.mjs +45 -0
- package/runtime/auth/macos-credentials.js +41 -0
- package/runtime/auth/manager.mjs +145 -0
- package/runtime/auth/session.mjs +153 -0
- package/runtime/auth/state.mjs +107 -0
- package/runtime/auth/store.mjs +130 -0
- package/runtime/auth/windows-credentials.ps1 +73 -0
- package/runtime/auth/wizard.mjs +224 -0
- package/runtime/cli.mjs +474 -0
- package/runtime/dev-database.mjs +155 -0
- package/runtime/dev-provider.mjs +41 -0
- package/runtime/errors.mjs +205 -0
- package/runtime/install-receipt.mjs +68 -0
- package/runtime/installation.mjs +92 -0
- package/runtime/integrity.mjs +121 -0
- package/runtime/launcher.mjs +104 -0
- package/runtime/pack-npm.mjs +76 -0
- package/runtime/package-cache.mjs +52 -0
- package/runtime/package-identity.mjs +22 -0
- package/runtime/preview.mjs +157 -0
- package/runtime/project-identity.mjs +57 -0
- package/runtime/publication.mjs +372 -0
- package/runtime/release-content.mjs +159 -0
- package/runtime/release-index.mjs +91 -0
- package/runtime/setup.mjs +223 -0
- package/runtime/tests/agent-entry.test.mjs +79 -0
- package/runtime/tests/auth-wizard.test.mjs +241 -0
- package/runtime/tests/auth.test.mjs +367 -0
- package/runtime/tests/consistency-workflow.test.mjs +84 -0
- package/runtime/tests/dev-provider.test.mjs +27 -0
- package/runtime/tests/diagnostics.test.mjs +66 -0
- package/runtime/tests/helpers/tar-fixture.mjs +25 -0
- package/runtime/tests/install-page.test.mjs +83 -0
- package/runtime/tests/install.test.mjs +432 -0
- package/runtime/tests/node-bootstrap.test.mjs +104 -0
- package/runtime/tests/npm-distribution.test.mjs +130 -0
- package/runtime/tests/npm-release-check.test.mjs +48 -0
- package/runtime/tests/package-cache.test.mjs +108 -0
- package/runtime/tests/package-migration.test.mjs +208 -0
- package/runtime/tests/preview-hosts.test.mjs +66 -0
- package/runtime/tests/preview.test.mjs +304 -0
- package/runtime/tests/project-identity.test.mjs +67 -0
- package/runtime/tests/publication.test.mjs +436 -0
- package/runtime/tests/release-recovery.test.mjs +417 -0
- package/runtime/tests/repository-source.test.mjs +69 -0
- package/runtime/tests/skill-set-update.test.mjs +169 -0
- package/runtime/tests/standalone.test.mjs +46 -0
- package/runtime/tests/update-check.test.mjs +165 -0
- package/runtime/tests/update.test.mjs +292 -0
- package/runtime/tests/workspace.test.mjs +156 -0
- package/runtime/update-check.mjs +160 -0
- package/runtime/update-state.mjs +83 -0
- package/runtime/update.mjs +292 -0
- package/runtime/verify-npm-release.mjs +43 -0
- package/runtime/workspace-migration.mjs +109 -0
- package/runtime/workspace.mjs +101 -0
- package/schemas/toolchain.schema.json +13 -0
- package/setup.mjs +3 -0
- package/skills/micro-app-backend-development/SKILL.md +64 -0
- package/skills/micro-app-backend-development/references/backend-security-workflow.md +77 -0
- package/skills/micro-app-backend-development/references/business-build-helpers.md +11 -0
- package/skills/micro-app-backend-development/references/business-logging.md +56 -0
- package/skills/micro-app-backend-development/references/database-constraints.md +81 -0
- package/skills/micro-app-backend-development/references/database-write-errors.md +29 -0
- package/skills/micro-app-backend-development/references/deployment-bundle.md +65 -0
- package/skills/micro-app-backend-development/references/dev-preview-context.md +23 -0
- package/skills/micro-app-backend-development/references/gateway-verification.md +43 -0
- package/skills/micro-app-backend-development/references/implementation.md +49 -0
- package/skills/micro-app-backend-development/references/local-database-preview.md +100 -0
- package/skills/micro-app-backend-development/references/production-authorization-readiness.md +60 -0
- package/skills/micro-app-backend-development/references/project-data-permissions.md +43 -0
- package/skills/micro-app-backend-development/references/runtime-resources-and-deployment.md +76 -0
- package/skills/micro-app-backend-development/scripts/microapp-kit.mjs +117 -0
- package/skills/micro-app-backend-development/tests/behavior-scenarios.md +62 -0
- package/skills/micro-app-cloud-integration/SKILL.md +92 -0
- package/skills/micro-app-cloud-integration/references/api-catalog.json +1315 -0
- package/skills/micro-app-cloud-integration/references/api-catalog.md +59 -0
- package/skills/micro-app-cloud-integration/references/api-device-control.md +67 -0
- package/skills/micro-app-cloud-integration/references/api-device.md +179 -0
- package/skills/micro-app-cloud-integration/references/api-group-ota.md +145 -0
- package/skills/micro-app-cloud-integration/references/api-linkage.md +3 -0
- package/skills/micro-app-cloud-integration/references/api-models.md +584 -0
- package/skills/micro-app-cloud-integration/references/api-project.md +121 -0
- package/skills/micro-app-cloud-integration/references/api-space-home.md +244 -0
- package/skills/micro-app-cloud-integration/references/backend-authorization.md +95 -0
- package/skills/micro-app-cloud-integration/references/calling-conventions.md +118 -0
- package/skills/micro-app-cloud-integration/references/preview-agent-open.md +46 -0
- package/skills/micro-app-cloud-integration/references/server-to-server-integration.md +13 -0
- package/skills/micro-app-cloud-integration/scripts/microapp-kit.mjs +117 -0
- package/skills/micro-app-cloud-integration/tests/behavior-scenarios.md +20 -0
- package/skills/micro-app-design/SKILL.md +99 -0
- package/skills/micro-app-design/agents/openai.yaml +6 -0
- package/skills/micro-app-design/assets/tuya-design-system/assets/README.md +22 -0
- package/skills/micro-app-design/assets/tuya-design-system/assets/components/TuyaCapsuleSearch.html +67 -0
- package/skills/micro-app-design/assets/tuya-design-system/assets/components/TuyaCardGrid.html +71 -0
- package/skills/micro-app-design/assets/tuya-design-system/assets/components/TuyaIcon.html +5 -0
- package/skills/micro-app-design/assets/tuya-design-system/assets/components/TuyaPageTitle.html +29 -0
- package/skills/micro-app-design/assets/tuya-design-system/assets/components/TuyaTopNavigation.html +55 -0
- package/skills/micro-app-design/assets/tuya-design-system/assets/components.schema.md +154 -0
- package/skills/micro-app-design/assets/tuya-design-system/assets/examples/dashboard.html +588 -0
- package/skills/micro-app-design/assets/tuya-design-system/assets/examples/dashboard.md +99 -0
- package/skills/micro-app-design/assets/tuya-design-system/assets/examples/table-page.html +477 -0
- package/skills/micro-app-design/assets/tuya-design-system/assets/examples/table-page.md +77 -0
- package/skills/micro-app-design/assets/tuya-design-system/assets/templates/base.html +878 -0
- package/skills/micro-app-design/assets/tuya-design-system/latest/accessibility/accessibility.md +39 -0
- package/skills/micro-app-design/assets/tuya-design-system/latest/components/capsule-search/examples/TuyaCapsuleSearch.html +67 -0
- package/skills/micro-app-design/assets/tuya-design-system/latest/components/capsule-search/examples/icons/capsule-filter/arrow-down.svg +3 -0
- package/skills/micro-app-design/assets/tuya-design-system/latest/components/capsule-search/examples/icons/capsule-filter/calendar.svg +5 -0
- package/skills/micro-app-design/assets/tuya-design-system/latest/components/capsule-search/examples/icons/capsule-filter/check.svg +3 -0
- package/skills/micro-app-design/assets/tuya-design-system/latest/components/capsule-search/examples/icons/capsule-filter/checkbox-check.svg +3 -0
- package/skills/micro-app-design/assets/tuya-design-system/latest/components/capsule-search/examples/icons/capsule-filter/clear.svg +4 -0
- package/skills/micro-app-design/assets/tuya-design-system/latest/components/capsule-search/examples/icons/capsule-filter/search.svg +4 -0
- package/skills/micro-app-design/assets/tuya-design-system/latest/components/capsule-search/examples/preview.html +3705 -0
- package/skills/micro-app-design/assets/tuya-design-system/latest/components/capsule-search/spec.md +78 -0
- package/skills/micro-app-design/assets/tuya-design-system/latest/components/card-grid/examples/TuyaCardGrid.html +71 -0
- package/skills/micro-app-design/assets/tuya-design-system/latest/components/card-grid/examples/assets/placeholder.svg +4 -0
- package/skills/micro-app-design/assets/tuya-design-system/latest/components/card-grid/examples/preview.html +711 -0
- package/skills/micro-app-design/assets/tuya-design-system/latest/components/card-grid/spec.md +93 -0
- package/skills/micro-app-design/assets/tuya-design-system/latest/components/cascader/spec.md +75 -0
- package/skills/micro-app-design/assets/tuya-design-system/latest/components/checkbox/spec.md +72 -0
- package/skills/micro-app-design/assets/tuya-design-system/latest/components/date-picker/spec.md +81 -0
- package/skills/micro-app-design/assets/tuya-design-system/latest/components/dropdown/spec.md +99 -0
- package/skills/micro-app-design/assets/tuya-design-system/latest/components/icon/examples/TuyaIcon.html +5 -0
- package/skills/micro-app-design/assets/tuya-design-system/latest/components/icon/spec.md +55 -0
- package/skills/micro-app-design/assets/tuya-design-system/latest/components/input/spec.md +84 -0
- package/skills/micro-app-design/assets/tuya-design-system/latest/components/modal/spec.md +178 -0
- package/skills/micro-app-design/assets/tuya-design-system/latest/components/page-title/examples/TuyaPageTitle.html +29 -0
- package/skills/micro-app-design/assets/tuya-design-system/latest/components/page-title/spec.md +67 -0
- package/skills/micro-app-design/assets/tuya-design-system/latest/components/pagination/spec.md +94 -0
- package/skills/micro-app-design/assets/tuya-design-system/latest/components/radio/spec.md +80 -0
- package/skills/micro-app-design/assets/tuya-design-system/latest/components/search-input/spec.md +101 -0
- package/skills/micro-app-design/assets/tuya-design-system/latest/components/select/spec.md +96 -0
- package/skills/micro-app-design/assets/tuya-design-system/latest/components/slider/spec.md +66 -0
- package/skills/micro-app-design/assets/tuya-design-system/latest/components/switch/spec.md +86 -0
- package/skills/micro-app-design/assets/tuya-design-system/latest/components/table/spec.md +116 -0
- package/skills/micro-app-design/assets/tuya-design-system/latest/components/time-picker/spec.md +75 -0
- package/skills/micro-app-design/assets/tuya-design-system/latest/components/tooltip/spec.md +70 -0
- package/skills/micro-app-design/assets/tuya-design-system/latest/components/top-navigation/examples/TuyaTopNavigation.html +55 -0
- package/skills/micro-app-design/assets/tuya-design-system/latest/components/top-navigation/spec.md +60 -0
- package/skills/micro-app-design/assets/tuya-design-system/latest/components/tree/examples/icons/check.svg +3 -0
- package/skills/micro-app-design/assets/tuya-design-system/latest/components/tree/examples/preview.html +974 -0
- package/skills/micro-app-design/assets/tuya-design-system/latest/components/tree/spec.md +118 -0
- package/skills/micro-app-design/assets/tuya-design-system/latest/components/upload/spec.md +86 -0
- package/skills/micro-app-design/assets/tuya-design-system/latest/demo-index.md +43 -0
- package/skills/micro-app-design/assets/tuya-design-system/latest/design-system.md +116 -0
- package/skills/micro-app-design/assets/tuya-design-system/latest/foundation/color.md +165 -0
- package/skills/micro-app-design/assets/tuya-design-system/latest/foundation/elevation.md +21 -0
- package/skills/micro-app-design/assets/tuya-design-system/latest/foundation/icon.md +78 -0
- package/skills/micro-app-design/assets/tuya-design-system/latest/foundation/layout.md +103 -0
- package/skills/micro-app-design/assets/tuya-design-system/latest/foundation/radius.md +22 -0
- package/skills/micro-app-design/assets/tuya-design-system/latest/foundation/spacing.md +29 -0
- package/skills/micro-app-design/assets/tuya-design-system/latest/foundation/typography.md +43 -0
- package/skills/micro-app-design/assets/tuya-design-system/latest/interaction/behavior.md +30 -0
- package/skills/micro-app-design/assets/tuya-design-system/latest/interaction/feedback.md +23 -0
- package/skills/micro-app-design/assets/tuya-design-system/latest/interaction/state.md +28 -0
- package/skills/micro-app-design/assets/tuya-design-system/latest/motion/motion.md +31 -0
- package/skills/micro-app-design/assets/tuya-design-system/latest/patterns/dashboard.md +34 -0
- package/skills/micro-app-design/assets/tuya-design-system/latest/patterns/data-page.md +30 -0
- package/skills/micro-app-design/assets/tuya-design-system/latest/patterns/form-page.md +36 -0
- package/skills/micro-app-design/assets/tuya-design-system/latest/patterns/monitoring.md +25 -0
- package/skills/micro-app-design/assets/tuya-design-system/latest/quality-checklist.md +71 -0
- package/skills/micro-app-design/assets/tuya-design-system/latest/registry.yaml +232 -0
- package/skills/micro-app-design/assets/tuya-design-system/latest/tokens.yaml +187 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/README.md +26 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/empty-states/README.md +13 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/empty-states//346/272/220/347/250/277/403.html +58 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/empty-states//346/272/220/347/250/277/404.html +58 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/empty-states//346/272/220/347/250/277/500.html +58 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/empty-states//346/272/220/347/250/277//344/272/213/344/273/266/345/274/202/345/270/270.html +58 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/empty-states//346/272/220/347/250/277//346/220/234/347/264/242/346/227/240/347/273/223/346/236/234.html +58 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/empty-states//346/272/220/347/250/277//346/232/202/346/227/240/344/275/215/347/275/256/344/277/241/346/201/257.html +58 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/empty-states//346/272/220/347/250/277//346/232/202/346/227/240/346/210/277/345/261/213.html +58 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/empty-states//346/272/220/347/250/277//346/232/202/346/227/240/346/225/260/346/215/256.html +58 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/empty-states//346/272/220/347/250/277//346/232/202/346/227/240/346/266/210/346/201/257.html +58 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/empty-states//346/272/220/347/250/277//346/232/202/346/227/240/347/275/221/347/273/234.html +58 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/empty-states//346/272/220/347/250/277//346/232/202/346/227/240/350/256/276/345/244/207.html +58 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/empty-states//346/272/220/347/250/277//346/232/202/346/227/240/351/241/271/347/233/256.html +58 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/empty-states//350/247/204/350/214/203.md +159 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/empty-states//350/247/204/350/214/203/347/211/210/403.html +31 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/empty-states//350/247/204/350/214/203/347/211/210/404.html +31 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/empty-states//350/247/204/350/214/203/347/211/210/500.html +31 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/empty-states//350/247/204/350/214/203/347/211/210/empty.css +106 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/empty-states//350/247/204/350/214/203/347/211/210/empty.js +49 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/empty-states//350/247/204/350/214/203/347/211/210/index.html +69 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/empty-states//350/247/204/350/214/203/347/211/210//344/272/213/344/273/266/345/274/202/345/270/270.html +31 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/empty-states//350/247/204/350/214/203/347/211/210//345/233/276/347/211/207/345/212/240/350/275/275/345/244/261/350/264/245.html +31 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/empty-states//350/247/204/350/214/203/347/211/210//346/220/234/347/264/242/346/227/240/347/273/223/346/236/234.html +31 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/empty-states//350/247/204/350/214/203/347/211/210//346/232/202/346/227/240/344/275/215/347/275/256/344/277/241/346/201/257.html +31 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/empty-states//350/247/204/350/214/203/347/211/210//346/232/202/346/227/240/346/210/277/345/261/213.html +31 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/empty-states//350/247/204/350/214/203/347/211/210//346/232/202/346/227/240/346/225/260/346/215/256.html +31 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/empty-states//350/247/204/350/214/203/347/211/210//346/232/202/346/227/240/346/266/210/346/201/257.html +31 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/empty-states//350/247/204/350/214/203/347/211/210//346/232/202/346/227/240/347/275/221/347/273/234.html +31 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/empty-states//350/247/204/350/214/203/347/211/210//346/232/202/346/227/240/350/256/276/345/244/207.html +31 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/empty-states//350/247/204/350/214/203/347/211/210//346/232/202/346/227/240/351/241/271/347/233/256.html +31 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/capsule-filter/README.md +23 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/capsule-filter/arrow-down.svg +3 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/capsule-filter/calendar.svg +5 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/capsule-filter/check.svg +3 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/capsule-filter/clear.svg +4 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/capsule-filter/search.svg +4 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/capsule-filter/sources/arrow-down-ref.png +0 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/capsule-filter/sources/check-ref.png +0 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/capsule-filter/sources/clear-ref.png +0 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/capsule-filter/sources/search-ref.png +0 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product/Excel.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product/HD.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product/PM.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product/PPT.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product/README.md +14 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product/VOC.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product/app/347/256/241/347/220/206.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product/catalog.md +377 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product/folder-closed.svg +3 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product/license/347/256/241/347/220/206.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product/nps/351/207/217/350/241/250 /346/224/266/350/227/217.svg" +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product/sos-2.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product/sos.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product/word.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//344/270/200/346/260/247/345/214/226/347/242/263-2.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//344/270/200/346/260/247/345/214/226/347/242/263.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//344/270/212/344/274/240.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//344/272/214/346/260/247/345/214/226/347/242/263.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//344/272/221.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//344/272/221/347/253/257 /344/270/213/350/275/275.svg" +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//344/272/256/345/272/246 /345/244/252/351/230/263 /346/227/245/351/227/264.svg" +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//344/272/272/344/275/223/344/274/240/346/204/237/345/231/250.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//344/272/272/345/203/217@2x.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//344/272/272/345/221/230/345/244/207/344/273/275@2x.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//344/272/272/346/260/221/345/270/201@2x.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//344/272/272/350/204/270/350/257/206/345/210/253/346/210/220/345/212/237@2x.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//344/272/272/350/241/214/351/227/250/347/246/201.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//344/274/230/346/203/240/345/210/270@2x.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//344/274/232/345/221/230@2x.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//345/201/234/350/275/246@2x.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//345/205/205/347/224/265/346/241/251@2x.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//345/205/245/344/276/265/345/221/212/350/255/246@2x.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//345/205/250/347/220/203 /345/234/260/347/220/203 @2x.svg" +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//345/206/260/347/256/261.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//345/206/267/346/260/264.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//345/210/267/346/274/206.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//345/212/240/346/262/271/347/253/231@2x.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//345/214/226/345/220/210/347/211/251.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//345/214/226/345/255/246-2.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//345/214/226/345/255/246.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//345/215/240/346/257/224/345/233/276.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//345/215/267/345/256/227.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//345/215/267/345/260/272.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//345/216/237/345/255/220 /347/211/251/347/220/206 /346/227/213/350/275/254.svg" +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//345/217/221/345/215/241@2x.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//345/217/260/345/274/217/347/224/265/350/204/221 /346/230/276/347/244/272/345/231/250 /345/261/217/345/271/225.svg" +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//345/220/212/347/201/257.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//345/220/271/351/243/216/346/234/272 /345/256/266/347/224/265 /347/224/265/345/231/250.svg" +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//345/221/212/350/255/246/344/270/255/345/277/203.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//345/221/274/345/220/270/347/216/207.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//345/225/206/345/272/227@2x.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//345/226/234/346/254/242@2x.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//345/233/276/347/211/207-/346/255/243/345/270/270.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//345/234/250/347/272/277/346/234/215/345/212/241/345/217/260@2x.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//345/234/260/345/233/276@2x.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//345/234/260/351/223/201@2x.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//345/237/272/345/233/240 DNA.svg" +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//345/237/272/345/233/240.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//345/240/206/345/217/240/346/237/261/347/212/266.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//345/243/260/345/205/211/346/212/245/350/255/246.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//345/244/232/347/275/221/351/241/265 web /345/244/232/347/252/227/345/217/243.svg" +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//345/244/247/350/204/221.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//345/256/236/346/227/266/346/246/202/350/247/210 /351/245/274/345/233/276.svg" +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//345/256/244/345/244/226/346/270/251/345/272/246.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//345/257/271/346/216/245 /344/272/244/346/215/242.svg" +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//345/260/272/345/255/220.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//345/260/272/345/257/270.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//345/267/264/345/243/253@2x.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//345/270/203/345/261/200.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//345/270/203/351/230/262/346/217/220/351/206/222.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//345/272/212 /347/235/241/347/234/240.svg" +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//345/272/212.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//345/272/224/347/224/250/351/205/215/347/275/256.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//345/274/200/345/205/263 /345/256/266/347/224/265 /347/224/265/345/231/250.svg" +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//345/274/200/345/217/221 /344/273/243/347/240/201 Bug@2x.svg" +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//345/274/200/345/217/221 /344/273/243/347/240/201 Code@2x.svg" +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//345/274/200/345/217/221 /344/273/243/347/240/201 js /344/273/243/347/240/201@2x.svg" +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//345/274/200/345/217/221 /344/273/243/347/240/201 /344/273/243/347/240/201@2x.svg" +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//345/274/200/345/217/221 /344/273/243/347/240/201 /347/275/221/351/241/265 /344/273/243/347/240/201@2x.svg" +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//345/274/200/351/227/250-2.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//345/274/200/351/227/250.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//345/275/225/345/203/217.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//345/276/252/347/216/257.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//345/276/256/346/263/242/347/202/211 /347/203/244/347/256/261 /345/256/266/347/224/265 /347/224/265/345/231/250.svg" +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//345/277/203/347/216/207 /345/277/203/347/224/265/345/233/276.svg" +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//345/277/203/347/216/207.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//345/277/203/347/224/265/345/233/276 /346/201/222/346/265/201/346/263/204/351/234/262/344/270/212/345/221/212.svg" +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//345/277/203/350/267/263/346/243/200/346/265/213.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/200/235/350/200/203 /350/201/224/346/203/263.svg" +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/200/245/346/225/221.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/210/277/351/227/264@2x.png +0 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/211/213/346/234/272.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/211/213/350/241/250.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/211/223/345/215/260/346/234/272.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/212/225/345/275/261/344/273/252 /345/256/266/347/224/265 /347/224/265/345/231/250.svg" +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/212/230/347/272/277/345/233/276.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/212/230/347/272/277/351/235/242/347/247/257/345/233/276.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/212/245/350/255/246.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/213/205/346/236/266/350/275/246@2x.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/213/215/347/205/247.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/214/207/347/272/271@2x.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/216/210/346/235/203.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/221/204/345/203/217/345/244/264.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/224/257/344/273/230@2x.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/224/266/350/227/217/346/266/210/346/201/257.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/225/221/346/212/244/350/275/246@2x.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/225/243/347/202/271/345/233/276.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/225/260/346/215/256 /345/210/206/346/236/220 /345/276/252/347/216/257.svg" +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/225/260/346/215/256 /351/245/274/345/233/276.svg" +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/225/260/346/215/256.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/225/260/346/215/256/346/272/220.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/225/264/344/275/223/346/246/202/345/206/265-2.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/225/264/344/275/223/346/246/202/345/206/265.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/226/207/344/273/266/345/244/271/346/211/223/345/274/200.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/226/207/345/255/227.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/226/207/346/241/243 /346/226/207/344/273/266 /346/240/274/345/274/217 amr.svg" +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/226/207/346/241/243 /346/226/207/344/273/266 /346/240/274/345/274/217 ara.svg" +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/226/207/346/241/243 /346/226/207/344/273/266 /346/240/274/345/274/217 bmp.svg" +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/226/207/346/241/243 /346/226/207/344/273/266 /346/240/274/345/274/217 csv.svg" +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/226/207/346/241/243 /346/226/207/344/273/266 /346/240/274/345/274/217 doc.svg" +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/226/207/346/241/243 /346/226/207/344/273/266 /346/240/274/345/274/217 gif.svg" +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/226/207/346/241/243 /346/226/207/344/273/266 /346/240/274/345/274/217 jpeg.svg" +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/226/207/346/241/243 /346/226/207/344/273/266 /346/240/274/345/274/217 jpg.svg" +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/226/207/346/241/243 /346/226/207/344/273/266 /346/240/274/345/274/217 json.svg" +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/226/207/346/241/243 /346/226/207/344/273/266 /346/240/274/345/274/217 md.svg" +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/226/207/346/241/243 /346/226/207/344/273/266 /346/240/274/345/274/217 mp3.svg" +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/226/207/346/241/243 /346/226/207/344/273/266 /346/240/274/345/274/217 mp4.svg" +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/226/207/346/241/243 /346/226/207/344/273/266 /346/240/274/345/274/217 pdf.svg" +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/226/207/346/241/243 /346/226/207/344/273/266 /346/240/274/345/274/217 png.svg" +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/226/207/346/241/243 /346/226/207/344/273/266 /346/240/274/345/274/217 ppt.svg" +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/226/207/346/241/243 /346/226/207/344/273/266 /346/240/274/345/274/217 psd.svg" +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/226/207/346/241/243 /346/226/207/344/273/266 /346/240/274/345/274/217 svg.svg" +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/226/207/346/241/243 /346/226/207/344/273/266 /346/240/274/345/274/217 txt.svg" +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/226/207/346/241/243 /346/226/207/344/273/266 /346/240/274/345/274/217 wav.svg" +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/226/207/346/241/243 /346/226/207/344/273/266 /346/240/274/345/274/217 xls.svg" +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/226/207/346/241/243 /346/226/207/344/273/266 /346/240/274/345/274/217 zip.svg" +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/226/255/347/272/277 /346/226/255/347/275/221/351/207/215/350/257/225 /350/204/211/345/206/262.svg" +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/226/271/346/241/210/347/256/241/347/220/206@2x.png +0 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/226/275/345/267/245/345/221/230/347/256/241/347/220/206@2x.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/227/240/344/272/272/346/234/272.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/227/245/346/234/237@2x-2.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/227/245/346/234/237@2x.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/231/272/350/203/275/346/210/277/351/227/264.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/231/272/350/203/275/347/233/221/346/216/247.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/231/272/350/203/275/351/227/250/347/246/201.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/233/262/347/272/277/345/233/276.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/234/211/345/256/263-/346/214/245/345/217/221/346/200/247/346/234/211/346/234/272/347/211/251.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/234/215/345/212/241/345/231/250-2.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/234/215/345/212/241/345/231/250-3.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/234/215/345/212/241/345/231/250.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/234/254/345/234/260/350/247/206/351/242/221.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/234/272/345/231/250/344/272/272 /344/272/272/345/267/245/346/231/272/350/203/275 .svg" +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/237/261/347/212/266/345/233/276-2.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/237/261/347/212/266/345/233/276.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/240/207/346/270/205.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/240/207/347/255/276 /346/240/207/350/256/260@2x.svg" +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/240/221/346/234/250 /347/216/257/345/242/203.svg" +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/240/221/346/234/250.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/240/241/350/275/246@2x.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/242/257/346/216/247.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/250/241/346/235/277.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/260/224/346/263/241/345/233/276.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/260/264/344/276/265/344/274/240/346/204/237.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/260/264/346/265/270.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/260/264/346/265/270/345/221/212/350/255/246.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/260/264/347/224/265/347/256/241/347/220/206-2.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/260/264/347/224/265/347/256/241/347/220/206-3.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/260/264/347/224/265/347/256/241/347/220/206.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/260/264/347/224/265/347/256/241/347/220/206_/345/211/257/346/234/254.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/260/264/350/255/246.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/261/202/346/225/221.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/261/241/346/237/223.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/261/275/350/275/246 /350/277/220/350/276/223 @2x.svg" +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/262/231/345/217/221.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/264/227/350/241/243/346/234/272 /345/256/266/347/224/265 /347/224/265/345/231/250.svg" +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/265/213/350/257/225 /347/247/222/350/241/250@2x.svg" +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/265/264/346/261/240 /346/265/264/347/274/270 .svg" +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/266/210/346/201/257@2x-2.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/266/210/346/201/257@2x-3.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/266/210/346/201/257@2x.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/267/273/345/212/240/351/241/271/347/233/256-2.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/267/273/345/212/240/351/241/271/347/233/256.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/270/251/345/272/246-2.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/270/251/345/272/246.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/270/251/345/272/246/350/277/207/344/275/216.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/270/251/345/272/246/350/277/207/351/253/230.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/270/270/346/210/217/344/274/221/351/227/262/345/250/261/344/271/220.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/271/277/345/272/246/350/277/207/344/275/216.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//346/271/277/345/272/246/350/277/207/351/253/230.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//347/201/253.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//347/201/253/347/201/276.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//347/201/253/350/255/246.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//347/201/253/350/275/246@2x-2.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//347/201/253/350/275/246@2x.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//347/201/255/347/201/253/345/231/250.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//347/201/257.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//347/203/237/351/233/276-2.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//347/203/237/351/233/276.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//347/203/237/351/233/276/345/221/212/350/255/246.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//347/203/255/346/260/264.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//347/203/255/346/260/264/345/243/266 /345/256/266/347/224/265 /347/224/265/345/231/250.svg" +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//347/205/247/345/272/246.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//347/207/203/346/260/224.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//347/207/203/346/260/224_/345/211/257/346/234/254.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//347/212/266/346/200/201.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//347/216/257/345/242/203 /346/240/221/345/217/266.svg" +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//347/216/257/345/242/203 /346/240/221/346/234/250.svg" +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//347/216/257/345/242/203.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//347/216/257/345/242/203/347/233/221/346/265/213-2.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//347/216/257/345/242/203/347/233/221/346/265/213.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//347/216/257/345/275/242/345/233/276.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//347/224/262/347/203/267/345/274/202/345/270/270.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//347/224/262/351/206/233.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//347/224/265.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//347/224/265/345/212/250/350/275/246@2x.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//347/224/265/345/255/220/345/233/264/346/240/217 /346/241/206/351/200/211.svg" +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//347/224/265/346/272/220 /347/224/265/347/223/266.svg" +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//347/224/265/350/247/206 /347/233/264/346/222/255 .svg" +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//347/224/265/350/264/271.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//347/224/265/351/222/273.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//347/224/265/351/243/216/346/211/207.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//347/224/265/351/245/255/351/224/205 /345/256/266/347/224/265 /347/224/265/345/231/250.svg" +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//347/224/273/346/235/277.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//347/233/221/346/265/213.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//347/233/270/346/234/272.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//347/235/241/347/234/240.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//347/244/276/345/214/272/346/231/272/350/203/275-2.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//347/244/276/345/214/272/346/231/272/350/203/275.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//347/246/273/347/272/277.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//347/247/237/350/265/201/347/256/241/347/220/206.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//347/247/257/345/210/206/350/277/220/350/220/245@2x.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//347/251/272/346/260/224/345/207/200/345/214/226/345/231/250 /345/256/266/347/224/265 /347/224/265/345/231/250.svg" +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//347/251/272/350/260/203.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//347/251/272/351/227/264@2x.png +0 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//347/252/227/345/270/230.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//347/254/224/350/256/260/346/234/254/347/224/265/350/204/221-2.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//347/254/224/350/256/260/346/234/254/347/224/265/350/204/221.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//347/255/211/345/276/205 /345/200/222/350/256/260/346/227/266@2x.svg" +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//347/255/211/345/276/205@2x.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//347/272/242/347/273/277/347/201/257@2x.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//347/273/204/347/273/207/347/256/241/347/220/206@2x-2.png +0 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//347/273/204/347/273/207/347/256/241/347/220/206@2x.png +0 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//347/274/226/350/276/221@2x.png +0 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//347/275/221/351/241/265.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//347/276/216/345/205/203@2x.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//350/200/201/344/272/272 /350/200/201/345/271/264/344/272/272@2x.svg" +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//350/200/263/346/234/272-2.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//350/200/263/346/234/272-3.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//350/200/263/346/234/272.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//350/203/275/345/212/233.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//350/207/252/350/241/214/350/275/246@2x.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//350/212/202/350/203/275.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//350/212/257/347/211/207.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//350/241/200/345/216/213/345/274/202/345/270/270.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//350/241/200/346/260/247.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//350/247/204/350/214/203.md +264 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//350/247/206/345/233/276/346/250/241/345/274/217.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//350/247/206/351/242/221.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//350/247/206/351/242/221AI.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//350/247/206/351/242/221SD.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//350/256/242/345/215/225.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//350/256/276/345/244/207-2.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//350/256/276/345/244/207-3.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//350/256/276/345/244/207-4.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//350/256/276/345/244/207-5.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//350/256/276/345/244/207.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//350/256/276/345/244/207/344/272/244/344/273/230-2.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//350/256/276/345/244/207/344/272/244/344/273/230.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//350/256/276/345/244/207/350/277/220/347/273/264.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//350/256/276/345/244/207/350/277/220/350/241/214/347/233/221/346/265/213.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//350/256/276/345/244/207/350/277/236/346/216/245.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//350/256/276/347/275/256@2x.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//350/256/276/347/275/256/350/260/203/350/257/225.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//350/257/273/345/215/241/345/231/250 /344/277/241/345/217/267.svg" +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//350/264/246/345/217/267@2x.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//350/264/247/350/275/246@2x.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//350/264/255/347/211/251/350/275/246@2x-2.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//350/264/255/347/211/251/350/275/246@2x.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//350/265/204/344/272/247/344/270/255/345/277/203@2x.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//350/267/257/351/232/234.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//350/267/257/351/232/234lu zhang-2.svg" +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//350/267/257/351/232/234lu zhang.svg" +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//350/275/246/350/241/214@2x.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//350/275/254/344/272/244/346/235/203/351/231/220.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//350/275/256/346/244/205-2.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//350/275/256/346/244/205.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//350/275/256/346/270/241@2x.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//350/275/277/350/275/246@2x-2.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//350/275/277/350/275/246@2x.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//350/277/220/350/220/245/347/256/241/347/220/206.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//350/277/220/350/276/223/350/275/246@2x.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//350/277/233/345/272/246/346/235/241.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//351/200/232/346/226/255/345/231/250.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//351/201/245/346/216/247.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//351/223/201/351/224/271.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//351/224/201.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//351/224/256/347/233/230.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//351/227/250/347/243/201/345/221/212/350/255/246.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//351/227/250/351/224/201.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//351/227/256/345/217/267@2x.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//351/230/266/346/242/257@2x.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//351/233/252/350/212/261 /344/270/213/351/233/252 .svg" +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//351/233/252/350/212/261 /345/210/266/345/206/267.svg" +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//351/233/267/350/276/276 /346/211/253/346/217/217 /345/217/221/347/216/260 .svg" +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//351/235/231/350/204/211/346/263/250/345/260/204.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//351/237/263/345/223/215.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//351/241/271/347/233/256.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//351/243/236/346/234/272@2x-2.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//351/243/236/346/234/272@2x.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//351/251/254/346/241/266.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//351/253/230/345/210/206/345/255/220.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//351/253/230/346/270/205.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/resources/icons/product//351/274/240/346/240/207.svg +1 -0
- package/skills/micro-app-design/assets/tuya-design-system/source.json +18 -0
- package/skills/micro-app-design/references/action-outcomes.md +7 -0
- package/skills/micro-app-design/references/adaptive-card-grid.md +25 -0
- package/skills/micro-app-design/references/capsule-fallback.md +36 -0
- package/skills/micro-app-design/references/component-boundaries.md +48 -0
- package/skills/micro-app-design/references/component-catalog.md +69 -0
- package/skills/micro-app-design/references/design-system.md +34 -0
- package/skills/micro-app-design/references/empty-and-error-states.md +27 -0
- package/skills/micro-app-design/references/icons.md +33 -0
- package/skills/micro-app-design/references/implementation-guidance.md +39 -0
- package/skills/micro-app-design/references/modal.md +27 -0
- package/skills/micro-app-design/references/page-patterns.md +55 -0
- package/skills/micro-app-design/references/quality-checklist.md +57 -0
- package/skills/micro-app-design/references/requirements-and-permission-states.md +19 -0
- package/skills/micro-app-design/references/source-and-scope.md +40 -0
- package/skills/micro-app-design/references/tokens.md +23 -0
- package/skills/micro-app-design/references/visual-acceptance.md +51 -0
- package/skills/micro-app-design/scripts/microapp-kit.mjs +117 -0
- package/skills/micro-app-design/scripts/visual-audit.mjs +197 -0
- package/skills/micro-app-design/tests/behavior-scenarios.md +154 -0
- package/skills/micro-app-design/tests/validate-design-skill.mjs +35 -0
- package/skills/micro-app-design/tests/validate-design-system.mjs +51 -0
- package/skills/micro-app-development/SKILL.md +132 -0
- package/skills/micro-app-development/agents/openai.yaml +6 -0
- package/skills/micro-app-development/references/agent-workflow.md +111 -0
- package/skills/micro-app-development/references/application-icons.md +50 -0
- package/skills/micro-app-development/references/data-change-safety.md +47 -0
- package/skills/micro-app-development/references/delivery-checklist.md +129 -0
- package/skills/micro-app-development/references/design-workflow.md +77 -0
- package/skills/micro-app-development/references/developer-credentials.md +97 -0
- package/skills/micro-app-development/references/development-guide.md +215 -0
- package/skills/micro-app-development/references/environment-progress.md +47 -0
- package/skills/micro-app-development/references/joint-acceptance.md +105 -0
- package/skills/micro-app-development/references/local-development.md +40 -0
- package/skills/micro-app-development/references/manifest-v1.2.md +129 -0
- package/skills/micro-app-development/references/npm-registry.md +50 -0
- package/skills/micro-app-development/references/platform-operations.md +48 -0
- package/skills/micro-app-development/references/project-workflow.md +36 -0
- package/skills/micro-app-development/references/publication-intent.md +34 -0
- package/skills/micro-app-development/references/publication-recovery.md +67 -0
- package/skills/micro-app-development/references/requirement-intake.md +122 -0
- package/skills/micro-app-development/references/runtime-requirements.md +23 -0
- package/skills/micro-app-development/references/space-permission-boundaries.md +46 -0
- package/skills/micro-app-development/references/tool-update.md +62 -0
- package/skills/micro-app-development/references/toolchain-access.md +35 -0
- package/skills/micro-app-development/references/user-journey.md +65 -0
- package/skills/micro-app-development/references/workspace-environments.md +39 -0
- package/skills/micro-app-development/scripts/application-icon.mjs +108 -0
- package/skills/micro-app-development/scripts/install-app-icon.mjs +48 -0
- package/skills/micro-app-development/scripts/install-menu-icon.mjs +27 -0
- package/skills/micro-app-development/scripts/language-policy.mjs +83 -0
- package/skills/micro-app-development/scripts/languages.json +372 -0
- package/skills/micro-app-development/scripts/locale-keys.mjs +26 -0
- package/skills/micro-app-development/scripts/microapp-kit.mjs +117 -0
- package/skills/micro-app-development/scripts/project-code.mjs +13 -0
- package/skills/micro-app-development/scripts/review-backend-logging.mjs +27 -0
- package/skills/micro-app-development/scripts/review-production-authorization.mjs +37 -0
- package/skills/micro-app-development/scripts/validate-micro-app-project.mjs +442 -0
- package/skills/micro-app-development/tests/application-icons.test.mjs +131 -0
- package/skills/micro-app-development/tests/backend-logging-review.test.mjs +24 -0
- package/skills/micro-app-development/tests/behavior-scenarios.md +177 -0
- package/skills/micro-app-development/tests/data-change-safety-scenarios.md +25 -0
- package/skills/micro-app-development/tests/design-workflow-scenarios.md +40 -0
- package/skills/micro-app-development/tests/fixtures/valid-v6/_locales/en.json +6 -0
- package/skills/micro-app-development/tests/fixtures/valid-v6/_locales/zh-CN.json +6 -0
- package/skills/micro-app-development/tests/fixtures/valid-v6/manifest.json +59 -0
- package/skills/micro-app-development/tests/fixtures/valid-v6/micro.config.js +5 -0
- package/skills/micro-app-development/tests/fixtures/valid-v6/mock/index.json +11 -0
- package/skills/micro-app-development/tests/fixtures/valid-v6/package.json +4 -0
- package/skills/micro-app-development/tests/fixtures/valid-v6/src/index.tsx +5 -0
- package/skills/micro-app-development/tests/fixtures/valid-v6/src/lang/en.ts +1 -0
- package/skills/micro-app-development/tests/fixtures/valid-v6/src/lang/zh.ts +1 -0
- package/skills/micro-app-development/tests/fixtures/valid-v6/src/public-path.js +3 -0
- package/skills/micro-app-development/tests/production-authorization-review.test.mjs +72 -0
- package/skills/micro-app-development/tests/six-skill-routing-scenarios.md +60 -0
- package/skills/micro-app-development/tests/user-journey-scenarios.md +19 -0
- package/skills/micro-app-development/tests/validate-micro-app-project.test.mjs +428 -0
- package/skills/micro-app-frontend-development/SKILL.md +86 -0
- package/skills/micro-app-frontend-development/agents/openai.yaml +6 -0
- package/skills/micro-app-frontend-development/references/api-and-permissions.md +86 -0
- package/skills/micro-app-frontend-development/references/custom-api-requests.md +52 -0
- package/skills/micro-app-frontend-development/references/debugging.md +36 -0
- package/skills/micro-app-frontend-development/references/i18n-and-theme.md +54 -0
- package/skills/micro-app-frontend-development/references/interaction-completion.md +61 -0
- package/skills/micro-app-frontend-development/references/micro-frontend-runtime.md +33 -0
- package/skills/micro-app-frontend-development/references/routing-and-context.md +96 -0
- package/skills/micro-app-frontend-development/references/saas-failure-and-display.md +45 -0
- package/skills/micro-app-frontend-development/references/standard-api-requests.md +30 -0
- package/skills/micro-app-frontend-development/references/submission-errors.md +51 -0
- package/skills/micro-app-frontend-development/scripts/microapp-kit.mjs +117 -0
- package/skills/micro-app-frontend-development/tests/behavior-scenarios.md +36 -0
- package/skills/micro-app-solution-design/SKILL.md +69 -0
- package/skills/micro-app-solution-design/agents/openai.yaml +6 -0
- package/skills/micro-app-solution-design/scripts/microapp-kit.mjs +117 -0
- package/skills/micro-app-solution-design/tests/behavior-scenarios.md +12 -0
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import test from 'node:test';
|
|
2
|
+
import assert from 'node:assert/strict';
|
|
3
|
+
import { cpSync, mkdirSync, mkdtempSync, readFileSync, readdirSync, rmSync, writeFileSync } from 'node:fs';
|
|
4
|
+
import { join } from 'node:path';
|
|
5
|
+
import { tmpdir } from 'node:os';
|
|
6
|
+
import { createHash } from 'node:crypto';
|
|
7
|
+
import { spawnSync } from 'node:child_process';
|
|
8
|
+
import { prepareLocales } from '../scripts/prepare-locales.mjs';
|
|
9
|
+
import { packageRelease } from '../scripts/package-release.mjs';
|
|
10
|
+
|
|
11
|
+
test('release archive preserves bilingual version notes and the manifest reference', async t => {
|
|
12
|
+
const root = mkdtempSync(join(tmpdir(), 'version-notes-package-'));
|
|
13
|
+
t.after(() => rmSync(root, { recursive: true, force: true }));
|
|
14
|
+
const source = join(root, 'source'), build = join(root, 'build');
|
|
15
|
+
const packaged = join(build, 'frontend/package');
|
|
16
|
+
mkdirSync(source);
|
|
17
|
+
cpSync(new URL('../template/micro-app/_locales', import.meta.url), join(source, '_locales'), { recursive: true });
|
|
18
|
+
// Locale module transpilation is irrelevant to manifest text; use self-contained JS exports.
|
|
19
|
+
mkdirSync(join(source, 'node_modules/typescript'), { recursive: true });
|
|
20
|
+
writeFileSync(join(source, 'package.json'), '{}');
|
|
21
|
+
writeFileSync(join(source, 'node_modules/typescript/index.js'),
|
|
22
|
+
'exports.ModuleKind={CommonJS:1};exports.transpileModule=s=>({outputText:s});');
|
|
23
|
+
mkdirSync(join(source, 'src/lang'), { recursive: true });
|
|
24
|
+
for (const locale of ['zh', 'en']) {
|
|
25
|
+
writeFileSync(join(source, `src/lang/${locale}.js`), 'exports.default={translation:{}};');
|
|
26
|
+
}
|
|
27
|
+
const notes = { 'zh-CN': '修复设备筛选,保留原有权限', en: 'Fix device filtering and preserve permissions' };
|
|
28
|
+
for (const [locale, text] of Object.entries(notes)) {
|
|
29
|
+
const file = join(source, `_locales/${locale}.json`);
|
|
30
|
+
writeFileSync(file, JSON.stringify({ ...JSON.parse(readFileSync(file)), versionDescription: text }));
|
|
31
|
+
}
|
|
32
|
+
const manifest = JSON.parse(readFileSync(new URL('../template/micro-app/manifest.json', import.meta.url)));
|
|
33
|
+
assert.equal(manifest.versionDescription, 'lang.versionDescription');
|
|
34
|
+
mkdirSync(join(packaged, 'dist'), { recursive: true });
|
|
35
|
+
writeFileSync(join(packaged, 'manifest.json'), JSON.stringify(manifest));
|
|
36
|
+
writeFileSync(join(packaged, 'dist/index.html'), '<html></html>');
|
|
37
|
+
prepareLocales(source, packaged, manifest);
|
|
38
|
+
const digests = {};
|
|
39
|
+
function hashTree(dir, prefix = '') {
|
|
40
|
+
for (const entry of readdirSync(dir, { withFileTypes: true })) {
|
|
41
|
+
const file = join(dir, entry.name), key = prefix + entry.name;
|
|
42
|
+
if (entry.isDirectory()) hashTree(file, key + '/');
|
|
43
|
+
else digests[key] = createHash('sha256').update(readFileSync(file)).digest('hex');
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
hashTree(build);
|
|
47
|
+
writeFileSync(join(build, 'build-result.json'), JSON.stringify({ format: 'v6-build-v2',
|
|
48
|
+
backendRequired: false, microAppCode: 'device-notes-abc123', microAppCodeSource: 'publication', digests }));
|
|
49
|
+
const output = join(root, 'release');
|
|
50
|
+
await packageRelease(build, output);
|
|
51
|
+
const readEntry = name => {
|
|
52
|
+
const result = spawnSync('tar', ['-xOzf', join(output, 'source.tgz'), `package/${name}`], { encoding: 'utf8' });
|
|
53
|
+
assert.equal(result.status, 0, result.stderr);
|
|
54
|
+
return JSON.parse(result.stdout);
|
|
55
|
+
};
|
|
56
|
+
assert.equal(readEntry('manifest.json').versionDescription, 'lang.versionDescription');
|
|
57
|
+
assert.equal(readEntry('_locales/mf/zh.json').versionDescription, notes['zh-CN']);
|
|
58
|
+
assert.equal(readEntry('_locales/mf/en.json').versionDescription, notes.en);
|
|
59
|
+
assert.equal(JSON.parse(readFileSync(join(source, '_locales/en.json'))).versionDescription, notes.en);
|
|
60
|
+
});
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"format": "micro-app-ui-inventory-v1",
|
|
3
|
+
"scope": "Local component implementations delivered with this package. No external repository access is required.",
|
|
4
|
+
"components": [
|
|
5
|
+
{
|
|
6
|
+
"component": "ModalForm",
|
|
7
|
+
"path": "template/micro-app/src/components/MicroAppUI/ModalForm.tsx",
|
|
8
|
+
"sha256": "088bab6b433af7fe802aea39d00b795ec3f6c5650947bc6369d7d8d35b57d1fc"
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
"component": "DataTable",
|
|
12
|
+
"path": "template/micro-app/src/components/MicroAppUI/DataTable.tsx",
|
|
13
|
+
"sha256": "0de12e167a0d57c041e7c1587296f2949bfb9797aa5f81e3edca8018994250cd"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"component": "StatusBadge",
|
|
17
|
+
"path": "template/micro-app/src/components/MicroAppUI/StatusBadge.tsx",
|
|
18
|
+
"sha256": "99ab12c5721dc5d339d19af40ee772ebb2b42b13016dfb8d06db08626a5d084e"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"component": "EllipsisText",
|
|
22
|
+
"path": "template/micro-app/src/components/MicroAppUI/EllipsisText.tsx",
|
|
23
|
+
"sha256": "843c31fa2580b93739ff7361d04519f8004f8d2980960be99f333e016d6765b4"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"component": "TwoColumnLayout",
|
|
27
|
+
"path": "template/micro-app/src/components/MicroAppUI/Layouts.tsx",
|
|
28
|
+
"sha256": "764c0d2bcac71624d3f6321b9611ee4c5721554c2bd96d6f5c4e29642214f28e"
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"component": "ListToolbar",
|
|
32
|
+
"path": "template/micro-app/src/components/MicroAppUI/Layouts.tsx",
|
|
33
|
+
"sha256": "764c0d2bcac71624d3f6321b9611ee4c5721554c2bd96d6f5c4e29642214f28e"
|
|
34
|
+
}
|
|
35
|
+
]
|
|
36
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
// Assemble an independent distribution using only files in this package.
|
|
2
|
+
import { cpSync, existsSync, mkdirSync, readFileSync, rmSync, writeFileSync } from 'node:fs';
|
|
3
|
+
import { resolve, join, sep } from 'node:path';
|
|
4
|
+
import { fileURLToPath } from 'node:url';
|
|
5
|
+
import { bundleFiles, verifyBundle, realPathOnly } from './integrity.mjs';
|
|
6
|
+
import { hashes, includeResource } from '../resources/scripts/resource-files.mjs';
|
|
7
|
+
import { distributionPackage, refreshPackageGuidance } from './package-identity.mjs';
|
|
8
|
+
const root = fileURLToPath(new URL('../', import.meta.url));
|
|
9
|
+
export function refreshBundle(directory = root) {
|
|
10
|
+
const existing = JSON.parse(readFileSync(join(directory, 'bundle.json')));
|
|
11
|
+
refreshPackageGuidance(directory, existing.packageName || '@xuqinghua/microapp-kit');
|
|
12
|
+
const scenario = join(directory, 'resources');
|
|
13
|
+
const resourcePath = join(scenario, 'resource-manifest.json');
|
|
14
|
+
const resource = JSON.parse(readFileSync(resourcePath));
|
|
15
|
+
writeFileSync(resourcePath, JSON.stringify({ ...resource, files: hashes(scenario) }, null, 2) + '\n');
|
|
16
|
+
const manifestPath = join(directory, 'bundle.json');
|
|
17
|
+
const manifest = JSON.parse(readFileSync(manifestPath));
|
|
18
|
+
const files = bundleFiles(directory);
|
|
19
|
+
const skills = Object.keys(files)
|
|
20
|
+
.map(file => /^skills\/([a-z0-9-]+)\/SKILL\.md$/.exec(file)?.[1])
|
|
21
|
+
.filter(Boolean)
|
|
22
|
+
.sort();
|
|
23
|
+
writeFileSync(manifestPath, JSON.stringify({ ...manifest, packageName: distributionPackage(directory).name, skills, files }, null, 2) + '\n');
|
|
24
|
+
return verifyBundle(directory);
|
|
25
|
+
}
|
|
26
|
+
export function buildBundle(destination) {
|
|
27
|
+
if (!destination) throw new Error('OUTPUT_REQUIRED');
|
|
28
|
+
destination = realPathOnly(destination);
|
|
29
|
+
const source = realPathOnly(root);
|
|
30
|
+
if (destination === source || destination.startsWith(source + sep)) throw new Error('OUTPUT_INSIDE_SOURCE');
|
|
31
|
+
if (existsSync(destination)) throw new Error('OUTPUT_EXISTS: use a new output directory');
|
|
32
|
+
mkdirSync(destination, { recursive: true });
|
|
33
|
+
try {
|
|
34
|
+
for (const name of [
|
|
35
|
+
'skills',
|
|
36
|
+
'bootstrap',
|
|
37
|
+
'resources',
|
|
38
|
+
'runtime',
|
|
39
|
+
'schemas',
|
|
40
|
+
'README.md',
|
|
41
|
+
'CHANGELOG.md',
|
|
42
|
+
'START-HERE.md',
|
|
43
|
+
'MAINTAINING.md',
|
|
44
|
+
'AUDIT.md',
|
|
45
|
+
'package.json',
|
|
46
|
+
'cli.mjs',
|
|
47
|
+
'setup.mjs',
|
|
48
|
+
'bundle.json',
|
|
49
|
+
]) {
|
|
50
|
+
cpSync(join(source, name), join(destination, name), { recursive: true, filter: includeResource });
|
|
51
|
+
}
|
|
52
|
+
refreshBundle(destination);
|
|
53
|
+
return destination;
|
|
54
|
+
} catch (error) {
|
|
55
|
+
rmSync(destination, { recursive: true, force: true });
|
|
56
|
+
throw error;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
if (process.argv[1] && realPathOnly(process.argv[1]) === realPathOnly(fileURLToPath(import.meta.url))) {
|
|
60
|
+
try {
|
|
61
|
+
if (process.argv[2] === '--refresh') {
|
|
62
|
+
refreshBundle();
|
|
63
|
+
console.error('Updated integrity manifests');
|
|
64
|
+
} else console.log(buildBundle(process.argv[2]));
|
|
65
|
+
} catch (error) { console.error(error.message); process.exitCode = 1; }
|
|
66
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { StringDecoder } from 'node:string_decoder';
|
|
2
|
+
import { fail } from './state.mjs';
|
|
3
|
+
|
|
4
|
+
// For a user-owned terminal only; no key value is echoed or accepted in argv/stdin pipes.
|
|
5
|
+
export function hiddenInput(label, { input = process.stdin, output = process.stderr } = {}) {
|
|
6
|
+
if (!input.isTTY || typeof input.setRawMode !== 'function' || !output.isTTY) fail('AUTH_USER_TERMINAL_REQUIRED');
|
|
7
|
+
return new Promise((resolve, reject) => {
|
|
8
|
+
let value = '', done = false;
|
|
9
|
+
const decoder = new StringDecoder('utf8');
|
|
10
|
+
const raw = Boolean(input.isRaw);
|
|
11
|
+
function finish(error) {
|
|
12
|
+
if (done) return;
|
|
13
|
+
done = true;
|
|
14
|
+
input.off('data', receive);
|
|
15
|
+
input.off('end', closed);
|
|
16
|
+
input.off('error', closed);
|
|
17
|
+
input.setRawMode(raw);
|
|
18
|
+
input.pause();
|
|
19
|
+
output.write('\n');
|
|
20
|
+
const result = value; value = '';
|
|
21
|
+
if (error) reject(Object.assign(new Error(error), { code: error }));
|
|
22
|
+
else resolve(result);
|
|
23
|
+
}
|
|
24
|
+
function closed() { finish('AUTH_INPUT_CANCELLED'); }
|
|
25
|
+
function receive(data) {
|
|
26
|
+
for (const character of decoder.write(data)) {
|
|
27
|
+
if (character === '\u0003' || character === '\u0004') return closed();
|
|
28
|
+
if (character === '\r' || character === '\n') {
|
|
29
|
+
if (!value.trim()) return finish('AUTH_CREDENTIALS_INCOMPLETE');
|
|
30
|
+
return finish();
|
|
31
|
+
}
|
|
32
|
+
if (character === '\u007f' || character === '\b') value = Array.from(value).slice(0, -1).join('');
|
|
33
|
+
else if (character >= ' ' && character !== '\u001b') value += character;
|
|
34
|
+
if (Buffer.byteLength(value) > 4096) return finish('AUTH_CREDENTIALS_INCOMPLETE');
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
// Disable echo before exposing the prompt; a fast paste must not race terminal setup.
|
|
38
|
+
input.setRawMode(true);
|
|
39
|
+
input.on('data', receive);
|
|
40
|
+
input.once('end', closed);
|
|
41
|
+
input.once('error', closed);
|
|
42
|
+
output.write(label + ': ');
|
|
43
|
+
input.resume();
|
|
44
|
+
});
|
|
45
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
// Invoked by the built-in osascript JXA bridge. Secrets arrive only on stdin.
|
|
2
|
+
ObjC.import('Foundation');
|
|
3
|
+
ObjC.import('Security');
|
|
4
|
+
ObjC.import('stdlib');
|
|
5
|
+
function run(args) {
|
|
6
|
+
try {
|
|
7
|
+
const operation = args[0], target = args[1];
|
|
8
|
+
if (!/^com\.tuya\.microapp\.developer\/[0-9a-f-]{36}\/(app-key|secret-key)$/i.test(target || '')) $.exit(5);
|
|
9
|
+
const keychain = Ref();
|
|
10
|
+
const path = ObjC.unwrap($.NSHomeDirectory()) + '/Library/Keychains/login.keychain-db';
|
|
11
|
+
if ($.SecKeychainOpen(path, keychain) !== 0) $.exit(4);
|
|
12
|
+
const cf = value => ObjC.castRefToObject(value);
|
|
13
|
+
const attributes = $.NSMutableDictionary.alloc.init;
|
|
14
|
+
attributes.setObjectForKey(cf($.kSecClassGenericPassword), cf($.kSecClass));
|
|
15
|
+
attributes.setObjectForKey($(target), cf($.kSecAttrService));
|
|
16
|
+
attributes.setObjectForKey($('tuya-microapp'), cf($.kSecAttrAccount));
|
|
17
|
+
attributes.setObjectForKey(cf(keychain[0]), cf($.kSecUseKeychain));
|
|
18
|
+
if (operation === 'read') {
|
|
19
|
+
attributes.removeObjectForKey(cf($.kSecUseKeychain));
|
|
20
|
+
attributes.setObjectForKey($.NSArray.arrayWithObject(cf(keychain[0])), cf($.kSecMatchSearchList));
|
|
21
|
+
attributes.setObjectForKey($.NSNumber.numberWithBool(true), cf($.kSecReturnData));
|
|
22
|
+
const result = Ref();
|
|
23
|
+
const status = $.SecItemCopyMatching(attributes, result);
|
|
24
|
+
if (status === -25300) $.exit(3);
|
|
25
|
+
if (status !== 0) $.exit(4);
|
|
26
|
+
$.NSFileHandle.fileHandleWithStandardOutput.writeData(cf(result[0]));
|
|
27
|
+
$.exit(0);
|
|
28
|
+
}
|
|
29
|
+
if (operation !== 'write') $.exit(5);
|
|
30
|
+
const data = $.NSFileHandle.fileHandleWithStandardInput.readDataToEndOfFile;
|
|
31
|
+
if (Number(data.length) > 20000) $.exit(5);
|
|
32
|
+
const value = JSON.parse(ObjC.unwrap($.NSString.alloc.initWithDataEncoding(data, $.NSUTF8StringEncoding)));
|
|
33
|
+
if (typeof value !== 'string' || !value.trim() || /[\r\n\0]/.test(value)) $.exit(5);
|
|
34
|
+
attributes.setObjectForKey($(value).dataUsingEncoding($.NSUTF8StringEncoding), cf($.kSecValueData));
|
|
35
|
+
const status = $.SecItemAdd(attributes, null);
|
|
36
|
+
// Never overwrite existing entries. Rotation always uses a fresh profile.
|
|
37
|
+
if (status === -25299) $.exit(6);
|
|
38
|
+
if (status !== 0) $.exit(4);
|
|
39
|
+
$.exit(0);
|
|
40
|
+
} catch (_) { $.exit(5); }
|
|
41
|
+
}
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
import { readdirSync, rmSync } from 'node:fs';
|
|
2
|
+
import { join } from 'node:path';
|
|
3
|
+
import { randomUUID } from 'node:crypto';
|
|
4
|
+
import { systemStore } from './store.mjs';
|
|
5
|
+
import { layout, initialize, profilePath, readState, writeState, hash, fail, lock } from './state.mjs';
|
|
6
|
+
import { configureWizard, wizardOperation, assertNoCredentialWorker } from './wizard.mjs';
|
|
7
|
+
import { registryCredentialsFromEnv, DEFAULT_REGISTRY_ENDPOINT } from '../../resources/scripts/registry-client.mjs';
|
|
8
|
+
|
|
9
|
+
import { resolveWorkspaceTarget, targetEnvironment, assertTarget } from '../workspace.mjs';
|
|
10
|
+
|
|
11
|
+
const credentialKeys = ['SDF_APP_KEY', 'SDF_DEVELOPER_CODE', 'SDF_SECRET_KEY', 'SDF_DEVELOPER_SECRET'];
|
|
12
|
+
export function endpointFor(environment = {}) {
|
|
13
|
+
const value = environment.SDF_ENDPOINT, alias = environment.SDF_API_ORIGIN;
|
|
14
|
+
if (value !== undefined && alias !== undefined && value !== alias) fail('AUTH_ENDPOINT_CONFLICT');
|
|
15
|
+
try {
|
|
16
|
+
const url = new URL(value ?? alias ?? DEFAULT_REGISTRY_ENDPOINT);
|
|
17
|
+
if (url.protocol !== 'https:' || url.username || url.password || url.search || url.hash || url.pathname !== '/') throw new Error();
|
|
18
|
+
return url.origin;
|
|
19
|
+
} catch { fail('AUTH_ENDPOINT_INVALID'); }
|
|
20
|
+
}
|
|
21
|
+
function environmentCredentials(environment) {
|
|
22
|
+
try { return { ...registryCredentialsFromEnv(environment), baseUrl: endpointFor(environment) }; }
|
|
23
|
+
catch (error) { if (error.code?.startsWith('AUTH_')) throw error; fail('DEVELOPER_CREDENTIALS_REQUIRED'); }
|
|
24
|
+
}
|
|
25
|
+
function profile(context, binding) {
|
|
26
|
+
if (binding?.format !== 'microapp-auth-binding-v1') fail('AUTH_STATE_INVALID');
|
|
27
|
+
const value = readState(profilePath(context.root, binding.profileRef));
|
|
28
|
+
if (value?.format !== 'microapp-auth-profile-v1' || value.id !== binding.profileRef
|
|
29
|
+
|| typeof value.provider !== 'string' || !/^[a-f0-9]{64}$/.test(value.accountFingerprint || '')) fail('AUTH_PROFILE_MISSING');
|
|
30
|
+
endpointFor({ SDF_ENDPOINT: value.endpoint });
|
|
31
|
+
return value;
|
|
32
|
+
}
|
|
33
|
+
export async function resolveDeveloperCredentials({ project, environment = process.env, stateRoot, store = systemStore({ environment }), source = 'auto', workspaceRoot }) {
|
|
34
|
+
const target = resolveWorkspaceTarget({ project, stateRoot, workspaceRoot, environment });
|
|
35
|
+
environment = targetEnvironment(environment, target);
|
|
36
|
+
if (!['auto', 'system', 'environment'].includes(source)) fail('AUTH_SOURCE_INVALID');
|
|
37
|
+
if (source === 'environment') return { ...environmentCredentials(environment), workspaceTarget: target };
|
|
38
|
+
const context = layout(project, { stateRoot, environment });
|
|
39
|
+
const binding = readState(context.binding);
|
|
40
|
+
if (binding) {
|
|
41
|
+
const selected = profile(context, binding);
|
|
42
|
+
assertTarget(target, selected);
|
|
43
|
+
if (selected.provider !== store.provider) fail('AUTH_STORE_UNAVAILABLE');
|
|
44
|
+
if ((environment.SDF_ENDPOINT !== undefined || environment.SDF_API_ORIGIN !== undefined)
|
|
45
|
+
&& endpointFor(environment) !== selected.endpoint) fail('AUTH_ENDPOINT_CONFLICT');
|
|
46
|
+
const credentials = await store.read(selected.id);
|
|
47
|
+
if (!credentials.developerCode?.trim() || !credentials.secret?.trim()) fail('AUTH_CREDENTIALS_INCOMPLETE');
|
|
48
|
+
if (hash(selected.endpoint + '\0' + credentials.developerCode) !== selected.accountFingerprint) fail('AUTH_ACCOUNT_CHANGED');
|
|
49
|
+
if (credentialKeys.some(key => environment[key] !== undefined)) {
|
|
50
|
+
const supplied = environmentCredentials(environment);
|
|
51
|
+
if (supplied.developerCode !== credentials.developerCode || supplied.secret !== credentials.secret) fail('AUTH_SOURCE_CONFLICT');
|
|
52
|
+
}
|
|
53
|
+
return { ...credentials, baseUrl: selected.endpoint, workspaceTarget: target };
|
|
54
|
+
}
|
|
55
|
+
if (source === 'system') fail('AUTH_PROFILE_MISSING');
|
|
56
|
+
return { ...environmentCredentials(environment), workspaceTarget: target };
|
|
57
|
+
}
|
|
58
|
+
export async function authOperation(action, { project, environment = process.env, stateRoot, store = systemStore({ environment }), profileRef, confirmForget = false, label, input, output, timeoutSeconds, workspaceRoot } = {}) {
|
|
59
|
+
const target = resolveWorkspaceTarget({ project, stateRoot, workspaceRoot, environment });
|
|
60
|
+
environment = targetEnvironment(environment, target);
|
|
61
|
+
workspaceRoot = target.workspaceRoot;
|
|
62
|
+
if (['setup', 'wait', 'profiles', 'use'].includes(action)) {
|
|
63
|
+
return wizardOperation(action, { project, environment, stateRoot, store, profileRef, label, input, output, timeoutSeconds, workspaceRoot });
|
|
64
|
+
}
|
|
65
|
+
const context = { ...layout(project, { stateRoot, environment }), workspaceRoot };
|
|
66
|
+
const pendingPath = join(context.root, 'pending', hash(context.project) + '.json');
|
|
67
|
+
const binding = readState(context.binding);
|
|
68
|
+
const pending = readState(pendingPath);
|
|
69
|
+
const selected = binding ? profile(context, binding) : undefined;
|
|
70
|
+
if (selected) assertTarget(target, selected);
|
|
71
|
+
if (pending) assertTarget(target, pending);
|
|
72
|
+
const base = { environment: target.environment, operation: 'auth.' + action, endpoint: selected?.endpoint || endpointFor(environment) };
|
|
73
|
+
if (['guide', 'status'].includes(action)) {
|
|
74
|
+
const systemAvailable = await store.available();
|
|
75
|
+
let environmentReady = false;
|
|
76
|
+
try { environmentCredentials(environment); environmentReady = true; } catch {}
|
|
77
|
+
const recommended = binding ? 'system' : environmentReady ? 'environment' : systemAvailable ? 'system' : 'session';
|
|
78
|
+
return { ...base, status: pending ? 'needs-user-action' : 'complete',
|
|
79
|
+
authState: binding && !pending ? 'configured' : 'setup_required', bindingConfigured: Boolean(binding),
|
|
80
|
+
...(binding ? { profileRef: binding.profileRef, label: selected.label || 'Developer account' } : {}), serverVerification: 'unknown',
|
|
81
|
+
priority: environmentReady ? ['system', 'environment', 'session'] : ['system', 'session'], recommended,
|
|
82
|
+
providers: [
|
|
83
|
+
{ source: 'system', provider: store.provider, available: systemAvailable, configured: Boolean(binding), checkedAt: selected?.checkedAt },
|
|
84
|
+
{ source: 'environment', configured: environmentReady, requiresHostSecretInjection: false, existingInjectionOnly: true },
|
|
85
|
+
{ source: 'session', available: true, requiresUserTerminal: true, persistent: false },
|
|
86
|
+
],
|
|
87
|
+
...(pending ? { pendingProfileRef: pending.profileRef, setupStatus: pending.status || 'awaiting_input' } : {}),
|
|
88
|
+
nextActions: [pending ? 'This setup is not complete. Keep the previous binding as retained data only; wait for pendingProfileRef with auth wait before continuing the requested publication.' : binding ? 'Use the configured system profile. If access fails and cannot be repaired, explicitly choose a hidden-input release session; use environment only when safe injection is already configured. Never silently switch accounts.'
|
|
89
|
+
: recommended === 'environment' ? 'Use the already configured host Secret injection; do not print its values.'
|
|
90
|
+
: recommended === 'system' ? 'Run auth profiles and follow its selection guidance for explicit same-endpoint reuse. Never choose by label or date alone. If the user cannot identify a profile, run auth configure and give only its userCommand to the user; wait with auth wait --profile <returned profileRef>.'
|
|
91
|
+
: 'Prepare release session and let the user run its hidden-input worker in a local terminal. Track sanitized progress with release session-status. Do not ask local users to configure host Secrets or export credentials.'],
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
if (!['configure', 'check', 'logout', 'forget'].includes(action)) fail('INVALID_OPERATION');
|
|
95
|
+
initialize(context.root);
|
|
96
|
+
const unlock = lock(context.root, 'binding:' + context.project);
|
|
97
|
+
try {
|
|
98
|
+
if (action === 'configure') {
|
|
99
|
+
if (!await store.available()) fail('AUTH_STORE_UNAVAILABLE');
|
|
100
|
+
return configureWizard(context, { environment, store, label, current: readState(context.binding) });
|
|
101
|
+
}
|
|
102
|
+
assertNoCredentialWorker(context);
|
|
103
|
+
if (action === 'check') {
|
|
104
|
+
const current = readState(context.binding), setup = readState(pendingPath);
|
|
105
|
+
const id = setup?.profileRef || current?.profileRef;
|
|
106
|
+
if (!id) fail('AUTH_PROFILE_MISSING');
|
|
107
|
+
const settings = setup || profile(context, current);
|
|
108
|
+
if (settings.provider !== store.provider) fail('AUTH_STORE_UNAVAILABLE');
|
|
109
|
+
if ((environment.SDF_ENDPOINT !== undefined || environment.SDF_API_ORIGIN !== undefined)
|
|
110
|
+
&& endpointFor(environment) !== settings.endpoint) fail('AUTH_ENDPOINT_CONFLICT');
|
|
111
|
+
const credentials = await store.read(id);
|
|
112
|
+
if (!credentials.developerCode?.trim() || !credentials.secret?.trim()) fail('AUTH_CREDENTIALS_INCOMPLETE');
|
|
113
|
+
const checkedAt = new Date().toISOString();
|
|
114
|
+
writeState(profilePath(context.root, id), { format: 'microapp-auth-profile-v1', id, provider: store.provider,
|
|
115
|
+
endpoint: settings.endpoint, ...(settings.label ? { label: settings.label } : {}), accountFingerprint: hash(settings.endpoint + '\0' + credentials.developerCode), checkedAt });
|
|
116
|
+
writeState(context.binding, { format: 'microapp-auth-binding-v1', profileRef: id });
|
|
117
|
+
rmSync(pendingPath, { force: true });
|
|
118
|
+
return { ...base, status: 'complete', authState: 'configured', profileRef: id, provider: store.provider, serverVerification: 'unknown' };
|
|
119
|
+
}
|
|
120
|
+
if (action === 'logout') {
|
|
121
|
+
rmSync(context.binding, { force: true });
|
|
122
|
+
rmSync(pendingPath, { force: true });
|
|
123
|
+
return { ...base, status: 'complete', authState: 'setup_required', credentialsRetained: Boolean(binding || pending), platformRevoked: false };
|
|
124
|
+
}
|
|
125
|
+
const id = profileRef || binding?.profileRef || pending?.profileRef;
|
|
126
|
+
if (!id) fail('AUTH_PROFILE_MISSING');
|
|
127
|
+
profilePath(context.root, id);
|
|
128
|
+
if (!confirmForget) fail('AUTH_FORGET_CONFIRMATION_REQUIRED');
|
|
129
|
+
// Restrict deletion to the profile already selected/prepared for this project.
|
|
130
|
+
if (id !== binding?.profileRef && id !== pending?.profileRef) fail('AUTH_PROFILE_MISSING');
|
|
131
|
+
const releaseProfile = lock(context.root, 'profile:' + id);
|
|
132
|
+
try {
|
|
133
|
+
const target = readState(profilePath(context.root, id)) || pending;
|
|
134
|
+
if (target?.provider !== store.provider) fail('AUTH_STORE_UNAVAILABLE');
|
|
135
|
+
const bindings = readdirSync(join(context.root, 'bindings')).filter(name => name.endsWith('.json'));
|
|
136
|
+
const affected = bindings.filter(name => readState(join(context.root, 'bindings', name))?.profileRef === id);
|
|
137
|
+
if (affected.length > (binding?.profileRef === id ? 1 : 0)) fail('AUTH_PROFILE_IN_USE');
|
|
138
|
+
await store.remove(id);
|
|
139
|
+
rmSync(profilePath(context.root, id), { force: true });
|
|
140
|
+
if (binding?.profileRef === id) rmSync(context.binding, { force: true });
|
|
141
|
+
if (pending?.profileRef === id) rmSync(pendingPath, { force: true });
|
|
142
|
+
return { ...base, status: 'complete', authState: 'setup_required', credentialsRetained: false, platformRevoked: false };
|
|
143
|
+
} finally { releaseProfile(); }
|
|
144
|
+
} finally { unlock(); }
|
|
145
|
+
}
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
import { resolveWorkspaceTarget, assertTarget } from '../workspace.mjs';
|
|
2
|
+
import { existsSync, mkdirSync, rmSync, writeFileSync } from 'node:fs';
|
|
3
|
+
import { join, dirname } from 'node:path';
|
|
4
|
+
import { fileURLToPath } from 'node:url';
|
|
5
|
+
import { randomUUID } from 'node:crypto';
|
|
6
|
+
import { ID, layout, initialize, readState, writeState, hash, fail, privatePath } from './state.mjs';
|
|
7
|
+
import { endpointFor } from './manager.mjs';
|
|
8
|
+
import { hiddenInput } from './hidden-input.mjs';
|
|
9
|
+
import { inspectProjectRelease, publishRelease, publicationReason } from '../publication.mjs';
|
|
10
|
+
import { safeCliError } from '../errors.mjs';
|
|
11
|
+
import { publicationContext } from '../release-index.mjs';
|
|
12
|
+
|
|
13
|
+
const running = new Set(['awaiting_input', 'running', 'unknown']);
|
|
14
|
+
const safeStage = value => typeof value === 'string' && /^[A-Z][A-Z0-9_]{0,63}$/.test(value) ? value : 'UNKNOWN';
|
|
15
|
+
function sessionFile(root, id) {
|
|
16
|
+
if (!ID.test(id || '')) fail('AUTH_SESSION_INVALID');
|
|
17
|
+
return join(root, 'sessions', id + '.json');
|
|
18
|
+
}
|
|
19
|
+
function readSession(context, id) {
|
|
20
|
+
const value = readState(sessionFile(context.root, id));
|
|
21
|
+
if (value?.format !== 'microapp-publication-session-v1' || value.id !== id || value.project !== context.project
|
|
22
|
+
|| typeof value.output !== 'string' || !/^[a-f0-9]{64}$/.test(value.fingerprint || '')
|
|
23
|
+
|| !['awaiting_input', 'running', 'unknown', 'failed', 'complete', 'interrupted', 'closed'].includes(value.status)) fail('AUTH_SESSION_INVALID');
|
|
24
|
+
endpointFor({ SDF_ENDPOINT: value.endpoint });
|
|
25
|
+
return value;
|
|
26
|
+
}
|
|
27
|
+
function publicSession(value) {
|
|
28
|
+
return { operation: 'release.session-status', status: value.status, sessionId: value.id,
|
|
29
|
+
stage: safeStage(value.stage), updatedAt: value.updatedAt, credentialSource: 'session', persistentCredentials: false,
|
|
30
|
+
...(value.errorCode ? { errorCode: safeCliError({ code: value.errorCode }).errorCode } : {}),
|
|
31
|
+
...publicationReason(value.reasonCode),
|
|
32
|
+
...(value.microAppVersion && /^[0-9]+\.[0-9]+\.[0-9]+-[0-9]+$/.test(value.microAppVersion) ? { microAppVersion: value.microAppVersion } : {}),
|
|
33
|
+
artifactsReady: value.status === 'complete', productionReady: false,
|
|
34
|
+
...(typeof value.publicationOutput === 'string' ? { publicationOutput: value.publicationOutput } : {}),
|
|
35
|
+
...(['new', 'new-content', 'retry-terminal', 'resume-existing', 'reuse-complete'].includes(value.decision) ? { decision: value.decision } : {}),
|
|
36
|
+
...(value.buildTaskId && /^[A-Za-z0-9_-]{1,64}$/.test(value.buildTaskId) ? { buildTaskId: value.buildTaskId } : {}),
|
|
37
|
+
...(value.status === 'failed' && value.buildLogs ? { buildLogs: value.buildLogs } : {}),
|
|
38
|
+
...(value.status === 'failed' ? { nextActions: ['Inspect the original task and correct the rejected source before preparing a new release. Keep the existing request and task identifiers.'] } : {}),
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
export function prepareSession({ project, output, stateRoot, environment = process.env, bundleSha256, newAttempt = false, workspaceRoot }) {
|
|
42
|
+
const target = resolveWorkspaceTarget({ project, stateRoot, workspaceRoot, environment });
|
|
43
|
+
const context = layout(project, { stateRoot, environment });
|
|
44
|
+
const prepared = inspectProjectRelease({ project, output, stateRoot, environment });
|
|
45
|
+
initialize(context.root);
|
|
46
|
+
const id = randomUUID();
|
|
47
|
+
const state = { format: 'microapp-publication-session-v1', id, project: context.project, output: prepared.output,
|
|
48
|
+
endpoint: target.endpoint, environment: target.environment, workspaceRoot: target.workspaceRoot, fingerprint: prepared.fingerprint, bundleSha256, newAttempt,
|
|
49
|
+
publicationStateRoot: dirname(publicationContext(project, { stateRoot, environment }).root),
|
|
50
|
+
status: 'awaiting_input', stage: 'AWAITING_CREDENTIALS', updatedAt: new Date().toISOString() };
|
|
51
|
+
writeState(sessionFile(context.root, id), state);
|
|
52
|
+
return { ...publicSession(state), operation: 'release.session', status: 'needs-user-action',
|
|
53
|
+
userCommand: { executable: process.execPath, args: [fileURLToPath(new URL('../../cli.mjs', import.meta.url)),
|
|
54
|
+
'release', 'session-run', '--project', context.project, '--session', id, '--state-root', context.root, '--workspace-root', target.workspaceRoot] },
|
|
55
|
+
nextActions: ['Have the user run userCommand in their own terminal and enter both keys without echo. Poll release session-status; do not run an input-recording tool or put keys in arguments.'],
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
export function sessionStatus({ project, sessionId, stateRoot, environment = process.env, workspaceRoot }) {
|
|
59
|
+
const context = layout(project, { stateRoot, environment });
|
|
60
|
+
const state = readSession(context, sessionId);
|
|
61
|
+
assertTarget(resolveWorkspaceTarget({ project, stateRoot, workspaceRoot, environment }), state);
|
|
62
|
+
const lease = readState(join(context.root, 'leases', hash(state.output) + '.json'));
|
|
63
|
+
if (running.has(state.status) && lease?.sessionId === sessionId) {
|
|
64
|
+
try { process.kill(lease.pid, 0); }
|
|
65
|
+
catch (error) { if (error.code === 'ESRCH') return { ...publicSession(state), status: 'interrupted', errorCode: 'AUTH_SESSION_INTERRUPTED' }; }
|
|
66
|
+
}
|
|
67
|
+
return publicSession(state);
|
|
68
|
+
}
|
|
69
|
+
export function closeSession({ project, sessionId, stateRoot, environment = process.env, workspaceRoot }) {
|
|
70
|
+
const context = layout(project, { stateRoot, environment });
|
|
71
|
+
const state = readSession(context, sessionId);
|
|
72
|
+
const lease = readState(join(context.root, 'leases', hash(state.output) + '.json'));
|
|
73
|
+
if (lease?.sessionId === sessionId) {
|
|
74
|
+
try { process.kill(lease.pid, 0); fail('AUTH_BUSY'); }
|
|
75
|
+
catch (error) { if (error.code !== 'ESRCH') throw error; }
|
|
76
|
+
}
|
|
77
|
+
writeState(sessionFile(context.root, sessionId), { ...state, status: 'closed', updatedAt: new Date().toISOString() });
|
|
78
|
+
return { operation: 'release.session-close', status: 'complete', sessionId, platformCancelled: false,
|
|
79
|
+
nextActions: ['The local credential session is closed. Cloud tasks and publication records are retained; use release status to inspect them.'] };
|
|
80
|
+
}
|
|
81
|
+
function acquireLease(context, state) {
|
|
82
|
+
const directory = join(context.root, 'leases', hash(state.output) + '.lock');
|
|
83
|
+
const record = join(context.root, 'leases', hash(state.output) + '.json');
|
|
84
|
+
privatePath(directory);
|
|
85
|
+
if (existsSync(directory)) {
|
|
86
|
+
const previous = readState(record);
|
|
87
|
+
if (!previous || !Number.isInteger(previous.pid) || previous.pid <= 0) fail('AUTH_BUSY');
|
|
88
|
+
try { process.kill(previous.pid, 0); fail('AUTH_BUSY'); }
|
|
89
|
+
catch (error) { if (error.code !== 'ESRCH') throw error; }
|
|
90
|
+
rmSync(directory, { recursive: true });
|
|
91
|
+
rmSync(record, { force: true });
|
|
92
|
+
}
|
|
93
|
+
try { mkdirSync(directory, { mode: 0o700 }); } catch { fail('AUTH_BUSY'); }
|
|
94
|
+
try { writeFileSync(record, JSON.stringify({ pid: process.pid, sessionId: state.id }), { flag: 'wx', mode: 0o600 }); }
|
|
95
|
+
catch { rmSync(directory, { recursive: true, force: true }); fail('AUTH_BUSY'); }
|
|
96
|
+
return () => { rmSync(record, { force: true }); rmSync(directory, { recursive: true, force: true }); };
|
|
97
|
+
}
|
|
98
|
+
export async function runSession({ project, sessionId, stateRoot, environment = process.env, bundleSha256,
|
|
99
|
+
prompt = hiddenInput, publish = publishRelease, sleep = ms => new Promise(resolve => setTimeout(resolve, ms)),
|
|
100
|
+
workspaceRoot, intervalMs = 5000, maxDurationMs = 60 * 60 * 1000, clock = Date.now } = {}) {
|
|
101
|
+
const context = layout(project, { stateRoot, environment });
|
|
102
|
+
let state = readSession(context, sessionId);
|
|
103
|
+
const target = resolveWorkspaceTarget({ project, stateRoot, workspaceRoot: workspaceRoot || state.workspaceRoot, environment });
|
|
104
|
+
assertTarget(target, state);
|
|
105
|
+
if (state.status === 'closed') fail('AUTH_SESSION_CLOSED');
|
|
106
|
+
if (state.bundleSha256 !== bundleSha256) fail('PROJECT_VERSION_MISMATCH');
|
|
107
|
+
if (inspectProjectRelease({ project: context.project, output: state.output, stateRoot: state.publicationStateRoot, environment }).fingerprint !== state.fingerprint) fail('RELEASE_ARTIFACT_MISMATCH');
|
|
108
|
+
if (state.status === 'complete') return publicSession(state);
|
|
109
|
+
const unlock = acquireLease(context, state);
|
|
110
|
+
let developerCode, secret;
|
|
111
|
+
const save = fields => {
|
|
112
|
+
state = { ...state, ...fields, updatedAt: new Date().toISOString() };
|
|
113
|
+
writeState(sessionFile(context.root, sessionId), state);
|
|
114
|
+
};
|
|
115
|
+
try {
|
|
116
|
+
save({ status: 'awaiting_input', stage: 'AWAITING_CREDENTIALS', errorCode: undefined, reasonCode: undefined });
|
|
117
|
+
developerCode = await prompt('App Key');
|
|
118
|
+
secret = await prompt('Secret Key');
|
|
119
|
+
if (![developerCode, secret].every(value => typeof value === 'string' && value.trim() && value.length <= 4096 && !/[\r\n\0]/.test(value))) fail('AUTH_CREDENTIALS_INCOMPLETE');
|
|
120
|
+
// Exact new environment: no build/model credentials inherited. Never persist these values.
|
|
121
|
+
const credentials = { SDF_ENDPOINT: state.endpoint, SDF_APP_KEY: developerCode, SDF_SECRET_KEY: secret };
|
|
122
|
+
const started = clock();
|
|
123
|
+
let action = existsSync(join(state.output, 'publication.json')) ? 'resume' : 'publish';
|
|
124
|
+
for (;;) {
|
|
125
|
+
if (clock() - started >= maxDurationMs) fail('AUTH_SESSION_TIMEOUT');
|
|
126
|
+
const result = await publish(action, { project: context.project, output: state.output,
|
|
127
|
+
environment: credentials, stateRoot: state.publicationStateRoot, workspaceRoot: target.workspaceRoot, credentialSource: 'environment',
|
|
128
|
+
newAttempt: Boolean(state.newAttempt && action === 'publish') });
|
|
129
|
+
const status = ['complete', 'failed', 'running', 'unknown'].includes(result.status) ? result.status : 'unknown';
|
|
130
|
+
save({ status, stage: safeStage(result.stage), reasonCode: publicationReason(result.reasonCode).reasonCode,
|
|
131
|
+
decision: result.decision, publicationOutput: result.publicationOutput,
|
|
132
|
+
...(result.microAppVersion ? { microAppVersion: result.microAppVersion } : {}),
|
|
133
|
+
...(result.buildTaskId ? { buildTaskId: result.buildTaskId } : {}),
|
|
134
|
+
...(status === 'failed' && result.buildLogs ? { buildLogs: {
|
|
135
|
+
status: result.buildLogs.status === 'complete' ? 'complete' : 'unavailable',
|
|
136
|
+
available: result.buildLogs.available === true,
|
|
137
|
+
truncated: result.buildLogs.truncated === true,
|
|
138
|
+
text: typeof result.buildLogs.text === 'string'
|
|
139
|
+
? result.buildLogs.text.replaceAll(developerCode, '[REDACTED]').replaceAll(secret, '[REDACTED]').slice(-32768) : '',
|
|
140
|
+
...(result.buildLogs.status !== 'complete' ? { errorCode: 'BUILD_LOGS_UNAVAILABLE' } : {}),
|
|
141
|
+
} } : {}) });
|
|
142
|
+
if (status === 'complete' || status === 'failed') return publicSession(state);
|
|
143
|
+
// Advance only missing/incomplete backend upload. Already queued/building tasks are queried.
|
|
144
|
+
action = ['BACKEND_NOT_SUBMITTED', 'UPLOADING'].includes(result.stage) ? 'resume' : 'status';
|
|
145
|
+
await sleep(intervalMs);
|
|
146
|
+
}
|
|
147
|
+
} catch (error) {
|
|
148
|
+
const failure = safeCliError(error);
|
|
149
|
+
save({ status: ['AUTH_INPUT_CANCELLED', 'AUTH_SESSION_TIMEOUT'].includes(failure.errorCode) ? 'interrupted' : 'unknown',
|
|
150
|
+
stage: 'ACTION_REQUIRED', errorCode: failure.errorCode });
|
|
151
|
+
return { ...publicSession(state), nextActions: failure.nextActions || ['Run the same session worker again to resume the original release.'] };
|
|
152
|
+
} finally { developerCode = undefined; secret = undefined; unlock(); }
|
|
153
|
+
}
|