Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions eng/scripts/bundle_dists.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,17 @@ const packages = [
"@typespec/openapi3",
"@typespec/json-schema",
"@typespec/protobuf",
"@typespec/streams",
"@azure-tools/typespec-autorest",
"@azure-tools/typespec-azure-core",
"@azure-tools/typespec-client-generator-core",
"@azure-tools/typespec-azure-resource-manager",
];

const extern_packages = [
"../../node_modules/@azure-tools/typespec-liftr-base",
]

function removeDirRecursive(dirPath) {
if (existsSync(dirPath)) {
readdirSync(dirPath).forEach((file) => {
Expand Down Expand Up @@ -131,6 +136,10 @@ async function syncTypespecPackages() {
console.log(`Repo root: ${repoRoot}`);
const allProjects = await findWorkspacePackagesNoCheck(repoRoot);
const projects = allProjects.filter((x) => packages.includes(x.manifest.name));
for (const extern_source of extern_packages) {
const extern_projects = await findWorkspacePackagesNoCheck(resolve(repoRoot, extern_source));
projects.push(...extern_projects);
}
Comment on lines +139 to +142
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is it possible to move part of the createTypeSpecBundle functions into browser such as web, so that we can dynamically fetch and create the bundle

Copy link
Contributor Author

@AllyW AllyW Nov 18, 2024

Choose a reason for hiding this comment

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

Yes, that can be realized if we mimic npm get lib and then adjust the virtual file system by 1) direct tsp loading or 2) bundle and dynamically load shim import map file.

const typespec_aaz = await findWorkspacePackagesNoCheck(resolve(repoRoot, "../typespec-aaz"));
projects.push(...typespec_aaz);

Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"devDependencies": {
"@pnpm/find-workspace-packages": "^6.0.9",
"@pnpm/logger": "^5.0.0",
"@azure-tools/typespec-liftr-base": "^0.4.0",
"rimraf": "~5.0.5"
},
"syncpack": {
Expand Down
Loading
Loading