@tuya-sat/microapp-kit 0.0.0-stage → 0.1.26-alpha.0
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 +45 -0
- package/MAINTAINING.md +143 -0
- package/README.md +53 -2
- package/START-HERE.md +40 -0
- package/bootstrap/build-install-page.mjs +44 -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 +64 -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 +110 -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 +41 -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 +98 -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 +38 -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/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 +213 -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 +48 -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 +60 -0
- package/skills/micro-app-development/references/toolchain-access.md +33 -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,417 @@
|
|
|
1
|
+
import { test } from 'node:test';
|
|
2
|
+
import assert from 'node:assert/strict';
|
|
3
|
+
import { mkdtempSync, mkdirSync, writeFileSync, readFileSync, rmSync, utimesSync, realpathSync } 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 { gzipSync, gunzipSync } from 'node:zlib';
|
|
9
|
+
import { publishRelease, planRelease } from '../publication.mjs';
|
|
10
|
+
import { publicationHistory, publicationContext } from '../release-index.mjs';
|
|
11
|
+
import { archiveContent, releaseContent } from '../release-content.mjs';
|
|
12
|
+
import { tarFixture } from './helpers/tar-fixture.mjs';
|
|
13
|
+
import { prepareSession, runSession } from '../auth/session.mjs';
|
|
14
|
+
|
|
15
|
+
const hash = value => createHash('sha256').update(value).digest('hex');
|
|
16
|
+
function workspace(t) {
|
|
17
|
+
const root = realpathSync(mkdtempSync(join(tmpdir(), 'microapp-recovery-')));
|
|
18
|
+
t.after(() => rmSync(root, { recursive: true, force: true }));
|
|
19
|
+
const project = join(root, 'project');
|
|
20
|
+
mkdirSync(project);
|
|
21
|
+
return { root, project, stateRoot: join(root, 'state'),
|
|
22
|
+
environment: { SDF_APP_KEY: 'recovery-fixture-key', SDF_SECRET_KEY: 'recovery-fixture-secret' } };
|
|
23
|
+
}
|
|
24
|
+
function prepare(f, name, { frontend = 'front', backend = 'back', stamp = 1, database = false, description = 'Device app', versionDescription = 'Initial release', versionDescriptionEn = 'Initial release' } = {}) {
|
|
25
|
+
const output = join(f.root, name);
|
|
26
|
+
mkdirSync(join(output, 'artifacts'), { recursive: true });
|
|
27
|
+
mkdirSync(join(output, 'build/frontend/package'), { recursive: true });
|
|
28
|
+
const app = { appName: 'recovery-demo-123-customer', description, versionDescription };
|
|
29
|
+
writeFileSync(join(output, 'build/frontend/package/manifest.json'), JSON.stringify(app));
|
|
30
|
+
const front = tarFixture({ 'package/manifest.json': JSON.stringify(app), 'package/dist/index.html': frontend, 'package/_locales/mf/en.json': JSON.stringify({ versionDescription: versionDescriptionEn }) }, { stamp });
|
|
31
|
+
const back = tarFixture({ 'server.mjs': backend }, { stamp });
|
|
32
|
+
writeFileSync(join(output, 'artifacts/source.tgz'), front);
|
|
33
|
+
writeFileSync(join(output, 'artifacts/backend-context.tgz'), back);
|
|
34
|
+
writeFileSync(join(output, 'artifacts/release-artifacts.json'), JSON.stringify({
|
|
35
|
+
format: 'v6-release-artifacts-v2', build: { microAppCode: 'recovery-demo-123-customer', microAppCodeSource: 'publication', backendRequired: true, databaseRequired: database,
|
|
36
|
+
sourceDigest: hash('build-input-' + stamp), ...(database ? { digests: { 'backend-context/deploy/manifest.json': hash('schema') } } : {}) },
|
|
37
|
+
static: { file: 'source.tgz', sha256: hash(front) }, backend: { file: 'backend-context.tgz', sha256: hash(back) },
|
|
38
|
+
}));
|
|
39
|
+
return output;
|
|
40
|
+
}
|
|
41
|
+
function publishingService() {
|
|
42
|
+
const fronts = [], builds = [];
|
|
43
|
+
const state = { registrations: 0, uploads: 0, loseFrontend: false, unavailable: false, expired: false };
|
|
44
|
+
const ok = result => ({ ok: true, status: 200, json: async () => ({ success: true, result }) });
|
|
45
|
+
const error = code => ({ ok: true, status: 200, json: async () => ({ success: false, code }) });
|
|
46
|
+
const fetchImpl = async (url, request) => {
|
|
47
|
+
if (state.unavailable) throw new Error('private-server-detail');
|
|
48
|
+
if (url.pathname.endsWith('registry-smarthome')) {
|
|
49
|
+
if (request.method === 'POST') {
|
|
50
|
+
state.registrations++;
|
|
51
|
+
const number = fronts.length + 1;
|
|
52
|
+
const task = { taskId: 'front-' + number, releaseId: 'release-' + number, requestId: request.body.get('requestId'),
|
|
53
|
+
microAppCode: request.body.get('code'), microAppVersion: '0.0.0-' + number,
|
|
54
|
+
backendRequired: request.body.get('backendRequired') === 'true', databaseRequired: request.body.get('databaseRequired') === 'true', status: 'SUCCESS' };
|
|
55
|
+
fronts.push(task);
|
|
56
|
+
if (state.loseFrontend) { state.loseFrontend = false; throw new Error('private-server-detail'); }
|
|
57
|
+
return ok(task);
|
|
58
|
+
}
|
|
59
|
+
const task = fronts.find(task => task.taskId === url.searchParams.get('taskId') || task.requestId === url.searchParams.get('requestId'));
|
|
60
|
+
return task ? ok(task) : error('SMARTHOME_TASK_NOT_FOUND');
|
|
61
|
+
}
|
|
62
|
+
if (url.pathname.endsWith('backend-build')) {
|
|
63
|
+
if (request.method === 'POST') {
|
|
64
|
+
state.uploads++;
|
|
65
|
+
let task = builds.find(task => task.requestId === request.body.get('requestId'));
|
|
66
|
+
if (!task) {
|
|
67
|
+
task = { buildTaskId: 'build-' + (builds.length + 1), requestId: request.body.get('requestId'),
|
|
68
|
+
releaseId: request.body.get('releaseId'), microAppCode: request.body.get('microAppCode'), status: 'QUEUED' };
|
|
69
|
+
builds.push(task);
|
|
70
|
+
}
|
|
71
|
+
if (state.expired) { task.status = 'FAILED'; task.errorCode = 'UPLOAD_NOT_COMPLETED'; return ok(task); }
|
|
72
|
+
task.status = 'QUEUED';
|
|
73
|
+
return ok(task);
|
|
74
|
+
}
|
|
75
|
+
const task = builds.find(task => task.buildTaskId === url.searchParams.get('buildTaskId') || task.requestId === url.searchParams.get('requestId'));
|
|
76
|
+
return task ? ok(task) : error('1002');
|
|
77
|
+
}
|
|
78
|
+
throw new Error('unexpected endpoint');
|
|
79
|
+
};
|
|
80
|
+
return { state, fronts, builds, fetchImpl };
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
function complete(task) {
|
|
84
|
+
Object.assign(task, { status: 'COMPLETE', backendRegistered: true,
|
|
85
|
+
imageTag: 'v-20261020093000123-0123456789abcdef', imageDigest: 'sha256:' + 'a'.repeat(64) });
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
test('repackaged identical content resumes the original version and uses the original archive bytes', async t => {
|
|
89
|
+
const f = workspace(t), p = publishingService();
|
|
90
|
+
const original = prepare(f, 'original');
|
|
91
|
+
// Stop after frontend registration, before a backend upload exists.
|
|
92
|
+
p.state.loseFrontend = true;
|
|
93
|
+
await assert.rejects(publishRelease('publish', { ...f, output: original, fetchImpl: p.fetchImpl }));
|
|
94
|
+
const next = prepare(f, 'repacked', { stamp: 9 });
|
|
95
|
+
assert.notEqual(hash(readFileSync(join(original, 'artifacts/source.tgz'))), hash(readFileSync(join(next, 'artifacts/source.tgz'))));
|
|
96
|
+
const oldBack = readFileSync(join(original, 'artifacts/backend-context.tgz'));
|
|
97
|
+
const result = await publishRelease('publish', { ...f, output: next, fetchImpl: async (url, request) => {
|
|
98
|
+
if (request.method === 'POST' && url.pathname.endsWith('backend-build')) {
|
|
99
|
+
assert.deepEqual(Buffer.from(await request.body.get('file').arrayBuffer()), oldBack);
|
|
100
|
+
}
|
|
101
|
+
return p.fetchImpl(url, request);
|
|
102
|
+
} });
|
|
103
|
+
assert.equal(result.decision, 'resume-existing');
|
|
104
|
+
assert.equal(result.publicationOutput, original);
|
|
105
|
+
assert.equal(result.microAppVersion, '0.0.0-1');
|
|
106
|
+
assert.equal(p.state.registrations, 1);
|
|
107
|
+
assert.equal(p.state.uploads, 1);
|
|
108
|
+
assert.equal(publicationHistory(f).publications.length, 1);
|
|
109
|
+
});
|
|
110
|
+
|
|
111
|
+
test('queued and completed releases are rechecked and reused across new prepared directories', async t => {
|
|
112
|
+
const f = workspace(t), p = publishingService(), output = prepare(f, 'one');
|
|
113
|
+
await publishRelease('publish', { ...f, output, fetchImpl: p.fetchImpl });
|
|
114
|
+
const next = prepare(f, 'two', { stamp: 3 });
|
|
115
|
+
assert.equal((await publishRelease('publish', { ...f, output: next, fetchImpl: p.fetchImpl })).stage, 'QUEUED');
|
|
116
|
+
complete(p.builds[0]);
|
|
117
|
+
assert.equal((await publishRelease('publish', { ...f, output: next, fetchImpl: p.fetchImpl })).decision, 'reuse-complete');
|
|
118
|
+
assert.equal(p.state.registrations, 1);
|
|
119
|
+
assert.equal(p.state.uploads, 1);
|
|
120
|
+
p.state.unavailable = true;
|
|
121
|
+
await assert.rejects(publishRelease('publish', { ...f, output: next, fetchImpl: p.fetchImpl }), { code: 'REGISTRY_REQUEST_FAILED' });
|
|
122
|
+
assert.equal(p.state.registrations, 1, 'cached completion is not a substitute for platform authority');
|
|
123
|
+
});
|
|
124
|
+
|
|
125
|
+
for (const change of [{ frontend: 'changed' }, { backend: 'changed' }, { database: true }, { description: 'Updated app purpose' }, { versionDescription: 'Fix device labels' }, { versionDescriptionEn: 'Translated release-note change only' }]) {
|
|
126
|
+
test('changed frontend/backend/declaration creates a new platform service version without replacing the pending release: ' + JSON.stringify(change), async t => {
|
|
127
|
+
const f = workspace(t), p = publishingService(), output = prepare(f, 'old');
|
|
128
|
+
await publishRelease('publish', { ...f, output, fetchImpl: p.fetchImpl });
|
|
129
|
+
const next = prepare(f, 'new', change);
|
|
130
|
+
const result = await publishRelease('publish', { ...f, output: next, fetchImpl: p.fetchImpl });
|
|
131
|
+
assert.equal(result.decision, 'new-content');
|
|
132
|
+
assert.equal(result.microAppVersion, '0.0.0-2');
|
|
133
|
+
assert.equal(result.previousPublications[0].microAppVersion, '0.0.0-1');
|
|
134
|
+
assert.equal(publicationHistory(f).publications.length, 2);
|
|
135
|
+
assert.equal(p.builds[0].status, 'QUEUED');
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
test('terminal failures stop by default; explicit new-attempt rechecks platform service and allocates fresh requests', async t => {
|
|
140
|
+
const f = workspace(t), p = publishingService(), output = prepare(f, 'old');
|
|
141
|
+
await publishRelease('publish', { ...f, output, fetchImpl: p.fetchImpl });
|
|
142
|
+
const next = prepare(f, 'new');
|
|
143
|
+
await assert.rejects(publishRelease('publish', { ...f, output: next, fetchImpl: p.fetchImpl, newAttempt: true }), { code: 'PUBLICATION_RETRY_NOT_ALLOWED' });
|
|
144
|
+
p.builds[0].status = 'FAILED';
|
|
145
|
+
assert.equal((await publishRelease('publish', { ...f, output: next, fetchImpl: p.fetchImpl })).status, 'failed');
|
|
146
|
+
assert.equal(p.state.registrations, 1);
|
|
147
|
+
const result = await publishRelease('publish', { ...f, output: next, fetchImpl: p.fetchImpl, newAttempt: true });
|
|
148
|
+
assert.equal(result.decision, 'retry-terminal');
|
|
149
|
+
assert.equal(result.microAppVersion, '0.0.0-2');
|
|
150
|
+
const history = publicationHistory(f).publications;
|
|
151
|
+
assert.equal(history[1].retryOf, history[0].publicationId);
|
|
152
|
+
});
|
|
153
|
+
|
|
154
|
+
test('exhausted creation attempts fail and explicit push creates a new version without reviving the old build', async t => {
|
|
155
|
+
const f = workspace(t), p = publishingService(), output = prepare(f, 'old');
|
|
156
|
+
await publishRelease('publish', { ...f, output, fetchImpl: p.fetchImpl });
|
|
157
|
+
p.builds[0].status = 'FAILED';
|
|
158
|
+
p.builds[0].errorCode = 'INFRA_SUBMISSION_RETRIES_EXHAUSTED';
|
|
159
|
+
const next = prepare(f, 'retry');
|
|
160
|
+
const failed = await publishRelease('publish', { ...f, output: next, fetchImpl: p.fetchImpl });
|
|
161
|
+
assert.equal(failed.status, 'failed');
|
|
162
|
+
assert.equal(failed.reasonCode, 'INFRA_SUBMISSION_RETRIES_EXHAUSTED');
|
|
163
|
+
assert.match(failed.message, /new publication attempt/);
|
|
164
|
+
assert.match(failed.nextActions[0], /--new-attempt/);
|
|
165
|
+
assert.equal(p.state.registrations, 1);
|
|
166
|
+
const retried = await publishRelease('publish', { ...f, output: next, fetchImpl: p.fetchImpl, newAttempt: true });
|
|
167
|
+
assert.equal(retried.decision, 'retry-terminal');
|
|
168
|
+
assert.equal(retried.microAppVersion, '0.0.0-2');
|
|
169
|
+
assert.notEqual(p.builds[0].requestId, p.builds[1].requestId);
|
|
170
|
+
assert.notEqual(p.builds[0].releaseId, p.builds[1].releaseId);
|
|
171
|
+
assert.equal(p.builds[0].status, 'FAILED');
|
|
172
|
+
assert.equal(p.builds[1].status, 'QUEUED');
|
|
173
|
+
assert.equal(publicationHistory(f).publications.length, 2);
|
|
174
|
+
});
|
|
175
|
+
|
|
176
|
+
test('expired backend upload resumes original task and cannot create another version', async t => {
|
|
177
|
+
const f = workspace(t), p = publishingService(), output = prepare(f, 'old');
|
|
178
|
+
p.state.expired = true;
|
|
179
|
+
const pending = await publishRelease('publish', { ...f, output, fetchImpl: p.fetchImpl });
|
|
180
|
+
assert.equal(pending.status, 'running');
|
|
181
|
+
assert.equal(pending.resumable, true);
|
|
182
|
+
const originalRequest = p.builds[0].requestId;
|
|
183
|
+
await assert.rejects(publishRelease('publish', { ...f, output, fetchImpl: p.fetchImpl, newAttempt: true }),
|
|
184
|
+
{ code: 'PUBLICATION_RETRY_NOT_ALLOWED' });
|
|
185
|
+
p.state.expired = false;
|
|
186
|
+
const result = await publishRelease('resume', { ...f, output: prepare(f, 'retry'), fetchImpl: p.fetchImpl });
|
|
187
|
+
assert.equal(result.decision, 'resume-existing');
|
|
188
|
+
assert.equal(result.microAppVersion, '0.0.0-1');
|
|
189
|
+
assert.equal(result.buildTaskId, pending.buildTaskId);
|
|
190
|
+
assert.equal(p.builds[0].requestId, originalRequest);
|
|
191
|
+
assert.equal(p.state.registrations, 1);
|
|
192
|
+
assert.equal(p.builds.length, 1);
|
|
193
|
+
});
|
|
194
|
+
|
|
195
|
+
test('lost backend upload response recovers its original task without retransferring or new registration', async t => {
|
|
196
|
+
const f = workspace(t), p = publishingService(), output = prepare(f, 'original');
|
|
197
|
+
let loseResponse = true;
|
|
198
|
+
const fetchImpl = async (url, request) => {
|
|
199
|
+
const response = await p.fetchImpl(url, request);
|
|
200
|
+
if (loseResponse && request.method === 'POST' && url.pathname.endsWith('backend-build')) {
|
|
201
|
+
loseResponse = false;
|
|
202
|
+
throw new Error('response lost after cloud READY and queue commit');
|
|
203
|
+
}
|
|
204
|
+
return response;
|
|
205
|
+
};
|
|
206
|
+
await assert.rejects(publishRelease('publish', { ...f, output, fetchImpl }), { code: 'REGISTRY_REQUEST_FAILED' });
|
|
207
|
+
const requestId = p.builds[0].requestId;
|
|
208
|
+
const result = await publishRelease('resume', { ...f, output: prepare(f, 'same-content'), fetchImpl });
|
|
209
|
+
assert.equal(result.stage, 'QUEUED');
|
|
210
|
+
assert.equal(result.buildTaskId, p.builds[0].buildTaskId);
|
|
211
|
+
assert.equal(result.microAppVersion, '0.0.0-1');
|
|
212
|
+
assert.equal(p.state.registrations, 1);
|
|
213
|
+
assert.equal(p.state.uploads, 1);
|
|
214
|
+
assert.equal(p.builds[0].requestId, requestId);
|
|
215
|
+
});
|
|
216
|
+
|
|
217
|
+
test('missing old artifacts block duplicate versions and readonly plans/history need no credentials', async t => {
|
|
218
|
+
const f = workspace(t), p = publishingService(), output = prepare(f, 'old');
|
|
219
|
+
await publishRelease('publish', { ...f, output, fetchImpl: p.fetchImpl });
|
|
220
|
+
const next = prepare(f, 'new');
|
|
221
|
+
const plan = await planRelease({ ...f, output: next, environment: {} });
|
|
222
|
+
assert.equal(plan.decision, 'check-existing');
|
|
223
|
+
assert.equal(plan.accountVerificationRequired, true);
|
|
224
|
+
assert.equal(p.state.registrations, 1);
|
|
225
|
+
rmSync(output, { recursive: true });
|
|
226
|
+
await assert.rejects(publishRelease('publish', { ...f, output: next, fetchImpl: p.fetchImpl }), { code: 'PUBLICATION_INPUT_MISSING' });
|
|
227
|
+
assert.equal(p.state.registrations, 1);
|
|
228
|
+
assert.doesNotMatch(JSON.stringify(publicationHistory(f)), /recovery-fixture-key|recovery-fixture-secret/);
|
|
229
|
+
});
|
|
230
|
+
|
|
231
|
+
test('lost per-output state is rebuilt from durable project intent using the original requests', async t => {
|
|
232
|
+
const f = workspace(t), p = publishingService(), output = prepare(f, 'old');
|
|
233
|
+
p.state.loseFrontend = true;
|
|
234
|
+
await assert.rejects(publishRelease('publish', { ...f, output, fetchImpl: p.fetchImpl }));
|
|
235
|
+
const id = publicationHistory(f).publications[0].publicationId;
|
|
236
|
+
rmSync(join(output, 'publication.json'));
|
|
237
|
+
assert.equal((await publishRelease('status', { ...f, output: prepare(f, 'new'), fetchImpl: p.fetchImpl })).stage, 'BACKEND_NOT_SUBMITTED');
|
|
238
|
+
const restored = JSON.parse(readFileSync(join(output, 'publication.json')));
|
|
239
|
+
assert.equal(restored.frontendRequestId, id);
|
|
240
|
+
assert.equal(p.state.registrations, 1);
|
|
241
|
+
assert.equal(p.state.uploads, 0);
|
|
242
|
+
});
|
|
243
|
+
|
|
244
|
+
test('recoverable cloud failure and cancellation in progress cannot be bypassed with a new attempt', async t => {
|
|
245
|
+
const f = workspace(t), p = publishingService(), output = prepare(f, 'old');
|
|
246
|
+
await publishRelease('publish', { ...f, output, fetchImpl: p.fetchImpl });
|
|
247
|
+
const next = prepare(f, 'new');
|
|
248
|
+
p.fronts[0].status = 'FAILED';
|
|
249
|
+
p.fronts[0].errorCode = 'SMARTHOME_PACKAGE_UPLOAD_FAILED';
|
|
250
|
+
await assert.rejects(publishRelease('publish', { ...f, output: next, fetchImpl: p.fetchImpl, newAttempt: true }), { code: 'PUBLICATION_RETRY_NOT_ALLOWED' });
|
|
251
|
+
p.fronts[0].status = 'SUCCESS';
|
|
252
|
+
p.builds[0].status = 'CANCEL_REQUESTED';
|
|
253
|
+
assert.equal((await publishRelease('resume', { ...f, output, fetchImpl: p.fetchImpl })).status, 'running');
|
|
254
|
+
await assert.rejects(publishRelease('publish', { ...f, output: next, fetchImpl: p.fetchImpl, newAttempt: true }), { code: 'PUBLICATION_RETRY_NOT_ALLOWED' });
|
|
255
|
+
assert.equal(p.state.registrations, 1);
|
|
256
|
+
});
|
|
257
|
+
|
|
258
|
+
test('publication scope prevents another account or endpoint from adopting local requests', async t => {
|
|
259
|
+
const f = workspace(t), p = publishingService(), output = prepare(f, 'old');
|
|
260
|
+
await publishRelease('publish', { ...f, output, fetchImpl: p.fetchImpl });
|
|
261
|
+
const environment = { ...f.environment, SDF_APP_KEY: 'other-fixture-key' };
|
|
262
|
+
await assert.rejects(publishRelease('resume', { ...f, output, environment, fetchImpl: p.fetchImpl }), /STATE_MISMATCH/);
|
|
263
|
+
const result = await publishRelease('publish', { ...f, output: prepare(f, 'new'), environment, fetchImpl: p.fetchImpl });
|
|
264
|
+
assert.equal(result.reused, false);
|
|
265
|
+
assert.equal(p.state.registrations, 2);
|
|
266
|
+
});
|
|
267
|
+
|
|
268
|
+
test('project lease prevents direct and session publishers from allocating simultaneous requests', async t => {
|
|
269
|
+
const f = workspace(t), p = publishingService(), output = prepare(f, 'old');
|
|
270
|
+
let entered, unblock;
|
|
271
|
+
const started = new Promise(resolve => { entered = resolve; });
|
|
272
|
+
const wait = new Promise(resolve => { unblock = resolve; });
|
|
273
|
+
const first = publishRelease('publish', { ...f, output, fetchImpl: async (...args) => { entered(); await wait; return p.fetchImpl(...args); } });
|
|
274
|
+
await started;
|
|
275
|
+
await assert.rejects(publishRelease('publish', { ...f, output: prepare(f, 'new'), fetchImpl: p.fetchImpl }), { code: 'PUBLICATION_BUSY' });
|
|
276
|
+
unblock();
|
|
277
|
+
await first;
|
|
278
|
+
assert.equal(p.state.registrations, 1);
|
|
279
|
+
});
|
|
280
|
+
|
|
281
|
+
test('dead project leases recover original requests while modified original metadata is refused', async t => {
|
|
282
|
+
const f = workspace(t), p = publishingService(), output = prepare(f, 'old');
|
|
283
|
+
await publishRelease('publish', { ...f, output, fetchImpl: p.fetchImpl });
|
|
284
|
+
const context = publicationContext(f.project, f);
|
|
285
|
+
const lock = context.file.replace(/\.json$/, '.lock');
|
|
286
|
+
mkdirSync(lock, { mode: 0o700 });
|
|
287
|
+
writeFileSync(join(lock, 'owner.json'), JSON.stringify({ pid: 2147483647 }), { mode: 0o600 });
|
|
288
|
+
assert.equal((await publishRelease('resume', { ...f, output, fetchImpl: p.fetchImpl })).stage, 'QUEUED');
|
|
289
|
+
const file = join(output, 'artifacts/release-artifacts.json');
|
|
290
|
+
const manifest = JSON.parse(readFileSync(file));
|
|
291
|
+
manifest.build.sourceDigest = hash('modified metadata');
|
|
292
|
+
writeFileSync(file, JSON.stringify(manifest));
|
|
293
|
+
await assert.rejects(publishRelease('resume', { ...f, output, fetchImpl: p.fetchImpl }), /STATE_MISMATCH/);
|
|
294
|
+
assert.equal(p.state.registrations, 1);
|
|
295
|
+
assert.equal(p.state.uploads, 1);
|
|
296
|
+
});
|
|
297
|
+
|
|
298
|
+
test('temporary credential session shares the direct publisher index and selects the original snapshot', async t => {
|
|
299
|
+
const f = workspace(t), p = publishingService(), output = prepare(f, 'direct');
|
|
300
|
+
await publishRelease('publish', { ...f, output, fetchImpl: p.fetchImpl });
|
|
301
|
+
complete(p.builds[0]);
|
|
302
|
+
const next = prepare(f, 'session', { stamp: 3 }), bundleSha256 = 'a'.repeat(64);
|
|
303
|
+
const session = prepareSession({ ...f, output: next, bundleSha256 });
|
|
304
|
+
const result = await runSession({ ...f, sessionId: session.sessionId, bundleSha256,
|
|
305
|
+
prompt: async field => field === 'App Key' ? f.environment.SDF_APP_KEY : f.environment.SDF_SECRET_KEY,
|
|
306
|
+
publish: (action, options) => publishRelease(action, { ...options, fetchImpl: p.fetchImpl }),
|
|
307
|
+
});
|
|
308
|
+
assert.equal(result.status, 'complete', JSON.stringify(result));
|
|
309
|
+
assert.equal(result.decision, 'reuse-complete');
|
|
310
|
+
assert.equal(result.publicationOutput, output);
|
|
311
|
+
assert.equal(p.state.registrations, 1);
|
|
312
|
+
});
|
|
313
|
+
|
|
314
|
+
test('archive identity ignores packing order/timestamps but includes executable mode and rejects unsafe data', async t => {
|
|
315
|
+
const f = workspace(t), paths = [join(f.root, 'a.tgz'), join(f.root, 'b.tgz'), join(f.root, 'c.tgz')];
|
|
316
|
+
writeFileSync(paths[0], tarFixture({ 'a.txt': 'one', 'b.txt': 'two' }));
|
|
317
|
+
writeFileSync(paths[1], tarFixture({ 'b.txt': 'two', 'a.txt': 'one' }, { stamp: 999 }));
|
|
318
|
+
writeFileSync(paths[2], tarFixture({ 'a.txt': 'one', 'b.txt': 'two' }, { executable: true }));
|
|
319
|
+
assert.equal(await archiveContent(paths[0]), await archiveContent(paths[1]));
|
|
320
|
+
assert.notEqual(await archiveContent(paths[0]), await archiveContent(paths[2]));
|
|
321
|
+
writeFileSync(paths[2], tarFixture({ '../outside': 'bad' }));
|
|
322
|
+
await assert.rejects(archiveContent(paths[2]), { code: 'RELEASE_CONTENT_INVALID' });
|
|
323
|
+
writeFileSync(paths[2], gzipSync(Buffer.from('not-a-tar')));
|
|
324
|
+
await assert.rejects(archiveContent(paths[2]), { code: 'RELEASE_CONTENT_INVALID' });
|
|
325
|
+
});
|
|
326
|
+
|
|
327
|
+
test('backend expansion is capped at 100 MiB while frontend content keeps its existing limit', async t => {
|
|
328
|
+
const f = workspace(t);
|
|
329
|
+
const frontend = join(f.root, 'frontend.tgz'), backend = join(f.root, 'backend.tgz');
|
|
330
|
+
writeFileSync(frontend, tarFixture({ 'index.html': 'frontend' }));
|
|
331
|
+
const raw = Buffer.alloc(100 * 1024 * 1024 + 512);
|
|
332
|
+
gunzipSync(tarFixture({ 'server.mjs': '' })).copy(raw);
|
|
333
|
+
writeFileSync(backend, gzipSync(raw));
|
|
334
|
+
const prepared = { frontendFile: frontend, backendFile: backend, code: 'demo-ab12',
|
|
335
|
+
manifest: { build: { backendRequired: true, databaseRequired: false } } };
|
|
336
|
+
await assert.rejects(releaseContent(prepared), { code: 'RELEASE_CONTENT_INVALID' });
|
|
337
|
+
assert.match(await archiveContent(backend), /^[a-f0-9]{64}$/);
|
|
338
|
+
});
|
|
339
|
+
|
|
340
|
+
test('real tar/PAX archives retain content identity after touching files and repacking long names', async t => {
|
|
341
|
+
const f = workspace(t), source = join(f.root, 'tree');
|
|
342
|
+
mkdirSync(source);
|
|
343
|
+
const file = join(source, 'long-'.repeat(30) + '.txt');
|
|
344
|
+
writeFileSync(file, 'actual archive bytes');
|
|
345
|
+
const first = join(f.root, 'first.tgz'), second = join(f.root, 'second.tgz');
|
|
346
|
+
for (const [target, stamp] of [[first, 1700000000], [second, 1700000090]]) {
|
|
347
|
+
utimesSync(file, stamp, stamp);
|
|
348
|
+
const child = spawnSync('tar', ['-czf', target, '-C', source, '.'], { env: { PATH: process.env.PATH, COPYFILE_DISABLE: '1' } });
|
|
349
|
+
assert.equal(child.status, 0, child.stderr?.toString());
|
|
350
|
+
}
|
|
351
|
+
assert.equal(await archiveContent(first), await archiveContent(second));
|
|
352
|
+
});
|
|
353
|
+
|
|
354
|
+
test('explicit logs recheck original task and never write or create a publication', async t => {
|
|
355
|
+
const { publicationLogs } = await import('../publication.mjs');
|
|
356
|
+
const f = workspace(t), p = publishingService(), output = prepare(f, 'logs');
|
|
357
|
+
await publishRelease('publish', { ...f, output, fetchImpl: p.fetchImpl });
|
|
358
|
+
const previous = readFileSync(join(output, 'publication.json'), 'utf8');
|
|
359
|
+
p.builds[0].status = 'FAILED';
|
|
360
|
+
p.builds[0].errorCode = 'INFRA_FAILED';
|
|
361
|
+
const requests = [];
|
|
362
|
+
const fetchImpl = async (url, request) => {
|
|
363
|
+
requests.push(request.method + ' ' + url.pathname);
|
|
364
|
+
if (url.pathname.endsWith('/logs')) {
|
|
365
|
+
assert.equal(url.searchParams.get('buildTaskId'), 'build-1');
|
|
366
|
+
assert.equal(url.searchParams.get('tailLines'), '200');
|
|
367
|
+
assert.equal(url.searchParams.get('sinceSeconds'), '600');
|
|
368
|
+
return { ok: true, status: 200, json: async () => ({ success: true, result: {
|
|
369
|
+
text: 'Type error: missing value', available: true, truncated: true, privateField: 'not-for-output' } }) };
|
|
370
|
+
}
|
|
371
|
+
return p.fetchImpl(url, request);
|
|
372
|
+
};
|
|
373
|
+
const logs = await publicationLogs({ ...f, output, fetchImpl, tailLines: 200, sinceSeconds: 600 });
|
|
374
|
+
assert.equal(logs.text, 'Type error: missing value');
|
|
375
|
+
assert.equal(logs.buildTaskId, 'build-1');
|
|
376
|
+
assert.equal(logs.stage, 'FAILED');
|
|
377
|
+
assert.equal(logs.truncated, true);
|
|
378
|
+
assert.equal(logs.privateField, undefined);
|
|
379
|
+
assert.ok(requests.every(request => request.startsWith('GET ')));
|
|
380
|
+
assert.equal(readFileSync(join(output, 'publication.json'), 'utf8'), previous);
|
|
381
|
+
assert.equal(p.state.uploads, 1);
|
|
382
|
+
assert.equal(publicationHistory(f).publications.length, 1);
|
|
383
|
+
await assert.rejects(publicationLogs({ ...f, output, fetchImpl, tailLines: 2001 }), { code: 'BUILD_LOGS_QUERY_INVALID' });
|
|
384
|
+
p.builds[0].microAppCode = 'another-app';
|
|
385
|
+
const before = requests.length;
|
|
386
|
+
await assert.rejects(publicationLogs({ ...f, output, fetchImpl }), { code: 'STATE_MISMATCH' });
|
|
387
|
+
assert.equal(requests.length, before + 1, 'do not fetch logs on an inconsistent status response');
|
|
388
|
+
});
|
|
389
|
+
|
|
390
|
+
test('build failure includes bounded diagnostics while unavailable logs preserve the original failure', async t => {
|
|
391
|
+
const f = workspace(t), p = publishingService(), output = prepare(f, 'failed-logs');
|
|
392
|
+
await publishRelease('publish', { ...f, output, fetchImpl: p.fetchImpl });
|
|
393
|
+
Object.assign(p.builds[0], { status: 'FAILED', errorCode: 'INFRA_FAILED' });
|
|
394
|
+
let queries = 0, unavailable = false;
|
|
395
|
+
const fetchImpl = async (url, request) => {
|
|
396
|
+
if (!url.pathname.endsWith('/logs')) return p.fetchImpl(url, request);
|
|
397
|
+
queries++;
|
|
398
|
+
assert.equal(request.method, 'GET');
|
|
399
|
+
if (unavailable) return { ok: false, status: 403, json: async () => ({ secret: 'remote-details' }) };
|
|
400
|
+
return { ok: true, status: 200, json: async () => ({ success: true,
|
|
401
|
+
result: { text: 'Compile failed', available: true, truncated: false } }) };
|
|
402
|
+
};
|
|
403
|
+
const result = await publishRelease('status', { ...f, output, fetchImpl });
|
|
404
|
+
assert.equal(result.status, 'failed');
|
|
405
|
+
assert.equal(result.reasonCode, 'INFRA_FAILED');
|
|
406
|
+
assert.equal(result.buildLogs.text, 'Compile failed');
|
|
407
|
+
assert.equal(queries, 1);
|
|
408
|
+
unavailable = true;
|
|
409
|
+
const again = await publishRelease('resume', { ...f, output, fetchImpl });
|
|
410
|
+
assert.equal(again.status, 'failed');
|
|
411
|
+
assert.equal(again.stage, 'FAILED');
|
|
412
|
+
assert.equal(again.reasonCode, 'INFRA_FAILED');
|
|
413
|
+
assert.equal(again.buildLogs.errorCode, 'BUILD_LOGS_UNAVAILABLE');
|
|
414
|
+
assert.doesNotMatch(JSON.stringify(again), /remote-details/);
|
|
415
|
+
assert.equal(p.state.registrations, 1);
|
|
416
|
+
assert.equal(p.state.uploads, 1);
|
|
417
|
+
});
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import test from 'node:test';
|
|
2
|
+
import assert from 'node:assert/strict';
|
|
3
|
+
import { mkdtempSync, mkdirSync, writeFileSync, rmSync, readFileSync } from 'node:fs';
|
|
4
|
+
import { tmpdir } from 'node:os';
|
|
5
|
+
import { join } from 'node:path';
|
|
6
|
+
import { buildBundle, refreshBundle } from '../assemble.mjs';
|
|
7
|
+
import { verifyBundle } from '../integrity.mjs';
|
|
8
|
+
|
|
9
|
+
test('repository metadata changes do not alter bundle identity or enter the manifest', t => {
|
|
10
|
+
const root = mkdtempSync(join(tmpdir(), 'kit-repository-'));
|
|
11
|
+
t.after(() => rmSync(root, { recursive: true, force: true }));
|
|
12
|
+
const bundle = buildBundle(join(root, 'bundle'));
|
|
13
|
+
const before = verifyBundle(bundle).bundleSha256;
|
|
14
|
+
mkdirSync(join(bundle, '.git'));
|
|
15
|
+
writeFileSync(join(bundle, '.git/config'), '[core]\nrepositoryformatversion = 0\n');
|
|
16
|
+
for (const name of ['.gitignore', '.gitattributes', 'AGENTS.md']) {
|
|
17
|
+
writeFileSync(join(bundle, name), 'repository-only\n');
|
|
18
|
+
}
|
|
19
|
+
assert.equal(verifyBundle(bundle).bundleSha256, before);
|
|
20
|
+
writeFileSync(join(bundle, '.git/HEAD'), 'ref: refs/heads/master\n');
|
|
21
|
+
assert.equal(refreshBundle(bundle).bundleSha256, before);
|
|
22
|
+
const files = JSON.parse(readFileSync(join(bundle, 'bundle.json'))).files;
|
|
23
|
+
assert.equal(Object.keys(files).some(file => file.startsWith('.git') || file === 'AGENTS.md'), false);
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
test('repository exclusions do not hide product additions, tampering or nested metadata', t => {
|
|
27
|
+
const root = mkdtempSync(join(tmpdir(), 'kit-repository-boundary-'));
|
|
28
|
+
t.after(() => rmSync(root, { recursive: true, force: true }));
|
|
29
|
+
const bundle = buildBundle(join(root, 'bundle'));
|
|
30
|
+
for (const name of ['unexpected.mjs', 'runtime/.gitignore', 'resources/template/backend/AGENTS.md']) {
|
|
31
|
+
writeFileSync(join(bundle, name), 'unexpected');
|
|
32
|
+
assert.throws(() => verifyBundle(bundle), /BUNDLE_INTEGRITY_MISMATCH/);
|
|
33
|
+
rmSync(join(bundle, name));
|
|
34
|
+
}
|
|
35
|
+
const template = join(bundle, 'resources/template/_gitignore');
|
|
36
|
+
writeFileSync(template, 'tampered');
|
|
37
|
+
assert.throws(() => verifyBundle(bundle), /BUNDLE_INTEGRITY_MISMATCH/);
|
|
38
|
+
});
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
import { test } from 'node:test';
|
|
2
|
+
import assert from 'node:assert/strict';
|
|
3
|
+
import { cpSync, existsSync, mkdtempSync, readFileSync, readdirSync, realpathSync, rmSync, mkdirSync, writeFileSync } from 'node:fs';
|
|
4
|
+
import { join } from 'node:path';
|
|
5
|
+
import { tmpdir } from 'node:os';
|
|
6
|
+
import { spawnSync } from 'node:child_process';
|
|
7
|
+
import { buildBundle, refreshBundle } from '../assemble.mjs';
|
|
8
|
+
import { setup, AGENTS } from '../setup.mjs';
|
|
9
|
+
import { update } from '../update.mjs';
|
|
10
|
+
import { tree } from '../integrity.mjs';
|
|
11
|
+
|
|
12
|
+
const six = [
|
|
13
|
+
'micro-app-backend-development',
|
|
14
|
+
'micro-app-cloud-integration',
|
|
15
|
+
'micro-app-design',
|
|
16
|
+
'micro-app-development',
|
|
17
|
+
'micro-app-frontend-development',
|
|
18
|
+
'micro-app-solution-design',
|
|
19
|
+
];
|
|
20
|
+
const four = six.filter(name => !['micro-app-frontend-development', 'micro-app-solution-design'].includes(name));
|
|
21
|
+
const json = path => JSON.parse(readFileSync(path, 'utf8'));
|
|
22
|
+
|
|
23
|
+
async function fixture(t, agent = 'codex') {
|
|
24
|
+
const root = realpathSync(mkdtempSync(join(tmpdir(), 'kit-six-skills-')));
|
|
25
|
+
t.after(() => rmSync(root, { recursive: true, force: true }));
|
|
26
|
+
const f = { root, home: join(root, 'home'), project: join(root, 'project'), env: {} };
|
|
27
|
+
f.kitHome = join(f.home, '.tuya-microapp');
|
|
28
|
+
f.target = buildBundle(join(root, 'target'));
|
|
29
|
+
f.old = join(root, 'old');
|
|
30
|
+
cpSync(f.target, f.old, { recursive: true });
|
|
31
|
+
for (const name of ['micro-app-frontend-development', 'micro-app-solution-design']) {
|
|
32
|
+
rmSync(join(f.old, 'skills', name), { recursive: true, force: true });
|
|
33
|
+
}
|
|
34
|
+
const manifest = json(join(f.old, 'bundle.json'));
|
|
35
|
+
manifest.version = '0.1.5';
|
|
36
|
+
delete manifest.cacheLayout;
|
|
37
|
+
writeFileSync(join(f.old, 'bundle.json'), JSON.stringify(manifest));
|
|
38
|
+
refreshBundle(f.old);
|
|
39
|
+
await setup({ ...f, bundleRoot: f.old, agent });
|
|
40
|
+
f.host = AGENTS[agent];
|
|
41
|
+
f.metadata = join(f.project, '.tuya-microapp');
|
|
42
|
+
f.options = { ...f, bundleRoot: f.target };
|
|
43
|
+
return f;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
function installed(f) {
|
|
47
|
+
return readdirSync(join(f.project, f.host, 'skills')).sort();
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
for (const agent of Object.keys(AGENTS)) {
|
|
51
|
+
test(`six skills install for ${agent}; both new launchers run from the cache`, async t => {
|
|
52
|
+
const f = await fixture(t, agent);
|
|
53
|
+
assert.deepEqual(installed(f), four);
|
|
54
|
+
await update(f.options);
|
|
55
|
+
assert.deepEqual(installed(f), six);
|
|
56
|
+
const receipt = json(join(f.metadata, 'installation.json'));
|
|
57
|
+
assert.deepEqual(Object.keys(receipt.hosts[0].skillHashes).sort(), six);
|
|
58
|
+
for (const name of ['micro-app-frontend-development', 'micro-app-solution-design']) {
|
|
59
|
+
const child = spawnSync(process.execPath, [join(f.project, f.host, 'skills', name, 'scripts/microapp-kit.mjs'), 'doctor', '--project', f.project], {
|
|
60
|
+
env: { ...process.env, TUYA_MICROAPP_HOME: f.kitHome }, encoding: 'utf8', timeout: 30_000,
|
|
61
|
+
});
|
|
62
|
+
assert.equal(child.status, 0, child.stderr + child.stdout);
|
|
63
|
+
assert.equal(JSON.parse(child.stdout).operation, 'doctor');
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
test('four-to-six update and rollback retain business files and restore the exact old receipt', async t => {
|
|
69
|
+
const f = await fixture(t);
|
|
70
|
+
const receipt = json(join(f.metadata, 'installation.json'));
|
|
71
|
+
writeFileSync(join(f.project, 'business.txt'), 'retained');
|
|
72
|
+
assert.equal((await update({ ...f.options, check: true })).updateState, 'ready');
|
|
73
|
+
assert.deepEqual(installed(f), four);
|
|
74
|
+
assert.equal((await update(f.options)).updateState, 'updated');
|
|
75
|
+
assert.deepEqual(installed(f), six);
|
|
76
|
+
assert.equal((await update({ ...f.options, rollback: true, to: '0.1.5' })).updateState, 'rolled-back');
|
|
77
|
+
assert.deepEqual(installed(f), four);
|
|
78
|
+
assert.deepEqual(json(join(f.metadata, 'installation.json')), receipt);
|
|
79
|
+
assert.equal(readFileSync(join(f.project, 'business.txt'), 'utf8'), 'retained');
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
for (const phase of ['installed:.agents/micro-app-frontend-development', 'installed:.agents/micro-app-solution-design', 'committed']) {
|
|
83
|
+
test(`interrupted skill-set expansion at ${phase} restores four skills`, async t => {
|
|
84
|
+
const f = await fixture(t);
|
|
85
|
+
const program = `import { update } from ${JSON.stringify(new URL('../update.mjs', import.meta.url).href)};
|
|
86
|
+
await update({ ...JSON.parse(process.argv[1]), checkpoint: stage => { if (stage === process.argv[2]) process.exit(77); } });`;
|
|
87
|
+
const child = spawnSync(process.execPath, ['--input-type=module', '-e', program, JSON.stringify(f.options), phase], { encoding: 'utf8', timeout: 30_000 });
|
|
88
|
+
assert.equal(child.status, 77, child.stderr + child.stdout);
|
|
89
|
+
assert.equal((await update({ ...f.options, recover: true })).updateState, 'recovered');
|
|
90
|
+
assert.deepEqual(installed(f), four);
|
|
91
|
+
assert.equal(existsSync(join(f.metadata, 'update.json')), false);
|
|
92
|
+
assert.equal((await update(f.options)).updateState, 'updated');
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
test('new same-name user skills are not adopted or overwritten during expansion', async t => {
|
|
97
|
+
const f = await fixture(t);
|
|
98
|
+
const directory = join(f.project, f.host, 'skills/micro-app-frontend-development');
|
|
99
|
+
mkdirSync(directory);
|
|
100
|
+
writeFileSync(join(directory, 'SKILL.md'), 'user-owned');
|
|
101
|
+
await assert.rejects(update(f.options), { code: 'UPDATE_SKILL_CONFLICT' });
|
|
102
|
+
assert.equal(readFileSync(join(directory, 'SKILL.md'), 'utf8'), 'user-owned');
|
|
103
|
+
assert.equal(json(join(f.metadata, 'toolchain.json')).version, '0.1.5');
|
|
104
|
+
});
|
|
105
|
+
|
|
106
|
+
test('rollback interruption restores six skills including those absent from the rollback package', async t => {
|
|
107
|
+
const f = await fixture(t);
|
|
108
|
+
await update(f.options);
|
|
109
|
+
const receipt = json(join(f.metadata, 'installation.json'));
|
|
110
|
+
const program = `import { update } from ${JSON.stringify(new URL('../update.mjs', import.meta.url).href)};
|
|
111
|
+
await update({ ...JSON.parse(process.argv[1]), rollback: true, to: '0.1.5', checkpoint: stage => {
|
|
112
|
+
if (stage === 'removed:.agents/micro-app-frontend-development') process.exit(77);
|
|
113
|
+
} });`;
|
|
114
|
+
const child = spawnSync(process.execPath, ['--input-type=module', '-e', program, JSON.stringify(f.options)], { encoding: 'utf8', timeout: 30_000 });
|
|
115
|
+
assert.equal(child.status, 77, child.stderr + child.stdout);
|
|
116
|
+
assert.equal((await update({ ...f.options, recover: true })).updateState, 'recovered');
|
|
117
|
+
assert.deepEqual(installed(f), six);
|
|
118
|
+
assert.deepEqual(json(join(f.metadata, 'installation.json')), receipt);
|
|
119
|
+
});
|
|
120
|
+
|
|
121
|
+
test('recovery never removes a newly added skill edited after an expansion crash', async t => {
|
|
122
|
+
const f = await fixture(t);
|
|
123
|
+
const program = `import { update } from ${JSON.stringify(new URL('../update.mjs', import.meta.url).href)};
|
|
124
|
+
await update({ ...JSON.parse(process.argv[1]), checkpoint: stage => {
|
|
125
|
+
if (stage === 'installed:.agents/micro-app-frontend-development') process.exit(77);
|
|
126
|
+
} });`;
|
|
127
|
+
const child = spawnSync(process.execPath, ['--input-type=module', '-e', program, JSON.stringify(f.options)], { encoding: 'utf8', timeout: 30_000 });
|
|
128
|
+
assert.equal(child.status, 77, child.stderr + child.stdout);
|
|
129
|
+
const edited = join(f.project, f.host, 'skills/micro-app-frontend-development/SKILL.md');
|
|
130
|
+
writeFileSync(edited, 'post-crash-edit');
|
|
131
|
+
await assert.rejects(update({ ...f.options, recover: true }), { code: 'UPDATE_RECOVERY_CONFLICT' });
|
|
132
|
+
assert.equal(readFileSync(edited, 'utf8'), 'post-crash-edit');
|
|
133
|
+
assert.equal(existsSync(join(f.metadata, 'update.json')), true);
|
|
134
|
+
});
|
|
135
|
+
|
|
136
|
+
test('incomplete target skill inventory cannot uninstall existing capabilities', async t => {
|
|
137
|
+
const f = await fixture(t);
|
|
138
|
+
const before = tree(f.project);
|
|
139
|
+
rmSync(join(f.target, 'skills/micro-app-backend-development'), { recursive: true });
|
|
140
|
+
const manifest = json(join(f.target, 'bundle.json'));
|
|
141
|
+
manifest.skills = six.filter(name => name !== 'micro-app-backend-development');
|
|
142
|
+
manifest.files = tree(f.target, { exclude: ['bundle.json', 'evals'] });
|
|
143
|
+
writeFileSync(join(f.target, 'bundle.json'), JSON.stringify(manifest));
|
|
144
|
+
await assert.rejects(update(f.options), /INVALID_BUNDLE/);
|
|
145
|
+
assert.deepEqual(tree(f.project), before);
|
|
146
|
+
});
|
|
147
|
+
|
|
148
|
+
test('declared skill inventory must match the actual delivered set before update', async t => {
|
|
149
|
+
const f = await fixture(t);
|
|
150
|
+
const before = tree(f.project);
|
|
151
|
+
const manifest = json(join(f.target, 'bundle.json'));
|
|
152
|
+
manifest.skills = four;
|
|
153
|
+
writeFileSync(join(f.target, 'bundle.json'), JSON.stringify(manifest));
|
|
154
|
+
await assert.rejects(update({ ...f.options, check: true }), /INVALID_BUNDLE/);
|
|
155
|
+
assert.deepEqual(tree(f.project), before);
|
|
156
|
+
});
|
|
157
|
+
|
|
158
|
+
test('extra undeclared skill directories are rejected before changing the installation', async t => {
|
|
159
|
+
const f = await fixture(t);
|
|
160
|
+
const before = tree(f.project);
|
|
161
|
+
const extra = join(f.target, 'skills/unmanaged-extra');
|
|
162
|
+
mkdirSync(extra);
|
|
163
|
+
writeFileSync(join(extra, 'tool.mjs'), 'export const value = 1;');
|
|
164
|
+
const manifest = json(join(f.target, 'bundle.json'));
|
|
165
|
+
manifest.files = tree(f.target, { exclude: ['bundle.json', 'evals'] });
|
|
166
|
+
writeFileSync(join(f.target, 'bundle.json'), JSON.stringify(manifest));
|
|
167
|
+
await assert.rejects(update(f.options), /INVALID_BUNDLE/);
|
|
168
|
+
assert.deepEqual(tree(f.project), before);
|
|
169
|
+
});
|