From af052e0857fc4d6a1bc815f658e43c539800790f Mon Sep 17 00:00:00 2001 From: Eric Anderson Date: Thu, 11 Jul 2024 14:35:13 -0400 Subject: [PATCH] Restructure create app to make it easier to upgrade deps --- .changeset/lazy-tools-hear.md | 2 + .gitignore | 1 + .monorepolint.config.mjs | 44 ++ .../bin/create-app.template-packager.mjs | 5 + .../create-app.template-packager/package.json | 62 +++ .../create-app.template-packager/src/index.ts | 110 ++++ .../tsconfig.cjs.json | 14 + .../tsconfig.json | 11 + .../tsup.config.js | 23 + .../README.md | 7 + .../package.json | 60 +++ .../src/index.ts | 17 + .../templates}/.eslintrc.json | 0 .../templates}/README.md.hbs | 0 .../templates}/_gitignore | 0 .../templates}/next.config.js.hbs | 0 .../templates/package.json.hbs | 17 + .../templates}/public/next.svg | 0 .../templates}/public/palantir.svg | 0 .../templates}/src/app/auth/callback/page.tsx | 0 .../templates}/src/app/globals.css | 0 .../templates}/src/app/icon.svg | 0 .../templates}/src/app/layout.module.css | 0 .../templates}/src/app/layout.tsx | 0 .../templates}/src/app/login/page.tsx | 0 .../templates}/src/app/page.module.css | 0 .../templates}/src/app/page.tsx.hbs | 0 .../templates}/src/lib/client.ts.hbs | 0 .../templates}/src/lib/useAuthenticated.ts | 0 .../templates}/tsconfig.json | 0 .../tsconfig.json | 11 + .../tsup.config.js | 23 + .../turbo.json | 11 + packages/create-app.template.react/README.md | 7 + .../create-app.template.react/package.json | 64 +++ .../create-app.template.react/src/index.ts | 17 + .../templates}/.eslintrc.cjs | 0 .../templates}/README.md.hbs | 0 .../templates}/_gitignore | 0 .../templates}/index.html | 0 .../templates/package.json.hbs | 19 + .../templates}/public/palantir.svg | 0 .../templates}/public/react.svg | 0 .../templates}/src/AuthCallback.tsx | 0 .../templates}/src/AuthenticatedRoute.tsx | 0 .../templates}/src/Home.module.css | 0 .../templates}/src/Home.tsx.hbs | 0 .../templates}/src/Layout.module.css | 0 .../templates}/src/Layout.tsx | 0 .../templates}/src/Login.tsx | 0 .../templates}/src/client.ts.hbs | 0 .../templates}/src/index.css | 0 .../templates}/src/main.tsx | 0 .../templates}/src/vite-env.d.ts | 0 .../templates}/tsconfig.json | 0 .../templates}/tsconfig.node.json | 0 .../templates}/vite.config.ts.hbs | 0 .../create-app.template.react/tsconfig.json | 11 + .../create-app.template.react/tsup.config.js | 23 + packages/create-app.template.react/turbo.json | 11 + .../README.md | 7 + .../package.json | 65 +++ .../src/index.ts | 17 + .../templates}/.eslintrc.cjs | 0 .../templates}/.gitignore | 0 .../templates}/README.md.hbs | 0 .../templates}/index.html | 0 .../templates/package.json.hbs | 17 + .../templates}/public/aip-icon.svg | 0 .../templates}/public/todo-aip-app.svg | 0 .../templates}/src/AuthCallback.tsx | 0 .../templates}/src/AuthenticatedRoute.tsx | 0 .../src/CreateProjectButton.module.css | 0 .../templates}/src/CreateProjectButton.tsx | 0 .../src/CreateProjectDialog.module.css | 0 .../templates}/src/CreateProjectDialog.tsx | 0 .../src/CreateTaskButton.module.css | 0 .../templates}/src/CreateTaskButton.tsx | 0 .../src/CreateTaskDialog.module.css | 0 .../templates}/src/CreateTaskDialog.tsx | 0 .../src/DeleteProjectButton.module.css | 0 .../templates}/src/DeleteProjectButton.tsx | 0 .../src/DeleteProjectDialog.module.css | 0 .../templates}/src/DeleteProjectDialog.tsx | 0 .../templates}/src/Dialog.module.css | 0 .../templates}/src/Dialog.tsx | 0 .../templates}/src/Home.module.css | 0 .../templates}/src/Home.tsx | 0 .../templates}/src/Layout.module.css | 0 .../templates}/src/Layout.tsx | 0 .../templates}/src/Login.module.css | 0 .../templates}/src/Login.tsx | 0 .../templates}/src/ProjectDetails.module.css | 0 .../templates}/src/ProjectDetails.tsx | 0 .../templates}/src/ProjectSelect.tsx | 0 .../templates}/src/TaskList.module.css | 0 .../templates}/src/TaskList.tsx | 0 .../templates}/src/TaskListItem.module.css | 0 .../templates}/src/TaskListItem.tsx | 0 .../templates}/src/client.ts.hbs | 0 .../templates}/src/index.css | 0 .../templates}/src/main.tsx | 0 .../templates}/src/mocks.ts | 0 .../templates}/src/useProjectTasks.ts | 0 .../templates}/src/useProjects.ts | 0 .../templates}/src/vite-env.d.ts | 0 .../templates}/tsconfig.json | 0 .../templates}/tsconfig.node.json | 0 .../templates}/vite.config.ts.hbs | 0 .../tsconfig.json | 11 + .../tsup.config.js | 23 + .../turbo.json | 11 + .../README.md | 7 + .../package.json | 65 +++ .../src/index.ts | 17 + .../templates}/.eslintrc.cjs | 0 .../templates}/.gitignore | 0 .../templates}/README.md.hbs | 0 .../templates}/index.html | 0 .../templates/package.json.hbs | 17 + .../templates}/public/todo-app.svg | 0 .../templates}/src/AuthCallback.tsx | 0 .../templates}/src/AuthenticatedRoute.tsx | 0 .../templates}/src/CreateProjectButton.tsx | 0 .../templates}/src/CreateProjectDialog.tsx | 0 .../templates}/src/CreateTaskButton.tsx | 0 .../templates}/src/CreateTaskDialog.tsx | 0 .../templates}/src/DeleteProjectButton.tsx | 0 .../templates}/src/DeleteProjectDialog.tsx | 0 .../templates}/src/Dialog.module.css | 0 .../templates}/src/Dialog.tsx | 0 .../templates}/src/Home.module.css | 0 .../templates}/src/Home.tsx | 0 .../templates}/src/Layout.module.css | 0 .../templates}/src/Layout.tsx | 0 .../templates}/src/Login.module.css | 0 .../templates}/src/Login.tsx | 0 .../templates}/src/ProjectSelect.tsx | 0 .../templates}/src/TaskList.module.css | 0 .../templates}/src/TaskList.tsx | 0 .../templates}/src/TaskListItem.module.css | 0 .../templates}/src/TaskListItem.tsx | 0 .../templates}/src/client.ts.hbs | 0 .../templates}/src/index.css | 0 .../templates}/src/main.tsx | 0 .../templates}/src/mocks.ts | 0 .../templates}/src/useProjectTasks.ts | 0 .../templates}/src/useProjects.ts | 0 .../templates}/src/vite-env.d.ts | 0 .../templates}/tsconfig.json | 0 .../templates}/tsconfig.node.json | 0 .../templates}/vite.config.ts.hbs | 0 .../tsconfig.json | 11 + .../tsup.config.js | 23 + .../turbo.json | 11 + packages/create-app.template.vue/README.md | 7 + packages/create-app.template.vue/package.json | 57 +++ packages/create-app.template.vue/src/index.ts | 17 + .../templates}/.vscode/extensions.json | 0 .../templates}/README.md.hbs | 0 .../templates}/_gitignore | 0 .../templates}/index.html | 0 .../templates}/package.json.hbs | 8 +- .../templates}/public/palantir.svg | 0 .../templates}/public/vue.svg | 0 .../templates}/src/AuthCallback.vue | 0 .../templates}/src/Home.vue.hbs | 0 .../templates}/src/Layout.vue | 0 .../templates}/src/Login.vue | 0 .../templates}/src/client.ts.hbs | 0 .../templates}/src/main.ts | 0 .../templates}/src/style.css | 0 .../templates}/src/vite-env.d.ts | 0 .../templates}/tsconfig.json | 0 .../templates}/tsconfig.node.json | 0 .../templates}/vite.config.ts.hbs | 0 .../create-app.template.vue/tsconfig.json | 11 + .../create-app.template.vue/tsup.config.js | 23 + packages/create-app.template.vue/turbo.json | 11 + packages/create-app/package.json | 5 + packages/create-app/src/run.ts | 27 +- .../package.json.hbs | 25 - .../templates/template-react/package.json.hbs | 30 -- .../package.json.hbs | 31 -- .../package.json.hbs | 31 -- packages/example-generator/package.json | 1 + packages/example-generator/src/run.ts | 38 ++ pnpm-lock.yaml | 483 +++++++++++++++++- turbo.json | 7 +- 189 files changed, 1534 insertions(+), 150 deletions(-) create mode 100644 .changeset/lazy-tools-hear.md create mode 100755 packages/create-app.template-packager/bin/create-app.template-packager.mjs create mode 100644 packages/create-app.template-packager/package.json create mode 100644 packages/create-app.template-packager/src/index.ts create mode 100644 packages/create-app.template-packager/tsconfig.cjs.json create mode 100644 packages/create-app.template-packager/tsconfig.json create mode 100644 packages/create-app.template-packager/tsup.config.js create mode 100644 packages/create-app.template.next-static-export/README.md create mode 100644 packages/create-app.template.next-static-export/package.json create mode 100644 packages/create-app.template.next-static-export/src/index.ts rename packages/{create-app/templates/template-next-static-export => create-app.template.next-static-export/templates}/.eslintrc.json (100%) rename packages/{create-app/templates/template-next-static-export => create-app.template.next-static-export/templates}/README.md.hbs (100%) rename packages/{create-app/templates/template-next-static-export => create-app.template.next-static-export/templates}/_gitignore (100%) rename packages/{create-app/templates/template-next-static-export => create-app.template.next-static-export/templates}/next.config.js.hbs (100%) create mode 100644 packages/create-app.template.next-static-export/templates/package.json.hbs rename packages/{create-app/templates/template-next-static-export => create-app.template.next-static-export/templates}/public/next.svg (100%) rename packages/{create-app/templates/template-next-static-export => create-app.template.next-static-export/templates}/public/palantir.svg (100%) rename packages/{create-app/templates/template-next-static-export => create-app.template.next-static-export/templates}/src/app/auth/callback/page.tsx (100%) rename packages/{create-app/templates/template-next-static-export => create-app.template.next-static-export/templates}/src/app/globals.css (100%) rename packages/{create-app/templates/template-next-static-export => create-app.template.next-static-export/templates}/src/app/icon.svg (100%) rename packages/{create-app/templates/template-next-static-export => create-app.template.next-static-export/templates}/src/app/layout.module.css (100%) rename packages/{create-app/templates/template-next-static-export => create-app.template.next-static-export/templates}/src/app/layout.tsx (100%) rename packages/{create-app/templates/template-next-static-export => create-app.template.next-static-export/templates}/src/app/login/page.tsx (100%) rename packages/{create-app/templates/template-next-static-export => create-app.template.next-static-export/templates}/src/app/page.module.css (100%) rename packages/{create-app/templates/template-next-static-export => create-app.template.next-static-export/templates}/src/app/page.tsx.hbs (100%) rename packages/{create-app/templates/template-next-static-export => create-app.template.next-static-export/templates}/src/lib/client.ts.hbs (100%) rename packages/{create-app/templates/template-next-static-export => create-app.template.next-static-export/templates}/src/lib/useAuthenticated.ts (100%) rename packages/{create-app/templates/template-next-static-export => create-app.template.next-static-export/templates}/tsconfig.json (100%) create mode 100644 packages/create-app.template.next-static-export/tsconfig.json create mode 100644 packages/create-app.template.next-static-export/tsup.config.js create mode 100644 packages/create-app.template.next-static-export/turbo.json create mode 100644 packages/create-app.template.react/README.md create mode 100644 packages/create-app.template.react/package.json create mode 100644 packages/create-app.template.react/src/index.ts rename packages/{create-app/templates/template-react => create-app.template.react/templates}/.eslintrc.cjs (100%) rename packages/{create-app/templates/template-react => create-app.template.react/templates}/README.md.hbs (100%) rename packages/{create-app/templates/template-react => create-app.template.react/templates}/_gitignore (100%) rename packages/{create-app/templates/template-react => create-app.template.react/templates}/index.html (100%) create mode 100644 packages/create-app.template.react/templates/package.json.hbs rename packages/{create-app/templates/template-react => create-app.template.react/templates}/public/palantir.svg (100%) rename packages/{create-app/templates/template-react => create-app.template.react/templates}/public/react.svg (100%) rename packages/{create-app/templates/template-react => create-app.template.react/templates}/src/AuthCallback.tsx (100%) rename packages/{create-app/templates/template-react => create-app.template.react/templates}/src/AuthenticatedRoute.tsx (100%) rename packages/{create-app/templates/template-react => create-app.template.react/templates}/src/Home.module.css (100%) rename packages/{create-app/templates/template-react => create-app.template.react/templates}/src/Home.tsx.hbs (100%) rename packages/{create-app/templates/template-react => create-app.template.react/templates}/src/Layout.module.css (100%) rename packages/{create-app/templates/template-react => create-app.template.react/templates}/src/Layout.tsx (100%) rename packages/{create-app/templates/template-react => create-app.template.react/templates}/src/Login.tsx (100%) rename packages/{create-app/templates/template-react => create-app.template.react/templates}/src/client.ts.hbs (100%) rename packages/{create-app/templates/template-react => create-app.template.react/templates}/src/index.css (100%) rename packages/{create-app/templates/template-react => create-app.template.react/templates}/src/main.tsx (100%) rename packages/{create-app/templates/template-react => create-app.template.react/templates}/src/vite-env.d.ts (100%) rename packages/{create-app/templates/template-react => create-app.template.react/templates}/tsconfig.json (100%) rename packages/{create-app/templates/template-react => create-app.template.react/templates}/tsconfig.node.json (100%) rename packages/{create-app/templates/template-react => create-app.template.react/templates}/vite.config.ts.hbs (100%) create mode 100644 packages/create-app.template.react/tsconfig.json create mode 100644 packages/create-app.template.react/tsup.config.js create mode 100644 packages/create-app.template.react/turbo.json create mode 100644 packages/create-app.template.tutorial-todo-aip-app/README.md create mode 100644 packages/create-app.template.tutorial-todo-aip-app/package.json create mode 100644 packages/create-app.template.tutorial-todo-aip-app/src/index.ts rename packages/{create-app/templates/template-tutorial-todo-aip-app => create-app.template.tutorial-todo-aip-app/templates}/.eslintrc.cjs (100%) rename packages/{create-app/templates/template-tutorial-todo-aip-app => create-app.template.tutorial-todo-aip-app/templates}/.gitignore (100%) rename packages/{create-app/templates/template-tutorial-todo-aip-app => create-app.template.tutorial-todo-aip-app/templates}/README.md.hbs (100%) rename packages/{create-app/templates/template-tutorial-todo-aip-app => create-app.template.tutorial-todo-aip-app/templates}/index.html (100%) create mode 100644 packages/create-app.template.tutorial-todo-aip-app/templates/package.json.hbs rename packages/{create-app/templates/template-tutorial-todo-aip-app => create-app.template.tutorial-todo-aip-app/templates}/public/aip-icon.svg (100%) rename packages/{create-app/templates/template-tutorial-todo-aip-app => create-app.template.tutorial-todo-aip-app/templates}/public/todo-aip-app.svg (100%) rename packages/{create-app/templates/template-tutorial-todo-aip-app => create-app.template.tutorial-todo-aip-app/templates}/src/AuthCallback.tsx (100%) rename packages/{create-app/templates/template-tutorial-todo-aip-app => create-app.template.tutorial-todo-aip-app/templates}/src/AuthenticatedRoute.tsx (100%) rename packages/{create-app/templates/template-tutorial-todo-aip-app => create-app.template.tutorial-todo-aip-app/templates}/src/CreateProjectButton.module.css (100%) rename packages/{create-app/templates/template-tutorial-todo-aip-app => create-app.template.tutorial-todo-aip-app/templates}/src/CreateProjectButton.tsx (100%) rename packages/{create-app/templates/template-tutorial-todo-aip-app => create-app.template.tutorial-todo-aip-app/templates}/src/CreateProjectDialog.module.css (100%) rename packages/{create-app/templates/template-tutorial-todo-aip-app => create-app.template.tutorial-todo-aip-app/templates}/src/CreateProjectDialog.tsx (100%) rename packages/{create-app/templates/template-tutorial-todo-aip-app => create-app.template.tutorial-todo-aip-app/templates}/src/CreateTaskButton.module.css (100%) rename packages/{create-app/templates/template-tutorial-todo-aip-app => create-app.template.tutorial-todo-aip-app/templates}/src/CreateTaskButton.tsx (100%) rename packages/{create-app/templates/template-tutorial-todo-aip-app => create-app.template.tutorial-todo-aip-app/templates}/src/CreateTaskDialog.module.css (100%) rename packages/{create-app/templates/template-tutorial-todo-aip-app => create-app.template.tutorial-todo-aip-app/templates}/src/CreateTaskDialog.tsx (100%) rename packages/{create-app/templates/template-tutorial-todo-aip-app => create-app.template.tutorial-todo-aip-app/templates}/src/DeleteProjectButton.module.css (100%) rename packages/{create-app/templates/template-tutorial-todo-aip-app => create-app.template.tutorial-todo-aip-app/templates}/src/DeleteProjectButton.tsx (100%) rename packages/{create-app/templates/template-tutorial-todo-aip-app => create-app.template.tutorial-todo-aip-app/templates}/src/DeleteProjectDialog.module.css (100%) rename packages/{create-app/templates/template-tutorial-todo-aip-app => create-app.template.tutorial-todo-aip-app/templates}/src/DeleteProjectDialog.tsx (100%) rename packages/{create-app/templates/template-tutorial-todo-aip-app => create-app.template.tutorial-todo-aip-app/templates}/src/Dialog.module.css (100%) rename packages/{create-app/templates/template-tutorial-todo-aip-app => create-app.template.tutorial-todo-aip-app/templates}/src/Dialog.tsx (100%) rename packages/{create-app/templates/template-tutorial-todo-aip-app => create-app.template.tutorial-todo-aip-app/templates}/src/Home.module.css (100%) rename packages/{create-app/templates/template-tutorial-todo-aip-app => create-app.template.tutorial-todo-aip-app/templates}/src/Home.tsx (100%) rename packages/{create-app/templates/template-tutorial-todo-aip-app => create-app.template.tutorial-todo-aip-app/templates}/src/Layout.module.css (100%) rename packages/{create-app/templates/template-tutorial-todo-aip-app => create-app.template.tutorial-todo-aip-app/templates}/src/Layout.tsx (100%) rename packages/{create-app/templates/template-tutorial-todo-aip-app => create-app.template.tutorial-todo-aip-app/templates}/src/Login.module.css (100%) rename packages/{create-app/templates/template-tutorial-todo-aip-app => create-app.template.tutorial-todo-aip-app/templates}/src/Login.tsx (100%) rename packages/{create-app/templates/template-tutorial-todo-aip-app => create-app.template.tutorial-todo-aip-app/templates}/src/ProjectDetails.module.css (100%) rename packages/{create-app/templates/template-tutorial-todo-aip-app => create-app.template.tutorial-todo-aip-app/templates}/src/ProjectDetails.tsx (100%) rename packages/{create-app/templates/template-tutorial-todo-aip-app => create-app.template.tutorial-todo-aip-app/templates}/src/ProjectSelect.tsx (100%) rename packages/{create-app/templates/template-tutorial-todo-aip-app => create-app.template.tutorial-todo-aip-app/templates}/src/TaskList.module.css (100%) rename packages/{create-app/templates/template-tutorial-todo-aip-app => create-app.template.tutorial-todo-aip-app/templates}/src/TaskList.tsx (100%) rename packages/{create-app/templates/template-tutorial-todo-aip-app => create-app.template.tutorial-todo-aip-app/templates}/src/TaskListItem.module.css (100%) rename packages/{create-app/templates/template-tutorial-todo-aip-app => create-app.template.tutorial-todo-aip-app/templates}/src/TaskListItem.tsx (100%) rename packages/{create-app/templates/template-tutorial-todo-aip-app => create-app.template.tutorial-todo-aip-app/templates}/src/client.ts.hbs (100%) rename packages/{create-app/templates/template-tutorial-todo-aip-app => create-app.template.tutorial-todo-aip-app/templates}/src/index.css (100%) rename packages/{create-app/templates/template-tutorial-todo-aip-app => create-app.template.tutorial-todo-aip-app/templates}/src/main.tsx (100%) rename packages/{create-app/templates/template-tutorial-todo-aip-app => create-app.template.tutorial-todo-aip-app/templates}/src/mocks.ts (100%) rename packages/{create-app/templates/template-tutorial-todo-aip-app => create-app.template.tutorial-todo-aip-app/templates}/src/useProjectTasks.ts (100%) rename packages/{create-app/templates/template-tutorial-todo-aip-app => create-app.template.tutorial-todo-aip-app/templates}/src/useProjects.ts (100%) rename packages/{create-app/templates/template-tutorial-todo-aip-app => create-app.template.tutorial-todo-aip-app/templates}/src/vite-env.d.ts (100%) rename packages/{create-app/templates/template-tutorial-todo-aip-app => create-app.template.tutorial-todo-aip-app/templates}/tsconfig.json (100%) rename packages/{create-app/templates/template-tutorial-todo-aip-app => create-app.template.tutorial-todo-aip-app/templates}/tsconfig.node.json (100%) rename packages/{create-app/templates/template-tutorial-todo-aip-app => create-app.template.tutorial-todo-aip-app/templates}/vite.config.ts.hbs (100%) create mode 100644 packages/create-app.template.tutorial-todo-aip-app/tsconfig.json create mode 100644 packages/create-app.template.tutorial-todo-aip-app/tsup.config.js create mode 100644 packages/create-app.template.tutorial-todo-aip-app/turbo.json create mode 100644 packages/create-app.template.tutorial-todo-app/README.md create mode 100644 packages/create-app.template.tutorial-todo-app/package.json create mode 100644 packages/create-app.template.tutorial-todo-app/src/index.ts rename packages/{create-app/templates/template-tutorial-todo-app => create-app.template.tutorial-todo-app/templates}/.eslintrc.cjs (100%) rename packages/{create-app/templates/template-tutorial-todo-app => create-app.template.tutorial-todo-app/templates}/.gitignore (100%) rename packages/{create-app/templates/template-tutorial-todo-app => create-app.template.tutorial-todo-app/templates}/README.md.hbs (100%) rename packages/{create-app/templates/template-tutorial-todo-app => create-app.template.tutorial-todo-app/templates}/index.html (100%) create mode 100644 packages/create-app.template.tutorial-todo-app/templates/package.json.hbs rename packages/{create-app/templates/template-tutorial-todo-app => create-app.template.tutorial-todo-app/templates}/public/todo-app.svg (100%) rename packages/{create-app/templates/template-tutorial-todo-app => create-app.template.tutorial-todo-app/templates}/src/AuthCallback.tsx (100%) rename packages/{create-app/templates/template-tutorial-todo-app => create-app.template.tutorial-todo-app/templates}/src/AuthenticatedRoute.tsx (100%) rename packages/{create-app/templates/template-tutorial-todo-app => create-app.template.tutorial-todo-app/templates}/src/CreateProjectButton.tsx (100%) rename packages/{create-app/templates/template-tutorial-todo-app => create-app.template.tutorial-todo-app/templates}/src/CreateProjectDialog.tsx (100%) rename packages/{create-app/templates/template-tutorial-todo-app => create-app.template.tutorial-todo-app/templates}/src/CreateTaskButton.tsx (100%) rename packages/{create-app/templates/template-tutorial-todo-app => create-app.template.tutorial-todo-app/templates}/src/CreateTaskDialog.tsx (100%) rename packages/{create-app/templates/template-tutorial-todo-app => create-app.template.tutorial-todo-app/templates}/src/DeleteProjectButton.tsx (100%) rename packages/{create-app/templates/template-tutorial-todo-app => create-app.template.tutorial-todo-app/templates}/src/DeleteProjectDialog.tsx (100%) rename packages/{create-app/templates/template-tutorial-todo-app => create-app.template.tutorial-todo-app/templates}/src/Dialog.module.css (100%) rename packages/{create-app/templates/template-tutorial-todo-app => create-app.template.tutorial-todo-app/templates}/src/Dialog.tsx (100%) rename packages/{create-app/templates/template-tutorial-todo-app => create-app.template.tutorial-todo-app/templates}/src/Home.module.css (100%) rename packages/{create-app/templates/template-tutorial-todo-app => create-app.template.tutorial-todo-app/templates}/src/Home.tsx (100%) rename packages/{create-app/templates/template-tutorial-todo-app => create-app.template.tutorial-todo-app/templates}/src/Layout.module.css (100%) rename packages/{create-app/templates/template-tutorial-todo-app => create-app.template.tutorial-todo-app/templates}/src/Layout.tsx (100%) rename packages/{create-app/templates/template-tutorial-todo-app => create-app.template.tutorial-todo-app/templates}/src/Login.module.css (100%) rename packages/{create-app/templates/template-tutorial-todo-app => create-app.template.tutorial-todo-app/templates}/src/Login.tsx (100%) rename packages/{create-app/templates/template-tutorial-todo-app => create-app.template.tutorial-todo-app/templates}/src/ProjectSelect.tsx (100%) rename packages/{create-app/templates/template-tutorial-todo-app => create-app.template.tutorial-todo-app/templates}/src/TaskList.module.css (100%) rename packages/{create-app/templates/template-tutorial-todo-app => create-app.template.tutorial-todo-app/templates}/src/TaskList.tsx (100%) rename packages/{create-app/templates/template-tutorial-todo-app => create-app.template.tutorial-todo-app/templates}/src/TaskListItem.module.css (100%) rename packages/{create-app/templates/template-tutorial-todo-app => create-app.template.tutorial-todo-app/templates}/src/TaskListItem.tsx (100%) rename packages/{create-app/templates/template-tutorial-todo-app => create-app.template.tutorial-todo-app/templates}/src/client.ts.hbs (100%) rename packages/{create-app/templates/template-tutorial-todo-app => create-app.template.tutorial-todo-app/templates}/src/index.css (100%) rename packages/{create-app/templates/template-tutorial-todo-app => create-app.template.tutorial-todo-app/templates}/src/main.tsx (100%) rename packages/{create-app/templates/template-tutorial-todo-app => create-app.template.tutorial-todo-app/templates}/src/mocks.ts (100%) rename packages/{create-app/templates/template-tutorial-todo-app => create-app.template.tutorial-todo-app/templates}/src/useProjectTasks.ts (100%) rename packages/{create-app/templates/template-tutorial-todo-app => create-app.template.tutorial-todo-app/templates}/src/useProjects.ts (100%) rename packages/{create-app/templates/template-tutorial-todo-app => create-app.template.tutorial-todo-app/templates}/src/vite-env.d.ts (100%) rename packages/{create-app/templates/template-tutorial-todo-app => create-app.template.tutorial-todo-app/templates}/tsconfig.json (100%) rename packages/{create-app/templates/template-tutorial-todo-app => create-app.template.tutorial-todo-app/templates}/tsconfig.node.json (100%) rename packages/{create-app/templates/template-tutorial-todo-app => create-app.template.tutorial-todo-app/templates}/vite.config.ts.hbs (100%) create mode 100644 packages/create-app.template.tutorial-todo-app/tsconfig.json create mode 100644 packages/create-app.template.tutorial-todo-app/tsup.config.js create mode 100644 packages/create-app.template.tutorial-todo-app/turbo.json create mode 100644 packages/create-app.template.vue/README.md create mode 100644 packages/create-app.template.vue/package.json create mode 100644 packages/create-app.template.vue/src/index.ts rename packages/{create-app/templates/template-vue => create-app.template.vue/templates}/.vscode/extensions.json (100%) rename packages/{create-app/templates/template-vue => create-app.template.vue/templates}/README.md.hbs (100%) rename packages/{create-app/templates/template-vue => create-app.template.vue/templates}/_gitignore (100%) rename packages/{create-app/templates/template-vue => create-app.template.vue/templates}/index.html (100%) rename packages/{create-app/templates/template-vue => create-app.template.vue/templates}/package.json.hbs (56%) rename packages/{create-app/templates/template-vue => create-app.template.vue/templates}/public/palantir.svg (100%) rename packages/{create-app/templates/template-vue => create-app.template.vue/templates}/public/vue.svg (100%) rename packages/{create-app/templates/template-vue => create-app.template.vue/templates}/src/AuthCallback.vue (100%) rename packages/{create-app/templates/template-vue => create-app.template.vue/templates}/src/Home.vue.hbs (100%) rename packages/{create-app/templates/template-vue => create-app.template.vue/templates}/src/Layout.vue (100%) rename packages/{create-app/templates/template-vue => create-app.template.vue/templates}/src/Login.vue (100%) rename packages/{create-app/templates/template-vue => create-app.template.vue/templates}/src/client.ts.hbs (100%) rename packages/{create-app/templates/template-vue => create-app.template.vue/templates}/src/main.ts (100%) rename packages/{create-app/templates/template-vue => create-app.template.vue/templates}/src/style.css (100%) rename packages/{create-app/templates/template-vue => create-app.template.vue/templates}/src/vite-env.d.ts (100%) rename packages/{create-app/templates/template-vue => create-app.template.vue/templates}/tsconfig.json (100%) rename packages/{create-app/templates/template-vue => create-app.template.vue/templates}/tsconfig.node.json (100%) rename packages/{create-app/templates/template-vue => create-app.template.vue/templates}/vite.config.ts.hbs (100%) create mode 100644 packages/create-app.template.vue/tsconfig.json create mode 100644 packages/create-app.template.vue/tsup.config.js create mode 100644 packages/create-app.template.vue/turbo.json delete mode 100644 packages/create-app/templates/template-next-static-export/package.json.hbs delete mode 100644 packages/create-app/templates/template-react/package.json.hbs delete mode 100644 packages/create-app/templates/template-tutorial-todo-aip-app/package.json.hbs delete mode 100644 packages/create-app/templates/template-tutorial-todo-app/package.json.hbs diff --git a/.changeset/lazy-tools-hear.md b/.changeset/lazy-tools-hear.md new file mode 100644 index 000000000..a845151cc --- /dev/null +++ b/.changeset/lazy-tools-hear.md @@ -0,0 +1,2 @@ +--- +--- diff --git a/.gitignore b/.gitignore index 0aaa4d434..1b89f1029 100644 --- a/.gitignore +++ b/.gitignore @@ -27,6 +27,7 @@ tsconfig.tsbuildinfo packages/client/src/generatedNoCheck packages/client.test.ontology/src/generatedNoCheck packages/legacy-client/src/generatedNoCheck +packages/create-app.template.*/src/generatedNoCheck .log pnpm-publish-summary.json diff --git a/.monorepolint.config.mjs b/.monorepolint.config.mjs index 9ecc0de13..9130f967e 100644 --- a/.monorepolint.config.mjs +++ b/.monorepolint.config.mjs @@ -37,6 +37,7 @@ const nonStandardPackages = [ "@osdk/foundry-sdk-generator", "@osdk/monorepo.*", "@osdk/shared.client", + "@osdk/create-app.template.*", "@osdk/tests.*", ]; @@ -70,6 +71,7 @@ const esmOnlyPackages = [ "@osdk/tool.release", "@osdk/version-updater", "@osdk/client.test.ontology", + "@osdk/create-app.template-packager", // "@osdk/examples.*", but they have their own config cause they are nonstandard ]; @@ -390,6 +392,48 @@ function standardPackageRules(shared, options) { */ export default { rules: [ + fileContents({ + includePackages: ["@osdk/create-app.template.*"], + options: { + file: "README.md", + generator: (context) => { + return `# ${context.getPackageJson().name} + +This package contains templates for \`@osdk/create-app\`. + +The dependencies will come from this package's \`package.json\` (excluding \`@osdk/create-app.template-packager\`) and the rest of template is filled out from the \`templates\` directory. + +NOTE: DO NOT EDIT THIS README BY HAND. It is generated by monorepolint. +`; + }, + }, + }), + fileContents({ + includePackages: ["@osdk/create-app.template.*"], + options: { + file: "turbo.json", + template: `{ + // WARNING: GENERATED FILE. DO NOT EDIT DIRECTLY. See .monorepolint.config.mjs + "extends": ["//"], + "tasks": { + "codegen": { + "inputs": ["templates/**/*"], + "outputs": ["src/generatedNoCheck/**/*"], + "dependsOn": ["@osdk/create-app.template-packager#transpile"] + } + } +} +`, + }, + }), + ...standardPackageRules({ + includePackages: ["@osdk/create-app.template.*"], + }, { + legacy: false, + packageDepth: 2, + type: "example", + esmOnly: true, + }), ...standardPackageRules({ excludePackages: [ ...nonStandardPackages, diff --git a/packages/create-app.template-packager/bin/create-app.template-packager.mjs b/packages/create-app.template-packager/bin/create-app.template-packager.mjs new file mode 100755 index 000000000..2968e1776 --- /dev/null +++ b/packages/create-app.template-packager/bin/create-app.template-packager.mjs @@ -0,0 +1,5 @@ +#!/usr/bin/env node +// @ts-check + +import { cli } from "../build/esm/index.js"; +cli(); diff --git a/packages/create-app.template-packager/package.json b/packages/create-app.template-packager/package.json new file mode 100644 index 000000000..e9779b1f6 --- /dev/null +++ b/packages/create-app.template-packager/package.json @@ -0,0 +1,62 @@ +{ + "name": "@osdk/create-app.template-packager", + "version": "0.0.0", + "license": "Apache-2.0", + "repository": { + "type": "git", + "url": "https://github.com/palantir/osdk-ts.git" + }, + "exports": { + ".": { + "browser": "./build/browser/index.js", + "import": "./build/esm/index.js" + }, + "./*": { + "browser": "./build/browser/public/*.js", + "import": "./build/esm/public/*.js" + } + }, + "scripts": { + "check-attw": "../../scripts/build_common/check-attw.sh esm", + "clean": "rm -rf lib dist types build tsconfig.tsbuildinfo", + "fix-lint": "eslint . --fix && dprint fmt --config $(find-up dprint.json)", + "lint": "eslint . && dprint check --config $(find-up dprint.json)", + "transpile": "find . \\( -path build/cjs -or -path build/esm -or -path build/browser \\) -type f \\( -name '*.js' -or -name '*.js.map' -or -name '*.cjs' -or -name '*.cjs.map' \\) -delete && tsup", + "typecheck": "find . \\( -path build/cjs -or -path build/esm -or -path build/browser \\) -type f \\( -name '*.ts' -or -name '*.ts.map' -or -name '*.cts' -or -name '*.cts.map' \\) -delete && ../../scripts/build_common/typecheck.sh esm" + }, + "dependencies": { + "consola": "^3.2.3", + "find-up": "^7.0.0", + "serialize-javascript": "^6.0.2" + }, + "devDependencies": { + "@osdk/monorepo.api-extractor": "workspace:~", + "@osdk/monorepo.tsconfig": "workspace:~", + "@osdk/monorepo.tsup": "workspace:~", + "@types/node": "^18.0.0", + "@types/serialize-javascript": "^5.0.4", + "@types/tmp": "^0.2.6", + "@types/yargs": "^17.0.29", + "tmp": "^0.2.3", + "typescript": "^5.5.2" + }, + "publishConfig": { + "access": "public" + }, + "bin": { + "create-app.template-packager": "bin/create-app.template-packager.mjs" + }, + "files": [ + "build/cjs", + "build/esm", + "build/browser", + "CHANGELOG.md", + "package.json", + "templates", + "*.d.ts" + ], + "main": "./build/cjs/index.cjs", + "module": "./build/esm/index.js", + "types": "./build/esm/index.d.ts", + "type": "module" +} diff --git a/packages/create-app.template-packager/src/index.ts b/packages/create-app.template-packager/src/index.ts new file mode 100644 index 000000000..f05c8fcb9 --- /dev/null +++ b/packages/create-app.template-packager/src/index.ts @@ -0,0 +1,110 @@ +/* + * Copyright 2024 Palantir Technologies, Inc. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { findUp } from "find-up"; +import * as fs from "node:fs/promises"; +import * as path from "node:path"; +import serialize from "serialize-javascript"; + +export async function cli() { + const extsToString = new Set([".html", ".cjs", ".hbs", ".gitignore", ".tsx"]); + + const templatesDir = await findUp("templates", { type: "directory" }); + if (!templatesDir) throw new Error("template dir is missing"); + + const sourcePackageJsonPath = await findUp("package.json"); + if (!sourcePackageJsonPath) throw new Error("package.json is missing"); + + const sourcePackageJson = JSON.parse( + await fs.readFile(sourcePackageJsonPath, "utf-8"), + ); + + let result = + "export const files = new Map([\n"; + + const processFiles = async function(dir: string, baseDir: string) { + for (const filename of await fs.readdir(dir)) { + const file = dir + "/" + filename; + + const stat = await fs.stat(file); + if (stat.isDirectory()) { + await processFiles(file, baseDir); + continue; + } + + let destPath = path.relative(baseDir, file); + + if (path.basename(destPath) === "_gitignore") { + destPath = path.join(path.dirname(destPath), ".gitignore"); + } + + const body = await fs.readFile(file); + let output: string; + + if (destPath === "package.json.hbs") { + const packageJson = JSON.parse(body.toString("utf-8")); + + for ( + const d of ["dependencies", "devDependencies", "peerDependencies"] + ) { + if (sourcePackageJson[d]) { + if (!packageJson[d]) { + packageJson[d] = {}; + } + Object.assign(packageJson[d], sourcePackageJson[d]); + delete packageJson[d]["@osdk/create-app.template-packager"]; + for (const key of Object.keys(packageJson[d])) { + if (key.startsWith("@osdk/monorepo.")) { + delete packageJson[d][key]; + } + } + } + } + + output = safeRaw(JSON.stringify(packageJson, undefined, 2)); + } else if ( + extsToString.has(path.extname(destPath)) + || path.basename(destPath) === ".gitignore" + ) { + output = safeRaw(body.toString("utf-8")); + } else { + output = serialize({ + type: "base64", + body: body.toString("base64"), + }, { space: 2 }); + } + + result += `["${destPath}", ${output}],\n`; + } + }; + await processFiles(templatesDir, templatesDir); + result += `]);`; + + await fs.mkdir("src/generatedNoCheck", { recursive: true }); + + await fs.writeFile("src/generatedNoCheck/index.ts", result, { + encoding: "utf-8", + }); +} + +function safeRaw(q: string): string { + return `{ type: "raw", body: \`${ + q + .replace(/\\/g, "\\\\") + .replace(/`/g, "\\`") + .replace(/\$/g, "\\$") + }\`}`; +} diff --git a/packages/create-app.template-packager/tsconfig.cjs.json b/packages/create-app.template-packager/tsconfig.cjs.json new file mode 100644 index 000000000..3e2ecf7d1 --- /dev/null +++ b/packages/create-app.template-packager/tsconfig.cjs.json @@ -0,0 +1,14 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "module": "CommonJS", + "moduleResolution": "Node", + "target": "ES6", + "rootDir": "src", + "outDir": "build/cjs" + }, + "include": [ + "./src/**/*" + ], + "references": [] +} diff --git a/packages/create-app.template-packager/tsconfig.json b/packages/create-app.template-packager/tsconfig.json new file mode 100644 index 000000000..6c1ec6f17 --- /dev/null +++ b/packages/create-app.template-packager/tsconfig.json @@ -0,0 +1,11 @@ +{ + "extends": "@osdk/monorepo.tsconfig/base.json", + "compilerOptions": { + "rootDir": "src", + "outDir": "build/esm" + }, + "include": [ + "./src/**/*" + ], + "references": [] +} diff --git a/packages/create-app.template-packager/tsup.config.js b/packages/create-app.template-packager/tsup.config.js new file mode 100644 index 000000000..cfc2b707b --- /dev/null +++ b/packages/create-app.template-packager/tsup.config.js @@ -0,0 +1,23 @@ +/* + * Copyright 2023 Palantir Technologies, Inc. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { defineConfig } from "tsup"; + +export default defineConfig(async (options) => + (await import("@osdk/monorepo.tsup")).default(options, { + esmOnly: true, + }) +); diff --git a/packages/create-app.template.next-static-export/README.md b/packages/create-app.template.next-static-export/README.md new file mode 100644 index 000000000..d55e26a81 --- /dev/null +++ b/packages/create-app.template.next-static-export/README.md @@ -0,0 +1,7 @@ +# @osdk/create-app.template.next-static-export + +This package contains templates for `@osdk/create-app`. + +The dependencies will come from this package's `package.json` (excluding `@osdk/create-app.template-packager`) and the rest of template is filled out from the `templates` directory. + +NOTE: DO NOT EDIT THIS README BY HAND. It is generated by monorepolint. diff --git a/packages/create-app.template.next-static-export/package.json b/packages/create-app.template.next-static-export/package.json new file mode 100644 index 000000000..ab0b2dbe9 --- /dev/null +++ b/packages/create-app.template.next-static-export/package.json @@ -0,0 +1,60 @@ +{ + "name": "@osdk/create-app.template.next-static-export", + "version": "0.17.0-beta.2", + "license": "Apache-2.0", + "repository": { + "type": "git", + "url": "https://github.com/palantir/osdk-ts.git" + }, + "exports": { + ".": { + "browser": "./build/browser/index.js", + "import": "./build/esm/index.js" + }, + "./*": { + "browser": "./build/browser/public/*.js", + "import": "./build/esm/public/*.js" + } + }, + "scripts": { + "check-attw": "../../scripts/build_common/check-attw.sh esm", + "clean": "rm -rf lib dist types build tsconfig.tsbuildinfo", + "codegen": "create-app.template-packager", + "fix-lint": "eslint . --fix && dprint fmt --config $(find-up dprint.json)", + "lint": "eslint . && dprint check --config $(find-up dprint.json)", + "transpile": "find . \\( -path build/cjs -or -path build/esm -or -path build/browser \\) -type f \\( -name '*.js' -or -name '*.js.map' -or -name '*.cjs' -or -name '*.cjs.map' \\) -delete && tsup", + "typecheck": "find . \\( -path build/cjs -or -path build/esm -or -path build/browser \\) -type f \\( -name '*.ts' -or -name '*.ts.map' -or -name '*.cts' -or -name '*.cts.map' \\) -delete && ../../scripts/build_common/typecheck.sh esm" + }, + "dependencies": { + "next": "14.2.3", + "react": "^18", + "react-dom": "^18" + }, + "devDependencies": { + "@osdk/create-app.template-packager": "workspace:~", + "@osdk/monorepo.api-extractor": "workspace:~", + "@osdk/monorepo.tsconfig": "workspace:~", + "@osdk/monorepo.tsup": "workspace:~", + "@types/node": "^20", + "@types/react": "^18", + "@types/react-dom": "^18", + "eslint": "^8.57.0", + "eslint-config-next": "^14.2.3", + "typescript": "^5" + }, + "publishConfig": { + "access": "public" + }, + "files": [ + "build/cjs", + "build/esm", + "build/browser", + "CHANGELOG.md", + "package.json", + "templates", + "*.d.ts" + ], + "module": "./build/esm/index.js", + "types": "./build/esm/index.d.ts", + "type": "module" +} diff --git a/packages/create-app.template.next-static-export/src/index.ts b/packages/create-app.template.next-static-export/src/index.ts new file mode 100644 index 000000000..b0301f174 --- /dev/null +++ b/packages/create-app.template.next-static-export/src/index.ts @@ -0,0 +1,17 @@ +/* + * Copyright 2024 Palantir Technologies, Inc. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export { files } from "./generatedNoCheck/index.js"; diff --git a/packages/create-app/templates/template-next-static-export/.eslintrc.json b/packages/create-app.template.next-static-export/templates/.eslintrc.json similarity index 100% rename from packages/create-app/templates/template-next-static-export/.eslintrc.json rename to packages/create-app.template.next-static-export/templates/.eslintrc.json diff --git a/packages/create-app/templates/template-next-static-export/README.md.hbs b/packages/create-app.template.next-static-export/templates/README.md.hbs similarity index 100% rename from packages/create-app/templates/template-next-static-export/README.md.hbs rename to packages/create-app.template.next-static-export/templates/README.md.hbs diff --git a/packages/create-app/templates/template-next-static-export/_gitignore b/packages/create-app.template.next-static-export/templates/_gitignore similarity index 100% rename from packages/create-app/templates/template-next-static-export/_gitignore rename to packages/create-app.template.next-static-export/templates/_gitignore diff --git a/packages/create-app/templates/template-next-static-export/next.config.js.hbs b/packages/create-app.template.next-static-export/templates/next.config.js.hbs similarity index 100% rename from packages/create-app/templates/template-next-static-export/next.config.js.hbs rename to packages/create-app.template.next-static-export/templates/next.config.js.hbs diff --git a/packages/create-app.template.next-static-export/templates/package.json.hbs b/packages/create-app.template.next-static-export/templates/package.json.hbs new file mode 100644 index 000000000..a80964b20 --- /dev/null +++ b/packages/create-app.template.next-static-export/templates/package.json.hbs @@ -0,0 +1,17 @@ +{ + "name": "{{project}}", + "private": true, + "version": "0.0.0", + "scripts": { + "dev": "next dev -p 8080", + "build": "next build", + "start": "next start", + "lint": "next lint" + }, + "dependencies": { + "{{osdkPackage}}": "latest" + }, + "devDependencies": { + + } +} diff --git a/packages/create-app/templates/template-next-static-export/public/next.svg b/packages/create-app.template.next-static-export/templates/public/next.svg similarity index 100% rename from packages/create-app/templates/template-next-static-export/public/next.svg rename to packages/create-app.template.next-static-export/templates/public/next.svg diff --git a/packages/create-app/templates/template-next-static-export/public/palantir.svg b/packages/create-app.template.next-static-export/templates/public/palantir.svg similarity index 100% rename from packages/create-app/templates/template-next-static-export/public/palantir.svg rename to packages/create-app.template.next-static-export/templates/public/palantir.svg diff --git a/packages/create-app/templates/template-next-static-export/src/app/auth/callback/page.tsx b/packages/create-app.template.next-static-export/templates/src/app/auth/callback/page.tsx similarity index 100% rename from packages/create-app/templates/template-next-static-export/src/app/auth/callback/page.tsx rename to packages/create-app.template.next-static-export/templates/src/app/auth/callback/page.tsx diff --git a/packages/create-app/templates/template-next-static-export/src/app/globals.css b/packages/create-app.template.next-static-export/templates/src/app/globals.css similarity index 100% rename from packages/create-app/templates/template-next-static-export/src/app/globals.css rename to packages/create-app.template.next-static-export/templates/src/app/globals.css diff --git a/packages/create-app/templates/template-next-static-export/src/app/icon.svg b/packages/create-app.template.next-static-export/templates/src/app/icon.svg similarity index 100% rename from packages/create-app/templates/template-next-static-export/src/app/icon.svg rename to packages/create-app.template.next-static-export/templates/src/app/icon.svg diff --git a/packages/create-app/templates/template-next-static-export/src/app/layout.module.css b/packages/create-app.template.next-static-export/templates/src/app/layout.module.css similarity index 100% rename from packages/create-app/templates/template-next-static-export/src/app/layout.module.css rename to packages/create-app.template.next-static-export/templates/src/app/layout.module.css diff --git a/packages/create-app/templates/template-next-static-export/src/app/layout.tsx b/packages/create-app.template.next-static-export/templates/src/app/layout.tsx similarity index 100% rename from packages/create-app/templates/template-next-static-export/src/app/layout.tsx rename to packages/create-app.template.next-static-export/templates/src/app/layout.tsx diff --git a/packages/create-app/templates/template-next-static-export/src/app/login/page.tsx b/packages/create-app.template.next-static-export/templates/src/app/login/page.tsx similarity index 100% rename from packages/create-app/templates/template-next-static-export/src/app/login/page.tsx rename to packages/create-app.template.next-static-export/templates/src/app/login/page.tsx diff --git a/packages/create-app/templates/template-next-static-export/src/app/page.module.css b/packages/create-app.template.next-static-export/templates/src/app/page.module.css similarity index 100% rename from packages/create-app/templates/template-next-static-export/src/app/page.module.css rename to packages/create-app.template.next-static-export/templates/src/app/page.module.css diff --git a/packages/create-app/templates/template-next-static-export/src/app/page.tsx.hbs b/packages/create-app.template.next-static-export/templates/src/app/page.tsx.hbs similarity index 100% rename from packages/create-app/templates/template-next-static-export/src/app/page.tsx.hbs rename to packages/create-app.template.next-static-export/templates/src/app/page.tsx.hbs diff --git a/packages/create-app/templates/template-next-static-export/src/lib/client.ts.hbs b/packages/create-app.template.next-static-export/templates/src/lib/client.ts.hbs similarity index 100% rename from packages/create-app/templates/template-next-static-export/src/lib/client.ts.hbs rename to packages/create-app.template.next-static-export/templates/src/lib/client.ts.hbs diff --git a/packages/create-app/templates/template-next-static-export/src/lib/useAuthenticated.ts b/packages/create-app.template.next-static-export/templates/src/lib/useAuthenticated.ts similarity index 100% rename from packages/create-app/templates/template-next-static-export/src/lib/useAuthenticated.ts rename to packages/create-app.template.next-static-export/templates/src/lib/useAuthenticated.ts diff --git a/packages/create-app/templates/template-next-static-export/tsconfig.json b/packages/create-app.template.next-static-export/templates/tsconfig.json similarity index 100% rename from packages/create-app/templates/template-next-static-export/tsconfig.json rename to packages/create-app.template.next-static-export/templates/tsconfig.json diff --git a/packages/create-app.template.next-static-export/tsconfig.json b/packages/create-app.template.next-static-export/tsconfig.json new file mode 100644 index 000000000..6c1ec6f17 --- /dev/null +++ b/packages/create-app.template.next-static-export/tsconfig.json @@ -0,0 +1,11 @@ +{ + "extends": "@osdk/monorepo.tsconfig/base.json", + "compilerOptions": { + "rootDir": "src", + "outDir": "build/esm" + }, + "include": [ + "./src/**/*" + ], + "references": [] +} diff --git a/packages/create-app.template.next-static-export/tsup.config.js b/packages/create-app.template.next-static-export/tsup.config.js new file mode 100644 index 000000000..cfc2b707b --- /dev/null +++ b/packages/create-app.template.next-static-export/tsup.config.js @@ -0,0 +1,23 @@ +/* + * Copyright 2023 Palantir Technologies, Inc. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { defineConfig } from "tsup"; + +export default defineConfig(async (options) => + (await import("@osdk/monorepo.tsup")).default(options, { + esmOnly: true, + }) +); diff --git a/packages/create-app.template.next-static-export/turbo.json b/packages/create-app.template.next-static-export/turbo.json new file mode 100644 index 000000000..c3d050e87 --- /dev/null +++ b/packages/create-app.template.next-static-export/turbo.json @@ -0,0 +1,11 @@ +{ + // WARNING: GENERATED FILE. DO NOT EDIT DIRECTLY. See .monorepolint.config.mjs + "extends": ["//"], + "tasks": { + "codegen": { + "inputs": ["templates/**/*"], + "outputs": ["src/generatedNoCheck/**/*"], + "dependsOn": ["@osdk/create-app.template-packager#transpile"] + } + } +} diff --git a/packages/create-app.template.react/README.md b/packages/create-app.template.react/README.md new file mode 100644 index 000000000..02e7af1b6 --- /dev/null +++ b/packages/create-app.template.react/README.md @@ -0,0 +1,7 @@ +# @osdk/create-app.template.react + +This package contains templates for `@osdk/create-app`. + +The dependencies will come from this package's `package.json` (excluding `@osdk/create-app.template-packager`) and the rest of template is filled out from the `templates` directory. + +NOTE: DO NOT EDIT THIS README BY HAND. It is generated by monorepolint. diff --git a/packages/create-app.template.react/package.json b/packages/create-app.template.react/package.json new file mode 100644 index 000000000..90e87afc2 --- /dev/null +++ b/packages/create-app.template.react/package.json @@ -0,0 +1,64 @@ +{ + "name": "@osdk/create-app.template.react", + "version": "0.17.0-beta.2", + "license": "Apache-2.0", + "repository": { + "type": "git", + "url": "https://github.com/palantir/osdk-ts.git" + }, + "exports": { + ".": { + "browser": "./build/browser/index.js", + "import": "./build/esm/index.js" + }, + "./*": { + "browser": "./build/browser/public/*.js", + "import": "./build/esm/public/*.js" + } + }, + "scripts": { + "check-attw": "../../scripts/build_common/check-attw.sh esm", + "clean": "rm -rf lib dist types build tsconfig.tsbuildinfo", + "codegen": "create-app.template-packager", + "fix-lint": "eslint . --fix && dprint fmt --config $(find-up dprint.json)", + "lint": "eslint . && dprint check --config $(find-up dprint.json)", + "transpile": "find . \\( -path build/cjs -or -path build/esm -or -path build/browser \\) -type f \\( -name '*.js' -or -name '*.js.map' -or -name '*.cjs' -or -name '*.cjs.map' \\) -delete && tsup", + "typecheck": "find . \\( -path build/cjs -or -path build/esm -or -path build/browser \\) -type f \\( -name '*.ts' -or -name '*.ts.map' -or -name '*.cts' -or -name '*.cts.map' \\) -delete && ../../scripts/build_common/typecheck.sh esm" + }, + "dependencies": { + "react": "^18", + "react-dom": "^18", + "react-router-dom": "^6.23.1" + }, + "devDependencies": { + "@osdk/create-app.template-packager": "workspace:~", + "@osdk/monorepo.api-extractor": "workspace:~", + "@osdk/monorepo.tsconfig": "workspace:~", + "@osdk/monorepo.tsup": "workspace:~", + "@types/react": "^18", + "@types/react-dom": "^18", + "@typescript-eslint/eslint-plugin": "^7.16.0", + "@typescript-eslint/parser": "^7.16.0", + "@vitejs/plugin-react": "^4.2.0", + "eslint": "^8.57.0", + "eslint-plugin-react-hooks": "^4.6.2", + "eslint-plugin-react-refresh": "^0.4.6", + "typescript": "^5.2.2", + "vite": "^5.2.11" + }, + "publishConfig": { + "access": "public" + }, + "files": [ + "build/cjs", + "build/esm", + "build/browser", + "CHANGELOG.md", + "package.json", + "templates", + "*.d.ts" + ], + "module": "./build/esm/index.js", + "types": "./build/esm/index.d.ts", + "type": "module" +} diff --git a/packages/create-app.template.react/src/index.ts b/packages/create-app.template.react/src/index.ts new file mode 100644 index 000000000..b0301f174 --- /dev/null +++ b/packages/create-app.template.react/src/index.ts @@ -0,0 +1,17 @@ +/* + * Copyright 2024 Palantir Technologies, Inc. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export { files } from "./generatedNoCheck/index.js"; diff --git a/packages/create-app/templates/template-react/.eslintrc.cjs b/packages/create-app.template.react/templates/.eslintrc.cjs similarity index 100% rename from packages/create-app/templates/template-react/.eslintrc.cjs rename to packages/create-app.template.react/templates/.eslintrc.cjs diff --git a/packages/create-app/templates/template-react/README.md.hbs b/packages/create-app.template.react/templates/README.md.hbs similarity index 100% rename from packages/create-app/templates/template-react/README.md.hbs rename to packages/create-app.template.react/templates/README.md.hbs diff --git a/packages/create-app/templates/template-react/_gitignore b/packages/create-app.template.react/templates/_gitignore similarity index 100% rename from packages/create-app/templates/template-react/_gitignore rename to packages/create-app.template.react/templates/_gitignore diff --git a/packages/create-app/templates/template-react/index.html b/packages/create-app.template.react/templates/index.html similarity index 100% rename from packages/create-app/templates/template-react/index.html rename to packages/create-app.template.react/templates/index.html diff --git a/packages/create-app.template.react/templates/package.json.hbs b/packages/create-app.template.react/templates/package.json.hbs new file mode 100644 index 000000000..ce59c80ea --- /dev/null +++ b/packages/create-app.template.react/templates/package.json.hbs @@ -0,0 +1,19 @@ +{ + "name": "{{project}}", + "private": true, + "version": "0.0.0", + "type": "module", + "scripts": { + "dev": "vite", + "build": "tsc && vite build", + "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0", + "preview": "vite preview" + }, + "dependencies": { + "{{osdkPackage}}": "latest" + + }, + "devDependencies": { + + } +} diff --git a/packages/create-app/templates/template-react/public/palantir.svg b/packages/create-app.template.react/templates/public/palantir.svg similarity index 100% rename from packages/create-app/templates/template-react/public/palantir.svg rename to packages/create-app.template.react/templates/public/palantir.svg diff --git a/packages/create-app/templates/template-react/public/react.svg b/packages/create-app.template.react/templates/public/react.svg similarity index 100% rename from packages/create-app/templates/template-react/public/react.svg rename to packages/create-app.template.react/templates/public/react.svg diff --git a/packages/create-app/templates/template-react/src/AuthCallback.tsx b/packages/create-app.template.react/templates/src/AuthCallback.tsx similarity index 100% rename from packages/create-app/templates/template-react/src/AuthCallback.tsx rename to packages/create-app.template.react/templates/src/AuthCallback.tsx diff --git a/packages/create-app/templates/template-react/src/AuthenticatedRoute.tsx b/packages/create-app.template.react/templates/src/AuthenticatedRoute.tsx similarity index 100% rename from packages/create-app/templates/template-react/src/AuthenticatedRoute.tsx rename to packages/create-app.template.react/templates/src/AuthenticatedRoute.tsx diff --git a/packages/create-app/templates/template-react/src/Home.module.css b/packages/create-app.template.react/templates/src/Home.module.css similarity index 100% rename from packages/create-app/templates/template-react/src/Home.module.css rename to packages/create-app.template.react/templates/src/Home.module.css diff --git a/packages/create-app/templates/template-react/src/Home.tsx.hbs b/packages/create-app.template.react/templates/src/Home.tsx.hbs similarity index 100% rename from packages/create-app/templates/template-react/src/Home.tsx.hbs rename to packages/create-app.template.react/templates/src/Home.tsx.hbs diff --git a/packages/create-app/templates/template-react/src/Layout.module.css b/packages/create-app.template.react/templates/src/Layout.module.css similarity index 100% rename from packages/create-app/templates/template-react/src/Layout.module.css rename to packages/create-app.template.react/templates/src/Layout.module.css diff --git a/packages/create-app/templates/template-react/src/Layout.tsx b/packages/create-app.template.react/templates/src/Layout.tsx similarity index 100% rename from packages/create-app/templates/template-react/src/Layout.tsx rename to packages/create-app.template.react/templates/src/Layout.tsx diff --git a/packages/create-app/templates/template-react/src/Login.tsx b/packages/create-app.template.react/templates/src/Login.tsx similarity index 100% rename from packages/create-app/templates/template-react/src/Login.tsx rename to packages/create-app.template.react/templates/src/Login.tsx diff --git a/packages/create-app/templates/template-react/src/client.ts.hbs b/packages/create-app.template.react/templates/src/client.ts.hbs similarity index 100% rename from packages/create-app/templates/template-react/src/client.ts.hbs rename to packages/create-app.template.react/templates/src/client.ts.hbs diff --git a/packages/create-app/templates/template-react/src/index.css b/packages/create-app.template.react/templates/src/index.css similarity index 100% rename from packages/create-app/templates/template-react/src/index.css rename to packages/create-app.template.react/templates/src/index.css diff --git a/packages/create-app/templates/template-react/src/main.tsx b/packages/create-app.template.react/templates/src/main.tsx similarity index 100% rename from packages/create-app/templates/template-react/src/main.tsx rename to packages/create-app.template.react/templates/src/main.tsx diff --git a/packages/create-app/templates/template-react/src/vite-env.d.ts b/packages/create-app.template.react/templates/src/vite-env.d.ts similarity index 100% rename from packages/create-app/templates/template-react/src/vite-env.d.ts rename to packages/create-app.template.react/templates/src/vite-env.d.ts diff --git a/packages/create-app/templates/template-react/tsconfig.json b/packages/create-app.template.react/templates/tsconfig.json similarity index 100% rename from packages/create-app/templates/template-react/tsconfig.json rename to packages/create-app.template.react/templates/tsconfig.json diff --git a/packages/create-app/templates/template-react/tsconfig.node.json b/packages/create-app.template.react/templates/tsconfig.node.json similarity index 100% rename from packages/create-app/templates/template-react/tsconfig.node.json rename to packages/create-app.template.react/templates/tsconfig.node.json diff --git a/packages/create-app/templates/template-react/vite.config.ts.hbs b/packages/create-app.template.react/templates/vite.config.ts.hbs similarity index 100% rename from packages/create-app/templates/template-react/vite.config.ts.hbs rename to packages/create-app.template.react/templates/vite.config.ts.hbs diff --git a/packages/create-app.template.react/tsconfig.json b/packages/create-app.template.react/tsconfig.json new file mode 100644 index 000000000..6c1ec6f17 --- /dev/null +++ b/packages/create-app.template.react/tsconfig.json @@ -0,0 +1,11 @@ +{ + "extends": "@osdk/monorepo.tsconfig/base.json", + "compilerOptions": { + "rootDir": "src", + "outDir": "build/esm" + }, + "include": [ + "./src/**/*" + ], + "references": [] +} diff --git a/packages/create-app.template.react/tsup.config.js b/packages/create-app.template.react/tsup.config.js new file mode 100644 index 000000000..cfc2b707b --- /dev/null +++ b/packages/create-app.template.react/tsup.config.js @@ -0,0 +1,23 @@ +/* + * Copyright 2023 Palantir Technologies, Inc. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { defineConfig } from "tsup"; + +export default defineConfig(async (options) => + (await import("@osdk/monorepo.tsup")).default(options, { + esmOnly: true, + }) +); diff --git a/packages/create-app.template.react/turbo.json b/packages/create-app.template.react/turbo.json new file mode 100644 index 000000000..c3d050e87 --- /dev/null +++ b/packages/create-app.template.react/turbo.json @@ -0,0 +1,11 @@ +{ + // WARNING: GENERATED FILE. DO NOT EDIT DIRECTLY. See .monorepolint.config.mjs + "extends": ["//"], + "tasks": { + "codegen": { + "inputs": ["templates/**/*"], + "outputs": ["src/generatedNoCheck/**/*"], + "dependsOn": ["@osdk/create-app.template-packager#transpile"] + } + } +} diff --git a/packages/create-app.template.tutorial-todo-aip-app/README.md b/packages/create-app.template.tutorial-todo-aip-app/README.md new file mode 100644 index 000000000..12980ae4a --- /dev/null +++ b/packages/create-app.template.tutorial-todo-aip-app/README.md @@ -0,0 +1,7 @@ +# @osdk/create-app.template.tutorial-todo-aip-app + +This package contains templates for `@osdk/create-app`. + +The dependencies will come from this package's `package.json` (excluding `@osdk/create-app.template-packager`) and the rest of template is filled out from the `templates` directory. + +NOTE: DO NOT EDIT THIS README BY HAND. It is generated by monorepolint. diff --git a/packages/create-app.template.tutorial-todo-aip-app/package.json b/packages/create-app.template.tutorial-todo-aip-app/package.json new file mode 100644 index 000000000..29857a143 --- /dev/null +++ b/packages/create-app.template.tutorial-todo-aip-app/package.json @@ -0,0 +1,65 @@ +{ + "name": "@osdk/create-app.template.tutorial-todo-aip-app", + "version": "0.17.0-beta.2", + "license": "Apache-2.0", + "repository": { + "type": "git", + "url": "https://github.com/palantir/osdk-ts.git" + }, + "exports": { + ".": { + "browser": "./build/browser/index.js", + "import": "./build/esm/index.js" + }, + "./*": { + "browser": "./build/browser/public/*.js", + "import": "./build/esm/public/*.js" + } + }, + "scripts": { + "check-attw": "../../scripts/build_common/check-attw.sh esm", + "clean": "rm -rf lib dist types build tsconfig.tsbuildinfo", + "codegen": "create-app.template-packager", + "fix-lint": "eslint . --fix && dprint fmt --config $(find-up dprint.json)", + "lint": "eslint . && dprint check --config $(find-up dprint.json)", + "transpile": "find . \\( -path build/cjs -or -path build/esm -or -path build/browser \\) -type f \\( -name '*.js' -or -name '*.js.map' -or -name '*.cjs' -or -name '*.cjs.map' \\) -delete && tsup", + "typecheck": "find . \\( -path build/cjs -or -path build/esm -or -path build/browser \\) -type f \\( -name '*.ts' -or -name '*.ts.map' -or -name '*.cts' -or -name '*.cts.map' \\) -delete && ../../scripts/build_common/typecheck.sh esm" + }, + "dependencies": { + "react": "^18", + "react-dom": "^18", + "react-router-dom": "^6.23.1", + "swr": "^2.2.5" + }, + "devDependencies": { + "@osdk/create-app.template-packager": "workspace:~", + "@osdk/monorepo.api-extractor": "workspace:~", + "@osdk/monorepo.tsconfig": "workspace:~", + "@osdk/monorepo.tsup": "workspace:~", + "@types/react": "^18", + "@types/react-dom": "^18", + "@typescript-eslint/eslint-plugin": "^7.16.0", + "@typescript-eslint/parser": "^7.16.0", + "@vitejs/plugin-react": "^4.2.0", + "eslint": "^8.57.0", + "eslint-plugin-react-hooks": "^4.6.2", + "eslint-plugin-react-refresh": "^0.4.6", + "typescript": "^5.2.2", + "vite": "^5.2.11" + }, + "publishConfig": { + "access": "public" + }, + "files": [ + "build/cjs", + "build/esm", + "build/browser", + "CHANGELOG.md", + "package.json", + "templates", + "*.d.ts" + ], + "module": "./build/esm/index.js", + "types": "./build/esm/index.d.ts", + "type": "module" +} diff --git a/packages/create-app.template.tutorial-todo-aip-app/src/index.ts b/packages/create-app.template.tutorial-todo-aip-app/src/index.ts new file mode 100644 index 000000000..b0301f174 --- /dev/null +++ b/packages/create-app.template.tutorial-todo-aip-app/src/index.ts @@ -0,0 +1,17 @@ +/* + * Copyright 2024 Palantir Technologies, Inc. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export { files } from "./generatedNoCheck/index.js"; diff --git a/packages/create-app/templates/template-tutorial-todo-aip-app/.eslintrc.cjs b/packages/create-app.template.tutorial-todo-aip-app/templates/.eslintrc.cjs similarity index 100% rename from packages/create-app/templates/template-tutorial-todo-aip-app/.eslintrc.cjs rename to packages/create-app.template.tutorial-todo-aip-app/templates/.eslintrc.cjs diff --git a/packages/create-app/templates/template-tutorial-todo-aip-app/.gitignore b/packages/create-app.template.tutorial-todo-aip-app/templates/.gitignore similarity index 100% rename from packages/create-app/templates/template-tutorial-todo-aip-app/.gitignore rename to packages/create-app.template.tutorial-todo-aip-app/templates/.gitignore diff --git a/packages/create-app/templates/template-tutorial-todo-aip-app/README.md.hbs b/packages/create-app.template.tutorial-todo-aip-app/templates/README.md.hbs similarity index 100% rename from packages/create-app/templates/template-tutorial-todo-aip-app/README.md.hbs rename to packages/create-app.template.tutorial-todo-aip-app/templates/README.md.hbs diff --git a/packages/create-app/templates/template-tutorial-todo-aip-app/index.html b/packages/create-app.template.tutorial-todo-aip-app/templates/index.html similarity index 100% rename from packages/create-app/templates/template-tutorial-todo-aip-app/index.html rename to packages/create-app.template.tutorial-todo-aip-app/templates/index.html diff --git a/packages/create-app.template.tutorial-todo-aip-app/templates/package.json.hbs b/packages/create-app.template.tutorial-todo-aip-app/templates/package.json.hbs new file mode 100644 index 000000000..da50bdd1e --- /dev/null +++ b/packages/create-app.template.tutorial-todo-aip-app/templates/package.json.hbs @@ -0,0 +1,17 @@ +{ + "name": "{{project}}", + "private": true, + "version": "0.0.0", + "type": "module", + "scripts": { + "dev": "vite", + "build": "tsc && vite build", + "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0", + "preview": "vite preview" + }, + "dependencies": { + "{{osdkPackage}}": "latest" + }, + "devDependencies": { + } +} diff --git a/packages/create-app/templates/template-tutorial-todo-aip-app/public/aip-icon.svg b/packages/create-app.template.tutorial-todo-aip-app/templates/public/aip-icon.svg similarity index 100% rename from packages/create-app/templates/template-tutorial-todo-aip-app/public/aip-icon.svg rename to packages/create-app.template.tutorial-todo-aip-app/templates/public/aip-icon.svg diff --git a/packages/create-app/templates/template-tutorial-todo-aip-app/public/todo-aip-app.svg b/packages/create-app.template.tutorial-todo-aip-app/templates/public/todo-aip-app.svg similarity index 100% rename from packages/create-app/templates/template-tutorial-todo-aip-app/public/todo-aip-app.svg rename to packages/create-app.template.tutorial-todo-aip-app/templates/public/todo-aip-app.svg diff --git a/packages/create-app/templates/template-tutorial-todo-aip-app/src/AuthCallback.tsx b/packages/create-app.template.tutorial-todo-aip-app/templates/src/AuthCallback.tsx similarity index 100% rename from packages/create-app/templates/template-tutorial-todo-aip-app/src/AuthCallback.tsx rename to packages/create-app.template.tutorial-todo-aip-app/templates/src/AuthCallback.tsx diff --git a/packages/create-app/templates/template-tutorial-todo-aip-app/src/AuthenticatedRoute.tsx b/packages/create-app.template.tutorial-todo-aip-app/templates/src/AuthenticatedRoute.tsx similarity index 100% rename from packages/create-app/templates/template-tutorial-todo-aip-app/src/AuthenticatedRoute.tsx rename to packages/create-app.template.tutorial-todo-aip-app/templates/src/AuthenticatedRoute.tsx diff --git a/packages/create-app/templates/template-tutorial-todo-aip-app/src/CreateProjectButton.module.css b/packages/create-app.template.tutorial-todo-aip-app/templates/src/CreateProjectButton.module.css similarity index 100% rename from packages/create-app/templates/template-tutorial-todo-aip-app/src/CreateProjectButton.module.css rename to packages/create-app.template.tutorial-todo-aip-app/templates/src/CreateProjectButton.module.css diff --git a/packages/create-app/templates/template-tutorial-todo-aip-app/src/CreateProjectButton.tsx b/packages/create-app.template.tutorial-todo-aip-app/templates/src/CreateProjectButton.tsx similarity index 100% rename from packages/create-app/templates/template-tutorial-todo-aip-app/src/CreateProjectButton.tsx rename to packages/create-app.template.tutorial-todo-aip-app/templates/src/CreateProjectButton.tsx diff --git a/packages/create-app/templates/template-tutorial-todo-aip-app/src/CreateProjectDialog.module.css b/packages/create-app.template.tutorial-todo-aip-app/templates/src/CreateProjectDialog.module.css similarity index 100% rename from packages/create-app/templates/template-tutorial-todo-aip-app/src/CreateProjectDialog.module.css rename to packages/create-app.template.tutorial-todo-aip-app/templates/src/CreateProjectDialog.module.css diff --git a/packages/create-app/templates/template-tutorial-todo-aip-app/src/CreateProjectDialog.tsx b/packages/create-app.template.tutorial-todo-aip-app/templates/src/CreateProjectDialog.tsx similarity index 100% rename from packages/create-app/templates/template-tutorial-todo-aip-app/src/CreateProjectDialog.tsx rename to packages/create-app.template.tutorial-todo-aip-app/templates/src/CreateProjectDialog.tsx diff --git a/packages/create-app/templates/template-tutorial-todo-aip-app/src/CreateTaskButton.module.css b/packages/create-app.template.tutorial-todo-aip-app/templates/src/CreateTaskButton.module.css similarity index 100% rename from packages/create-app/templates/template-tutorial-todo-aip-app/src/CreateTaskButton.module.css rename to packages/create-app.template.tutorial-todo-aip-app/templates/src/CreateTaskButton.module.css diff --git a/packages/create-app/templates/template-tutorial-todo-aip-app/src/CreateTaskButton.tsx b/packages/create-app.template.tutorial-todo-aip-app/templates/src/CreateTaskButton.tsx similarity index 100% rename from packages/create-app/templates/template-tutorial-todo-aip-app/src/CreateTaskButton.tsx rename to packages/create-app.template.tutorial-todo-aip-app/templates/src/CreateTaskButton.tsx diff --git a/packages/create-app/templates/template-tutorial-todo-aip-app/src/CreateTaskDialog.module.css b/packages/create-app.template.tutorial-todo-aip-app/templates/src/CreateTaskDialog.module.css similarity index 100% rename from packages/create-app/templates/template-tutorial-todo-aip-app/src/CreateTaskDialog.module.css rename to packages/create-app.template.tutorial-todo-aip-app/templates/src/CreateTaskDialog.module.css diff --git a/packages/create-app/templates/template-tutorial-todo-aip-app/src/CreateTaskDialog.tsx b/packages/create-app.template.tutorial-todo-aip-app/templates/src/CreateTaskDialog.tsx similarity index 100% rename from packages/create-app/templates/template-tutorial-todo-aip-app/src/CreateTaskDialog.tsx rename to packages/create-app.template.tutorial-todo-aip-app/templates/src/CreateTaskDialog.tsx diff --git a/packages/create-app/templates/template-tutorial-todo-aip-app/src/DeleteProjectButton.module.css b/packages/create-app.template.tutorial-todo-aip-app/templates/src/DeleteProjectButton.module.css similarity index 100% rename from packages/create-app/templates/template-tutorial-todo-aip-app/src/DeleteProjectButton.module.css rename to packages/create-app.template.tutorial-todo-aip-app/templates/src/DeleteProjectButton.module.css diff --git a/packages/create-app/templates/template-tutorial-todo-aip-app/src/DeleteProjectButton.tsx b/packages/create-app.template.tutorial-todo-aip-app/templates/src/DeleteProjectButton.tsx similarity index 100% rename from packages/create-app/templates/template-tutorial-todo-aip-app/src/DeleteProjectButton.tsx rename to packages/create-app.template.tutorial-todo-aip-app/templates/src/DeleteProjectButton.tsx diff --git a/packages/create-app/templates/template-tutorial-todo-aip-app/src/DeleteProjectDialog.module.css b/packages/create-app.template.tutorial-todo-aip-app/templates/src/DeleteProjectDialog.module.css similarity index 100% rename from packages/create-app/templates/template-tutorial-todo-aip-app/src/DeleteProjectDialog.module.css rename to packages/create-app.template.tutorial-todo-aip-app/templates/src/DeleteProjectDialog.module.css diff --git a/packages/create-app/templates/template-tutorial-todo-aip-app/src/DeleteProjectDialog.tsx b/packages/create-app.template.tutorial-todo-aip-app/templates/src/DeleteProjectDialog.tsx similarity index 100% rename from packages/create-app/templates/template-tutorial-todo-aip-app/src/DeleteProjectDialog.tsx rename to packages/create-app.template.tutorial-todo-aip-app/templates/src/DeleteProjectDialog.tsx diff --git a/packages/create-app/templates/template-tutorial-todo-aip-app/src/Dialog.module.css b/packages/create-app.template.tutorial-todo-aip-app/templates/src/Dialog.module.css similarity index 100% rename from packages/create-app/templates/template-tutorial-todo-aip-app/src/Dialog.module.css rename to packages/create-app.template.tutorial-todo-aip-app/templates/src/Dialog.module.css diff --git a/packages/create-app/templates/template-tutorial-todo-aip-app/src/Dialog.tsx b/packages/create-app.template.tutorial-todo-aip-app/templates/src/Dialog.tsx similarity index 100% rename from packages/create-app/templates/template-tutorial-todo-aip-app/src/Dialog.tsx rename to packages/create-app.template.tutorial-todo-aip-app/templates/src/Dialog.tsx diff --git a/packages/create-app/templates/template-tutorial-todo-aip-app/src/Home.module.css b/packages/create-app.template.tutorial-todo-aip-app/templates/src/Home.module.css similarity index 100% rename from packages/create-app/templates/template-tutorial-todo-aip-app/src/Home.module.css rename to packages/create-app.template.tutorial-todo-aip-app/templates/src/Home.module.css diff --git a/packages/create-app/templates/template-tutorial-todo-aip-app/src/Home.tsx b/packages/create-app.template.tutorial-todo-aip-app/templates/src/Home.tsx similarity index 100% rename from packages/create-app/templates/template-tutorial-todo-aip-app/src/Home.tsx rename to packages/create-app.template.tutorial-todo-aip-app/templates/src/Home.tsx diff --git a/packages/create-app/templates/template-tutorial-todo-aip-app/src/Layout.module.css b/packages/create-app.template.tutorial-todo-aip-app/templates/src/Layout.module.css similarity index 100% rename from packages/create-app/templates/template-tutorial-todo-aip-app/src/Layout.module.css rename to packages/create-app.template.tutorial-todo-aip-app/templates/src/Layout.module.css diff --git a/packages/create-app/templates/template-tutorial-todo-aip-app/src/Layout.tsx b/packages/create-app.template.tutorial-todo-aip-app/templates/src/Layout.tsx similarity index 100% rename from packages/create-app/templates/template-tutorial-todo-aip-app/src/Layout.tsx rename to packages/create-app.template.tutorial-todo-aip-app/templates/src/Layout.tsx diff --git a/packages/create-app/templates/template-tutorial-todo-aip-app/src/Login.module.css b/packages/create-app.template.tutorial-todo-aip-app/templates/src/Login.module.css similarity index 100% rename from packages/create-app/templates/template-tutorial-todo-aip-app/src/Login.module.css rename to packages/create-app.template.tutorial-todo-aip-app/templates/src/Login.module.css diff --git a/packages/create-app/templates/template-tutorial-todo-aip-app/src/Login.tsx b/packages/create-app.template.tutorial-todo-aip-app/templates/src/Login.tsx similarity index 100% rename from packages/create-app/templates/template-tutorial-todo-aip-app/src/Login.tsx rename to packages/create-app.template.tutorial-todo-aip-app/templates/src/Login.tsx diff --git a/packages/create-app/templates/template-tutorial-todo-aip-app/src/ProjectDetails.module.css b/packages/create-app.template.tutorial-todo-aip-app/templates/src/ProjectDetails.module.css similarity index 100% rename from packages/create-app/templates/template-tutorial-todo-aip-app/src/ProjectDetails.module.css rename to packages/create-app.template.tutorial-todo-aip-app/templates/src/ProjectDetails.module.css diff --git a/packages/create-app/templates/template-tutorial-todo-aip-app/src/ProjectDetails.tsx b/packages/create-app.template.tutorial-todo-aip-app/templates/src/ProjectDetails.tsx similarity index 100% rename from packages/create-app/templates/template-tutorial-todo-aip-app/src/ProjectDetails.tsx rename to packages/create-app.template.tutorial-todo-aip-app/templates/src/ProjectDetails.tsx diff --git a/packages/create-app/templates/template-tutorial-todo-aip-app/src/ProjectSelect.tsx b/packages/create-app.template.tutorial-todo-aip-app/templates/src/ProjectSelect.tsx similarity index 100% rename from packages/create-app/templates/template-tutorial-todo-aip-app/src/ProjectSelect.tsx rename to packages/create-app.template.tutorial-todo-aip-app/templates/src/ProjectSelect.tsx diff --git a/packages/create-app/templates/template-tutorial-todo-aip-app/src/TaskList.module.css b/packages/create-app.template.tutorial-todo-aip-app/templates/src/TaskList.module.css similarity index 100% rename from packages/create-app/templates/template-tutorial-todo-aip-app/src/TaskList.module.css rename to packages/create-app.template.tutorial-todo-aip-app/templates/src/TaskList.module.css diff --git a/packages/create-app/templates/template-tutorial-todo-aip-app/src/TaskList.tsx b/packages/create-app.template.tutorial-todo-aip-app/templates/src/TaskList.tsx similarity index 100% rename from packages/create-app/templates/template-tutorial-todo-aip-app/src/TaskList.tsx rename to packages/create-app.template.tutorial-todo-aip-app/templates/src/TaskList.tsx diff --git a/packages/create-app/templates/template-tutorial-todo-aip-app/src/TaskListItem.module.css b/packages/create-app.template.tutorial-todo-aip-app/templates/src/TaskListItem.module.css similarity index 100% rename from packages/create-app/templates/template-tutorial-todo-aip-app/src/TaskListItem.module.css rename to packages/create-app.template.tutorial-todo-aip-app/templates/src/TaskListItem.module.css diff --git a/packages/create-app/templates/template-tutorial-todo-aip-app/src/TaskListItem.tsx b/packages/create-app.template.tutorial-todo-aip-app/templates/src/TaskListItem.tsx similarity index 100% rename from packages/create-app/templates/template-tutorial-todo-aip-app/src/TaskListItem.tsx rename to packages/create-app.template.tutorial-todo-aip-app/templates/src/TaskListItem.tsx diff --git a/packages/create-app/templates/template-tutorial-todo-aip-app/src/client.ts.hbs b/packages/create-app.template.tutorial-todo-aip-app/templates/src/client.ts.hbs similarity index 100% rename from packages/create-app/templates/template-tutorial-todo-aip-app/src/client.ts.hbs rename to packages/create-app.template.tutorial-todo-aip-app/templates/src/client.ts.hbs diff --git a/packages/create-app/templates/template-tutorial-todo-aip-app/src/index.css b/packages/create-app.template.tutorial-todo-aip-app/templates/src/index.css similarity index 100% rename from packages/create-app/templates/template-tutorial-todo-aip-app/src/index.css rename to packages/create-app.template.tutorial-todo-aip-app/templates/src/index.css diff --git a/packages/create-app/templates/template-tutorial-todo-aip-app/src/main.tsx b/packages/create-app.template.tutorial-todo-aip-app/templates/src/main.tsx similarity index 100% rename from packages/create-app/templates/template-tutorial-todo-aip-app/src/main.tsx rename to packages/create-app.template.tutorial-todo-aip-app/templates/src/main.tsx diff --git a/packages/create-app/templates/template-tutorial-todo-aip-app/src/mocks.ts b/packages/create-app.template.tutorial-todo-aip-app/templates/src/mocks.ts similarity index 100% rename from packages/create-app/templates/template-tutorial-todo-aip-app/src/mocks.ts rename to packages/create-app.template.tutorial-todo-aip-app/templates/src/mocks.ts diff --git a/packages/create-app/templates/template-tutorial-todo-aip-app/src/useProjectTasks.ts b/packages/create-app.template.tutorial-todo-aip-app/templates/src/useProjectTasks.ts similarity index 100% rename from packages/create-app/templates/template-tutorial-todo-aip-app/src/useProjectTasks.ts rename to packages/create-app.template.tutorial-todo-aip-app/templates/src/useProjectTasks.ts diff --git a/packages/create-app/templates/template-tutorial-todo-aip-app/src/useProjects.ts b/packages/create-app.template.tutorial-todo-aip-app/templates/src/useProjects.ts similarity index 100% rename from packages/create-app/templates/template-tutorial-todo-aip-app/src/useProjects.ts rename to packages/create-app.template.tutorial-todo-aip-app/templates/src/useProjects.ts diff --git a/packages/create-app/templates/template-tutorial-todo-aip-app/src/vite-env.d.ts b/packages/create-app.template.tutorial-todo-aip-app/templates/src/vite-env.d.ts similarity index 100% rename from packages/create-app/templates/template-tutorial-todo-aip-app/src/vite-env.d.ts rename to packages/create-app.template.tutorial-todo-aip-app/templates/src/vite-env.d.ts diff --git a/packages/create-app/templates/template-tutorial-todo-aip-app/tsconfig.json b/packages/create-app.template.tutorial-todo-aip-app/templates/tsconfig.json similarity index 100% rename from packages/create-app/templates/template-tutorial-todo-aip-app/tsconfig.json rename to packages/create-app.template.tutorial-todo-aip-app/templates/tsconfig.json diff --git a/packages/create-app/templates/template-tutorial-todo-aip-app/tsconfig.node.json b/packages/create-app.template.tutorial-todo-aip-app/templates/tsconfig.node.json similarity index 100% rename from packages/create-app/templates/template-tutorial-todo-aip-app/tsconfig.node.json rename to packages/create-app.template.tutorial-todo-aip-app/templates/tsconfig.node.json diff --git a/packages/create-app/templates/template-tutorial-todo-aip-app/vite.config.ts.hbs b/packages/create-app.template.tutorial-todo-aip-app/templates/vite.config.ts.hbs similarity index 100% rename from packages/create-app/templates/template-tutorial-todo-aip-app/vite.config.ts.hbs rename to packages/create-app.template.tutorial-todo-aip-app/templates/vite.config.ts.hbs diff --git a/packages/create-app.template.tutorial-todo-aip-app/tsconfig.json b/packages/create-app.template.tutorial-todo-aip-app/tsconfig.json new file mode 100644 index 000000000..6c1ec6f17 --- /dev/null +++ b/packages/create-app.template.tutorial-todo-aip-app/tsconfig.json @@ -0,0 +1,11 @@ +{ + "extends": "@osdk/monorepo.tsconfig/base.json", + "compilerOptions": { + "rootDir": "src", + "outDir": "build/esm" + }, + "include": [ + "./src/**/*" + ], + "references": [] +} diff --git a/packages/create-app.template.tutorial-todo-aip-app/tsup.config.js b/packages/create-app.template.tutorial-todo-aip-app/tsup.config.js new file mode 100644 index 000000000..cfc2b707b --- /dev/null +++ b/packages/create-app.template.tutorial-todo-aip-app/tsup.config.js @@ -0,0 +1,23 @@ +/* + * Copyright 2023 Palantir Technologies, Inc. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { defineConfig } from "tsup"; + +export default defineConfig(async (options) => + (await import("@osdk/monorepo.tsup")).default(options, { + esmOnly: true, + }) +); diff --git a/packages/create-app.template.tutorial-todo-aip-app/turbo.json b/packages/create-app.template.tutorial-todo-aip-app/turbo.json new file mode 100644 index 000000000..c3d050e87 --- /dev/null +++ b/packages/create-app.template.tutorial-todo-aip-app/turbo.json @@ -0,0 +1,11 @@ +{ + // WARNING: GENERATED FILE. DO NOT EDIT DIRECTLY. See .monorepolint.config.mjs + "extends": ["//"], + "tasks": { + "codegen": { + "inputs": ["templates/**/*"], + "outputs": ["src/generatedNoCheck/**/*"], + "dependsOn": ["@osdk/create-app.template-packager#transpile"] + } + } +} diff --git a/packages/create-app.template.tutorial-todo-app/README.md b/packages/create-app.template.tutorial-todo-app/README.md new file mode 100644 index 000000000..cd4b23c32 --- /dev/null +++ b/packages/create-app.template.tutorial-todo-app/README.md @@ -0,0 +1,7 @@ +# @osdk/create-app.template.tutorial-todo-app + +This package contains templates for `@osdk/create-app`. + +The dependencies will come from this package's `package.json` (excluding `@osdk/create-app.template-packager`) and the rest of template is filled out from the `templates` directory. + +NOTE: DO NOT EDIT THIS README BY HAND. It is generated by monorepolint. diff --git a/packages/create-app.template.tutorial-todo-app/package.json b/packages/create-app.template.tutorial-todo-app/package.json new file mode 100644 index 000000000..bd19754e8 --- /dev/null +++ b/packages/create-app.template.tutorial-todo-app/package.json @@ -0,0 +1,65 @@ +{ + "name": "@osdk/create-app.template.tutorial-todo-app", + "version": "0.17.0-beta.2", + "license": "Apache-2.0", + "repository": { + "type": "git", + "url": "https://github.com/palantir/osdk-ts.git" + }, + "exports": { + ".": { + "browser": "./build/browser/index.js", + "import": "./build/esm/index.js" + }, + "./*": { + "browser": "./build/browser/public/*.js", + "import": "./build/esm/public/*.js" + } + }, + "scripts": { + "check-attw": "../../scripts/build_common/check-attw.sh esm", + "clean": "rm -rf lib dist types build tsconfig.tsbuildinfo", + "codegen": "create-app.template-packager", + "fix-lint": "eslint . --fix && dprint fmt --config $(find-up dprint.json)", + "lint": "eslint . && dprint check --config $(find-up dprint.json)", + "transpile": "find . \\( -path build/cjs -or -path build/esm -or -path build/browser \\) -type f \\( -name '*.js' -or -name '*.js.map' -or -name '*.cjs' -or -name '*.cjs.map' \\) -delete && tsup", + "typecheck": "find . \\( -path build/cjs -or -path build/esm -or -path build/browser \\) -type f \\( -name '*.ts' -or -name '*.ts.map' -or -name '*.cts' -or -name '*.cts.map' \\) -delete && ../../scripts/build_common/typecheck.sh esm" + }, + "dependencies": { + "react": "^18", + "react-dom": "^18", + "react-router-dom": "^6.23.1", + "swr": "^2.2.5" + }, + "devDependencies": { + "@osdk/create-app.template-packager": "workspace:~", + "@osdk/monorepo.api-extractor": "workspace:~", + "@osdk/monorepo.tsconfig": "workspace:~", + "@osdk/monorepo.tsup": "workspace:~", + "@types/react": "^18", + "@types/react-dom": "^18", + "@typescript-eslint/eslint-plugin": "^7.16.0", + "@typescript-eslint/parser": "^7.16.0", + "@vitejs/plugin-react": "^4.2.0", + "eslint": "^8.57.0", + "eslint-plugin-react-hooks": "^4.6.2", + "eslint-plugin-react-refresh": "^0.4.6", + "typescript": "^5.2.2", + "vite": "^5.2.11" + }, + "publishConfig": { + "access": "public" + }, + "files": [ + "build/cjs", + "build/esm", + "build/browser", + "CHANGELOG.md", + "package.json", + "templates", + "*.d.ts" + ], + "module": "./build/esm/index.js", + "types": "./build/esm/index.d.ts", + "type": "module" +} diff --git a/packages/create-app.template.tutorial-todo-app/src/index.ts b/packages/create-app.template.tutorial-todo-app/src/index.ts new file mode 100644 index 000000000..b0301f174 --- /dev/null +++ b/packages/create-app.template.tutorial-todo-app/src/index.ts @@ -0,0 +1,17 @@ +/* + * Copyright 2024 Palantir Technologies, Inc. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export { files } from "./generatedNoCheck/index.js"; diff --git a/packages/create-app/templates/template-tutorial-todo-app/.eslintrc.cjs b/packages/create-app.template.tutorial-todo-app/templates/.eslintrc.cjs similarity index 100% rename from packages/create-app/templates/template-tutorial-todo-app/.eslintrc.cjs rename to packages/create-app.template.tutorial-todo-app/templates/.eslintrc.cjs diff --git a/packages/create-app/templates/template-tutorial-todo-app/.gitignore b/packages/create-app.template.tutorial-todo-app/templates/.gitignore similarity index 100% rename from packages/create-app/templates/template-tutorial-todo-app/.gitignore rename to packages/create-app.template.tutorial-todo-app/templates/.gitignore diff --git a/packages/create-app/templates/template-tutorial-todo-app/README.md.hbs b/packages/create-app.template.tutorial-todo-app/templates/README.md.hbs similarity index 100% rename from packages/create-app/templates/template-tutorial-todo-app/README.md.hbs rename to packages/create-app.template.tutorial-todo-app/templates/README.md.hbs diff --git a/packages/create-app/templates/template-tutorial-todo-app/index.html b/packages/create-app.template.tutorial-todo-app/templates/index.html similarity index 100% rename from packages/create-app/templates/template-tutorial-todo-app/index.html rename to packages/create-app.template.tutorial-todo-app/templates/index.html diff --git a/packages/create-app.template.tutorial-todo-app/templates/package.json.hbs b/packages/create-app.template.tutorial-todo-app/templates/package.json.hbs new file mode 100644 index 000000000..da50bdd1e --- /dev/null +++ b/packages/create-app.template.tutorial-todo-app/templates/package.json.hbs @@ -0,0 +1,17 @@ +{ + "name": "{{project}}", + "private": true, + "version": "0.0.0", + "type": "module", + "scripts": { + "dev": "vite", + "build": "tsc && vite build", + "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0", + "preview": "vite preview" + }, + "dependencies": { + "{{osdkPackage}}": "latest" + }, + "devDependencies": { + } +} diff --git a/packages/create-app/templates/template-tutorial-todo-app/public/todo-app.svg b/packages/create-app.template.tutorial-todo-app/templates/public/todo-app.svg similarity index 100% rename from packages/create-app/templates/template-tutorial-todo-app/public/todo-app.svg rename to packages/create-app.template.tutorial-todo-app/templates/public/todo-app.svg diff --git a/packages/create-app/templates/template-tutorial-todo-app/src/AuthCallback.tsx b/packages/create-app.template.tutorial-todo-app/templates/src/AuthCallback.tsx similarity index 100% rename from packages/create-app/templates/template-tutorial-todo-app/src/AuthCallback.tsx rename to packages/create-app.template.tutorial-todo-app/templates/src/AuthCallback.tsx diff --git a/packages/create-app/templates/template-tutorial-todo-app/src/AuthenticatedRoute.tsx b/packages/create-app.template.tutorial-todo-app/templates/src/AuthenticatedRoute.tsx similarity index 100% rename from packages/create-app/templates/template-tutorial-todo-app/src/AuthenticatedRoute.tsx rename to packages/create-app.template.tutorial-todo-app/templates/src/AuthenticatedRoute.tsx diff --git a/packages/create-app/templates/template-tutorial-todo-app/src/CreateProjectButton.tsx b/packages/create-app.template.tutorial-todo-app/templates/src/CreateProjectButton.tsx similarity index 100% rename from packages/create-app/templates/template-tutorial-todo-app/src/CreateProjectButton.tsx rename to packages/create-app.template.tutorial-todo-app/templates/src/CreateProjectButton.tsx diff --git a/packages/create-app/templates/template-tutorial-todo-app/src/CreateProjectDialog.tsx b/packages/create-app.template.tutorial-todo-app/templates/src/CreateProjectDialog.tsx similarity index 100% rename from packages/create-app/templates/template-tutorial-todo-app/src/CreateProjectDialog.tsx rename to packages/create-app.template.tutorial-todo-app/templates/src/CreateProjectDialog.tsx diff --git a/packages/create-app/templates/template-tutorial-todo-app/src/CreateTaskButton.tsx b/packages/create-app.template.tutorial-todo-app/templates/src/CreateTaskButton.tsx similarity index 100% rename from packages/create-app/templates/template-tutorial-todo-app/src/CreateTaskButton.tsx rename to packages/create-app.template.tutorial-todo-app/templates/src/CreateTaskButton.tsx diff --git a/packages/create-app/templates/template-tutorial-todo-app/src/CreateTaskDialog.tsx b/packages/create-app.template.tutorial-todo-app/templates/src/CreateTaskDialog.tsx similarity index 100% rename from packages/create-app/templates/template-tutorial-todo-app/src/CreateTaskDialog.tsx rename to packages/create-app.template.tutorial-todo-app/templates/src/CreateTaskDialog.tsx diff --git a/packages/create-app/templates/template-tutorial-todo-app/src/DeleteProjectButton.tsx b/packages/create-app.template.tutorial-todo-app/templates/src/DeleteProjectButton.tsx similarity index 100% rename from packages/create-app/templates/template-tutorial-todo-app/src/DeleteProjectButton.tsx rename to packages/create-app.template.tutorial-todo-app/templates/src/DeleteProjectButton.tsx diff --git a/packages/create-app/templates/template-tutorial-todo-app/src/DeleteProjectDialog.tsx b/packages/create-app.template.tutorial-todo-app/templates/src/DeleteProjectDialog.tsx similarity index 100% rename from packages/create-app/templates/template-tutorial-todo-app/src/DeleteProjectDialog.tsx rename to packages/create-app.template.tutorial-todo-app/templates/src/DeleteProjectDialog.tsx diff --git a/packages/create-app/templates/template-tutorial-todo-app/src/Dialog.module.css b/packages/create-app.template.tutorial-todo-app/templates/src/Dialog.module.css similarity index 100% rename from packages/create-app/templates/template-tutorial-todo-app/src/Dialog.module.css rename to packages/create-app.template.tutorial-todo-app/templates/src/Dialog.module.css diff --git a/packages/create-app/templates/template-tutorial-todo-app/src/Dialog.tsx b/packages/create-app.template.tutorial-todo-app/templates/src/Dialog.tsx similarity index 100% rename from packages/create-app/templates/template-tutorial-todo-app/src/Dialog.tsx rename to packages/create-app.template.tutorial-todo-app/templates/src/Dialog.tsx diff --git a/packages/create-app/templates/template-tutorial-todo-app/src/Home.module.css b/packages/create-app.template.tutorial-todo-app/templates/src/Home.module.css similarity index 100% rename from packages/create-app/templates/template-tutorial-todo-app/src/Home.module.css rename to packages/create-app.template.tutorial-todo-app/templates/src/Home.module.css diff --git a/packages/create-app/templates/template-tutorial-todo-app/src/Home.tsx b/packages/create-app.template.tutorial-todo-app/templates/src/Home.tsx similarity index 100% rename from packages/create-app/templates/template-tutorial-todo-app/src/Home.tsx rename to packages/create-app.template.tutorial-todo-app/templates/src/Home.tsx diff --git a/packages/create-app/templates/template-tutorial-todo-app/src/Layout.module.css b/packages/create-app.template.tutorial-todo-app/templates/src/Layout.module.css similarity index 100% rename from packages/create-app/templates/template-tutorial-todo-app/src/Layout.module.css rename to packages/create-app.template.tutorial-todo-app/templates/src/Layout.module.css diff --git a/packages/create-app/templates/template-tutorial-todo-app/src/Layout.tsx b/packages/create-app.template.tutorial-todo-app/templates/src/Layout.tsx similarity index 100% rename from packages/create-app/templates/template-tutorial-todo-app/src/Layout.tsx rename to packages/create-app.template.tutorial-todo-app/templates/src/Layout.tsx diff --git a/packages/create-app/templates/template-tutorial-todo-app/src/Login.module.css b/packages/create-app.template.tutorial-todo-app/templates/src/Login.module.css similarity index 100% rename from packages/create-app/templates/template-tutorial-todo-app/src/Login.module.css rename to packages/create-app.template.tutorial-todo-app/templates/src/Login.module.css diff --git a/packages/create-app/templates/template-tutorial-todo-app/src/Login.tsx b/packages/create-app.template.tutorial-todo-app/templates/src/Login.tsx similarity index 100% rename from packages/create-app/templates/template-tutorial-todo-app/src/Login.tsx rename to packages/create-app.template.tutorial-todo-app/templates/src/Login.tsx diff --git a/packages/create-app/templates/template-tutorial-todo-app/src/ProjectSelect.tsx b/packages/create-app.template.tutorial-todo-app/templates/src/ProjectSelect.tsx similarity index 100% rename from packages/create-app/templates/template-tutorial-todo-app/src/ProjectSelect.tsx rename to packages/create-app.template.tutorial-todo-app/templates/src/ProjectSelect.tsx diff --git a/packages/create-app/templates/template-tutorial-todo-app/src/TaskList.module.css b/packages/create-app.template.tutorial-todo-app/templates/src/TaskList.module.css similarity index 100% rename from packages/create-app/templates/template-tutorial-todo-app/src/TaskList.module.css rename to packages/create-app.template.tutorial-todo-app/templates/src/TaskList.module.css diff --git a/packages/create-app/templates/template-tutorial-todo-app/src/TaskList.tsx b/packages/create-app.template.tutorial-todo-app/templates/src/TaskList.tsx similarity index 100% rename from packages/create-app/templates/template-tutorial-todo-app/src/TaskList.tsx rename to packages/create-app.template.tutorial-todo-app/templates/src/TaskList.tsx diff --git a/packages/create-app/templates/template-tutorial-todo-app/src/TaskListItem.module.css b/packages/create-app.template.tutorial-todo-app/templates/src/TaskListItem.module.css similarity index 100% rename from packages/create-app/templates/template-tutorial-todo-app/src/TaskListItem.module.css rename to packages/create-app.template.tutorial-todo-app/templates/src/TaskListItem.module.css diff --git a/packages/create-app/templates/template-tutorial-todo-app/src/TaskListItem.tsx b/packages/create-app.template.tutorial-todo-app/templates/src/TaskListItem.tsx similarity index 100% rename from packages/create-app/templates/template-tutorial-todo-app/src/TaskListItem.tsx rename to packages/create-app.template.tutorial-todo-app/templates/src/TaskListItem.tsx diff --git a/packages/create-app/templates/template-tutorial-todo-app/src/client.ts.hbs b/packages/create-app.template.tutorial-todo-app/templates/src/client.ts.hbs similarity index 100% rename from packages/create-app/templates/template-tutorial-todo-app/src/client.ts.hbs rename to packages/create-app.template.tutorial-todo-app/templates/src/client.ts.hbs diff --git a/packages/create-app/templates/template-tutorial-todo-app/src/index.css b/packages/create-app.template.tutorial-todo-app/templates/src/index.css similarity index 100% rename from packages/create-app/templates/template-tutorial-todo-app/src/index.css rename to packages/create-app.template.tutorial-todo-app/templates/src/index.css diff --git a/packages/create-app/templates/template-tutorial-todo-app/src/main.tsx b/packages/create-app.template.tutorial-todo-app/templates/src/main.tsx similarity index 100% rename from packages/create-app/templates/template-tutorial-todo-app/src/main.tsx rename to packages/create-app.template.tutorial-todo-app/templates/src/main.tsx diff --git a/packages/create-app/templates/template-tutorial-todo-app/src/mocks.ts b/packages/create-app.template.tutorial-todo-app/templates/src/mocks.ts similarity index 100% rename from packages/create-app/templates/template-tutorial-todo-app/src/mocks.ts rename to packages/create-app.template.tutorial-todo-app/templates/src/mocks.ts diff --git a/packages/create-app/templates/template-tutorial-todo-app/src/useProjectTasks.ts b/packages/create-app.template.tutorial-todo-app/templates/src/useProjectTasks.ts similarity index 100% rename from packages/create-app/templates/template-tutorial-todo-app/src/useProjectTasks.ts rename to packages/create-app.template.tutorial-todo-app/templates/src/useProjectTasks.ts diff --git a/packages/create-app/templates/template-tutorial-todo-app/src/useProjects.ts b/packages/create-app.template.tutorial-todo-app/templates/src/useProjects.ts similarity index 100% rename from packages/create-app/templates/template-tutorial-todo-app/src/useProjects.ts rename to packages/create-app.template.tutorial-todo-app/templates/src/useProjects.ts diff --git a/packages/create-app/templates/template-tutorial-todo-app/src/vite-env.d.ts b/packages/create-app.template.tutorial-todo-app/templates/src/vite-env.d.ts similarity index 100% rename from packages/create-app/templates/template-tutorial-todo-app/src/vite-env.d.ts rename to packages/create-app.template.tutorial-todo-app/templates/src/vite-env.d.ts diff --git a/packages/create-app/templates/template-tutorial-todo-app/tsconfig.json b/packages/create-app.template.tutorial-todo-app/templates/tsconfig.json similarity index 100% rename from packages/create-app/templates/template-tutorial-todo-app/tsconfig.json rename to packages/create-app.template.tutorial-todo-app/templates/tsconfig.json diff --git a/packages/create-app/templates/template-tutorial-todo-app/tsconfig.node.json b/packages/create-app.template.tutorial-todo-app/templates/tsconfig.node.json similarity index 100% rename from packages/create-app/templates/template-tutorial-todo-app/tsconfig.node.json rename to packages/create-app.template.tutorial-todo-app/templates/tsconfig.node.json diff --git a/packages/create-app/templates/template-tutorial-todo-app/vite.config.ts.hbs b/packages/create-app.template.tutorial-todo-app/templates/vite.config.ts.hbs similarity index 100% rename from packages/create-app/templates/template-tutorial-todo-app/vite.config.ts.hbs rename to packages/create-app.template.tutorial-todo-app/templates/vite.config.ts.hbs diff --git a/packages/create-app.template.tutorial-todo-app/tsconfig.json b/packages/create-app.template.tutorial-todo-app/tsconfig.json new file mode 100644 index 000000000..6c1ec6f17 --- /dev/null +++ b/packages/create-app.template.tutorial-todo-app/tsconfig.json @@ -0,0 +1,11 @@ +{ + "extends": "@osdk/monorepo.tsconfig/base.json", + "compilerOptions": { + "rootDir": "src", + "outDir": "build/esm" + }, + "include": [ + "./src/**/*" + ], + "references": [] +} diff --git a/packages/create-app.template.tutorial-todo-app/tsup.config.js b/packages/create-app.template.tutorial-todo-app/tsup.config.js new file mode 100644 index 000000000..cfc2b707b --- /dev/null +++ b/packages/create-app.template.tutorial-todo-app/tsup.config.js @@ -0,0 +1,23 @@ +/* + * Copyright 2023 Palantir Technologies, Inc. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { defineConfig } from "tsup"; + +export default defineConfig(async (options) => + (await import("@osdk/monorepo.tsup")).default(options, { + esmOnly: true, + }) +); diff --git a/packages/create-app.template.tutorial-todo-app/turbo.json b/packages/create-app.template.tutorial-todo-app/turbo.json new file mode 100644 index 000000000..c3d050e87 --- /dev/null +++ b/packages/create-app.template.tutorial-todo-app/turbo.json @@ -0,0 +1,11 @@ +{ + // WARNING: GENERATED FILE. DO NOT EDIT DIRECTLY. See .monorepolint.config.mjs + "extends": ["//"], + "tasks": { + "codegen": { + "inputs": ["templates/**/*"], + "outputs": ["src/generatedNoCheck/**/*"], + "dependsOn": ["@osdk/create-app.template-packager#transpile"] + } + } +} diff --git a/packages/create-app.template.vue/README.md b/packages/create-app.template.vue/README.md new file mode 100644 index 000000000..ac679c61c --- /dev/null +++ b/packages/create-app.template.vue/README.md @@ -0,0 +1,7 @@ +# @osdk/create-app.template.vue + +This package contains templates for `@osdk/create-app`. + +The dependencies will come from this package's `package.json` (excluding `@osdk/create-app.template-packager`) and the rest of template is filled out from the `templates` directory. + +NOTE: DO NOT EDIT THIS README BY HAND. It is generated by monorepolint. diff --git a/packages/create-app.template.vue/package.json b/packages/create-app.template.vue/package.json new file mode 100644 index 000000000..8a5ec8024 --- /dev/null +++ b/packages/create-app.template.vue/package.json @@ -0,0 +1,57 @@ +{ + "name": "@osdk/create-app.template.vue", + "version": "0.17.0-beta.2", + "license": "Apache-2.0", + "repository": { + "type": "git", + "url": "https://github.com/palantir/osdk-ts.git" + }, + "exports": { + ".": { + "browser": "./build/browser/index.js", + "import": "./build/esm/index.js" + }, + "./*": { + "browser": "./build/browser/public/*.js", + "import": "./build/esm/public/*.js" + } + }, + "scripts": { + "check-attw": "../../scripts/build_common/check-attw.sh esm", + "clean": "rm -rf lib dist types build tsconfig.tsbuildinfo", + "codegen": "create-app.template-packager", + "fix-lint": "eslint . --fix && dprint fmt --config $(find-up dprint.json)", + "lint": "eslint . && dprint check --config $(find-up dprint.json)", + "transpile": "find . \\( -path build/cjs -or -path build/esm -or -path build/browser \\) -type f \\( -name '*.js' -or -name '*.js.map' -or -name '*.cjs' -or -name '*.cjs.map' \\) -delete && tsup", + "typecheck": "find . \\( -path build/cjs -or -path build/esm -or -path build/browser \\) -type f \\( -name '*.ts' -or -name '*.ts.map' -or -name '*.cts' -or -name '*.cts.map' \\) -delete && ../../scripts/build_common/typecheck.sh esm" + }, + "dependencies": { + "vue": "^3.4.27", + "vue-router": "^4.2.5" + }, + "devDependencies": { + "@osdk/create-app.template-packager": "workspace:~", + "@osdk/monorepo.api-extractor": "workspace:~", + "@osdk/monorepo.tsconfig": "workspace:~", + "@osdk/monorepo.tsup": "workspace:~", + "@vitejs/plugin-vue": "^4.5.0", + "typescript": "^5.2.2", + "vite": "^5.2.11", + "vue-tsc": "^1.8.22" + }, + "publishConfig": { + "access": "public" + }, + "files": [ + "build/cjs", + "build/esm", + "build/browser", + "CHANGELOG.md", + "package.json", + "templates", + "*.d.ts" + ], + "module": "./build/esm/index.js", + "types": "./build/esm/index.d.ts", + "type": "module" +} diff --git a/packages/create-app.template.vue/src/index.ts b/packages/create-app.template.vue/src/index.ts new file mode 100644 index 000000000..b0301f174 --- /dev/null +++ b/packages/create-app.template.vue/src/index.ts @@ -0,0 +1,17 @@ +/* + * Copyright 2024 Palantir Technologies, Inc. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export { files } from "./generatedNoCheck/index.js"; diff --git a/packages/create-app/templates/template-vue/.vscode/extensions.json b/packages/create-app.template.vue/templates/.vscode/extensions.json similarity index 100% rename from packages/create-app/templates/template-vue/.vscode/extensions.json rename to packages/create-app.template.vue/templates/.vscode/extensions.json diff --git a/packages/create-app/templates/template-vue/README.md.hbs b/packages/create-app.template.vue/templates/README.md.hbs similarity index 100% rename from packages/create-app/templates/template-vue/README.md.hbs rename to packages/create-app.template.vue/templates/README.md.hbs diff --git a/packages/create-app/templates/template-vue/_gitignore b/packages/create-app.template.vue/templates/_gitignore similarity index 100% rename from packages/create-app/templates/template-vue/_gitignore rename to packages/create-app.template.vue/templates/_gitignore diff --git a/packages/create-app/templates/template-vue/index.html b/packages/create-app.template.vue/templates/index.html similarity index 100% rename from packages/create-app/templates/template-vue/index.html rename to packages/create-app.template.vue/templates/index.html diff --git a/packages/create-app/templates/template-vue/package.json.hbs b/packages/create-app.template.vue/templates/package.json.hbs similarity index 56% rename from packages/create-app/templates/template-vue/package.json.hbs rename to packages/create-app.template.vue/templates/package.json.hbs index d0443e07c..2dc49c2d7 100644 --- a/packages/create-app/templates/template-vue/package.json.hbs +++ b/packages/create-app.template.vue/templates/package.json.hbs @@ -9,14 +9,8 @@ "preview": "vite preview" }, "dependencies": { - "{{osdkPackage}}": "latest", - "vue": "^3.4.27", - "vue-router": "^4.2.5" + "{{osdkPackage}}": "latest" }, "devDependencies": { - "@vitejs/plugin-vue": "^4.5.0", - "typescript": "^5.2.2", - "vite": "^5.2.11", - "vue-tsc": "^1.8.22" } } diff --git a/packages/create-app/templates/template-vue/public/palantir.svg b/packages/create-app.template.vue/templates/public/palantir.svg similarity index 100% rename from packages/create-app/templates/template-vue/public/palantir.svg rename to packages/create-app.template.vue/templates/public/palantir.svg diff --git a/packages/create-app/templates/template-vue/public/vue.svg b/packages/create-app.template.vue/templates/public/vue.svg similarity index 100% rename from packages/create-app/templates/template-vue/public/vue.svg rename to packages/create-app.template.vue/templates/public/vue.svg diff --git a/packages/create-app/templates/template-vue/src/AuthCallback.vue b/packages/create-app.template.vue/templates/src/AuthCallback.vue similarity index 100% rename from packages/create-app/templates/template-vue/src/AuthCallback.vue rename to packages/create-app.template.vue/templates/src/AuthCallback.vue diff --git a/packages/create-app/templates/template-vue/src/Home.vue.hbs b/packages/create-app.template.vue/templates/src/Home.vue.hbs similarity index 100% rename from packages/create-app/templates/template-vue/src/Home.vue.hbs rename to packages/create-app.template.vue/templates/src/Home.vue.hbs diff --git a/packages/create-app/templates/template-vue/src/Layout.vue b/packages/create-app.template.vue/templates/src/Layout.vue similarity index 100% rename from packages/create-app/templates/template-vue/src/Layout.vue rename to packages/create-app.template.vue/templates/src/Layout.vue diff --git a/packages/create-app/templates/template-vue/src/Login.vue b/packages/create-app.template.vue/templates/src/Login.vue similarity index 100% rename from packages/create-app/templates/template-vue/src/Login.vue rename to packages/create-app.template.vue/templates/src/Login.vue diff --git a/packages/create-app/templates/template-vue/src/client.ts.hbs b/packages/create-app.template.vue/templates/src/client.ts.hbs similarity index 100% rename from packages/create-app/templates/template-vue/src/client.ts.hbs rename to packages/create-app.template.vue/templates/src/client.ts.hbs diff --git a/packages/create-app/templates/template-vue/src/main.ts b/packages/create-app.template.vue/templates/src/main.ts similarity index 100% rename from packages/create-app/templates/template-vue/src/main.ts rename to packages/create-app.template.vue/templates/src/main.ts diff --git a/packages/create-app/templates/template-vue/src/style.css b/packages/create-app.template.vue/templates/src/style.css similarity index 100% rename from packages/create-app/templates/template-vue/src/style.css rename to packages/create-app.template.vue/templates/src/style.css diff --git a/packages/create-app/templates/template-vue/src/vite-env.d.ts b/packages/create-app.template.vue/templates/src/vite-env.d.ts similarity index 100% rename from packages/create-app/templates/template-vue/src/vite-env.d.ts rename to packages/create-app.template.vue/templates/src/vite-env.d.ts diff --git a/packages/create-app/templates/template-vue/tsconfig.json b/packages/create-app.template.vue/templates/tsconfig.json similarity index 100% rename from packages/create-app/templates/template-vue/tsconfig.json rename to packages/create-app.template.vue/templates/tsconfig.json diff --git a/packages/create-app/templates/template-vue/tsconfig.node.json b/packages/create-app.template.vue/templates/tsconfig.node.json similarity index 100% rename from packages/create-app/templates/template-vue/tsconfig.node.json rename to packages/create-app.template.vue/templates/tsconfig.node.json diff --git a/packages/create-app/templates/template-vue/vite.config.ts.hbs b/packages/create-app.template.vue/templates/vite.config.ts.hbs similarity index 100% rename from packages/create-app/templates/template-vue/vite.config.ts.hbs rename to packages/create-app.template.vue/templates/vite.config.ts.hbs diff --git a/packages/create-app.template.vue/tsconfig.json b/packages/create-app.template.vue/tsconfig.json new file mode 100644 index 000000000..6c1ec6f17 --- /dev/null +++ b/packages/create-app.template.vue/tsconfig.json @@ -0,0 +1,11 @@ +{ + "extends": "@osdk/monorepo.tsconfig/base.json", + "compilerOptions": { + "rootDir": "src", + "outDir": "build/esm" + }, + "include": [ + "./src/**/*" + ], + "references": [] +} diff --git a/packages/create-app.template.vue/tsup.config.js b/packages/create-app.template.vue/tsup.config.js new file mode 100644 index 000000000..cfc2b707b --- /dev/null +++ b/packages/create-app.template.vue/tsup.config.js @@ -0,0 +1,23 @@ +/* + * Copyright 2023 Palantir Technologies, Inc. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { defineConfig } from "tsup"; + +export default defineConfig(async (options) => + (await import("@osdk/monorepo.tsup")).default(options, { + esmOnly: true, + }) +); diff --git a/packages/create-app.template.vue/turbo.json b/packages/create-app.template.vue/turbo.json new file mode 100644 index 000000000..c3d050e87 --- /dev/null +++ b/packages/create-app.template.vue/turbo.json @@ -0,0 +1,11 @@ +{ + // WARNING: GENERATED FILE. DO NOT EDIT DIRECTLY. See .monorepolint.config.mjs + "extends": ["//"], + "tasks": { + "codegen": { + "inputs": ["templates/**/*"], + "outputs": ["src/generatedNoCheck/**/*"], + "dependsOn": ["@osdk/create-app.template-packager#transpile"] + } + } +} diff --git a/packages/create-app/package.json b/packages/create-app/package.json index b3eaf2873..25f6744de 100644 --- a/packages/create-app/package.json +++ b/packages/create-app/package.json @@ -30,6 +30,11 @@ "typecheck": "find . \\( -path build/cjs -or -path build/esm -or -path build/browser \\) -type f \\( -name '*.ts' -or -name '*.ts.map' -or -name '*.cts' -or -name '*.cts.map' \\) -delete && ../../scripts/build_common/typecheck.sh esm" }, "dependencies": { + "@osdk/create-app.template.next-static-export": "workspace:*", + "@osdk/create-app.template.react": "workspace:*", + "@osdk/create-app.template.tutorial-todo-aip-app": "workspace:*", + "@osdk/create-app.template.tutorial-todo-app": "workspace:*", + "@osdk/create-app.template.vue": "workspace:*", "consola": "^3.2.3", "find-up": "^7.0.0", "handlebars": "^4.7.8", diff --git a/packages/create-app/src/run.ts b/packages/create-app/src/run.ts index f947dbb2e..96d01fd47 100644 --- a/packages/create-app/src/run.ts +++ b/packages/create-app/src/run.ts @@ -79,16 +79,25 @@ export async function run( consola.info(`Copying files into project directory`); - const templatesDir = findUpSync("templates", { - cwd: path.dirname(fileURLToPath(import.meta.url)), - type: "directory", - }); - if (templatesDir == null) { - throw new Error(`Could not find templates directory`); - } - const templateDir = path.resolve(templatesDir, template.id); + const files: Map< + string, + { type: "base64"; body: string } | { type: "raw"; body: string } + > = (await import( + `@osdk/create-app.template.${template.id.replace(/^template-/, "")}` + )).files; - fs.cpSync(templateDir, root, { recursive: true }); + for (const [filePath, contents] of files) { + const finalPath = path.join(root, filePath); + const dirPath = path.dirname(finalPath); + await fs.promises.mkdir(dirPath, { recursive: true }); + await fs.promises.writeFile( + finalPath, + Buffer.from( + contents.body, + contents.type === "raw" ? "utf-8" : "base64", + ), + ); + } const templateContext: TemplateContext = { project, diff --git a/packages/create-app/templates/template-next-static-export/package.json.hbs b/packages/create-app/templates/template-next-static-export/package.json.hbs deleted file mode 100644 index 8ccab07ae..000000000 --- a/packages/create-app/templates/template-next-static-export/package.json.hbs +++ /dev/null @@ -1,25 +0,0 @@ -{ - "name": "{{project}}", - "private": true, - "version": "0.0.0", - "scripts": { - "dev": "next dev -p 8080", - "build": "next build", - "start": "next start", - "lint": "next lint" - }, - "dependencies": { - "{{osdkPackage}}": "latest", - "react": "^18", - "react-dom": "^18", - "next": "14.2.3" - }, - "devDependencies": { - "@types/node": "^20", - "@types/react": "^18", - "@types/react-dom": "^18", - "eslint": "^8.57.0", - "eslint-config-next": "^14.2.3", - "typescript": "^5" - } -} diff --git a/packages/create-app/templates/template-react/package.json.hbs b/packages/create-app/templates/template-react/package.json.hbs deleted file mode 100644 index 48ff248b6..000000000 --- a/packages/create-app/templates/template-react/package.json.hbs +++ /dev/null @@ -1,30 +0,0 @@ -{ - "name": "{{project}}", - "private": true, - "version": "0.0.0", - "type": "module", - "scripts": { - "dev": "vite", - "build": "tsc && vite build", - "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0", - "preview": "vite preview" - }, - "dependencies": { - "{{osdkPackage}}": "latest", - "react": "^18", - "react-dom": "^18", - "react-router-dom": "^6.23.1" - }, - "devDependencies": { - "@types/react": "^18", - "@types/react-dom": "^18", - "@typescript-eslint/eslint-plugin": "^7.16.0", - "@typescript-eslint/parser": "^7.16.0", - "@vitejs/plugin-react": "^4.2.0", - "eslint": "^8.57.0", - "eslint-plugin-react-hooks": "^4.6.2", - "eslint-plugin-react-refresh": "^0.4.6", - "typescript": "^5.2.2", - "vite": "^5.2.11" - } -} diff --git a/packages/create-app/templates/template-tutorial-todo-aip-app/package.json.hbs b/packages/create-app/templates/template-tutorial-todo-aip-app/package.json.hbs deleted file mode 100644 index 26f2d0d78..000000000 --- a/packages/create-app/templates/template-tutorial-todo-aip-app/package.json.hbs +++ /dev/null @@ -1,31 +0,0 @@ -{ - "name": "{{project}}", - "private": true, - "version": "0.0.0", - "type": "module", - "scripts": { - "dev": "vite", - "build": "tsc && vite build", - "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0", - "preview": "vite preview" - }, - "dependencies": { - "{{osdkPackage}}": "latest", - "react": "^18", - "react-dom": "^18", - "react-router-dom": "^6.23.1", - "swr": "^2.2.5" - }, - "devDependencies": { - "@types/react": "^18", - "@types/react-dom": "^18", - "@typescript-eslint/eslint-plugin": "^7.16.0", - "@typescript-eslint/parser": "^7.16.0", - "@vitejs/plugin-react": "^4.2.0", - "eslint": "^8.57.0", - "eslint-plugin-react-hooks": "^4.6.2", - "eslint-plugin-react-refresh": "^0.4.6", - "typescript": "^5.2.2", - "vite": "^5.2.11" - } -} diff --git a/packages/create-app/templates/template-tutorial-todo-app/package.json.hbs b/packages/create-app/templates/template-tutorial-todo-app/package.json.hbs deleted file mode 100644 index 26f2d0d78..000000000 --- a/packages/create-app/templates/template-tutorial-todo-app/package.json.hbs +++ /dev/null @@ -1,31 +0,0 @@ -{ - "name": "{{project}}", - "private": true, - "version": "0.0.0", - "type": "module", - "scripts": { - "dev": "vite", - "build": "tsc && vite build", - "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0", - "preview": "vite preview" - }, - "dependencies": { - "{{osdkPackage}}": "latest", - "react": "^18", - "react-dom": "^18", - "react-router-dom": "^6.23.1", - "swr": "^2.2.5" - }, - "devDependencies": { - "@types/react": "^18", - "@types/react-dom": "^18", - "@typescript-eslint/eslint-plugin": "^7.16.0", - "@typescript-eslint/parser": "^7.16.0", - "@vitejs/plugin-react": "^4.2.0", - "eslint": "^8.57.0", - "eslint-plugin-react-hooks": "^4.6.2", - "eslint-plugin-react-refresh": "^0.4.6", - "typescript": "^5.2.2", - "vite": "^5.2.11" - } -} diff --git a/packages/example-generator/package.json b/packages/example-generator/package.json index 072f28d0b..fafd91955 100644 --- a/packages/example-generator/package.json +++ b/packages/example-generator/package.json @@ -33,6 +33,7 @@ "dir-compare": "^5.0.0", "find-up": "^7.0.0", "globby": "^14.0.1", + "jest-diff": "^29.7.0", "tmp": "^0.2.3", "yargs": "^17.7.2" }, diff --git a/packages/example-generator/src/run.ts b/packages/example-generator/src/run.ts index f58a8ceb9..219b7c4d6 100644 --- a/packages/example-generator/src/run.ts +++ b/packages/example-generator/src/run.ts @@ -20,6 +20,7 @@ import { consola } from "consola"; import { compareSync } from "dir-compare"; import { findUp } from "find-up"; import { globby } from "globby"; +import * as jestDiff from "jest-diff"; import { exec } from "node:child_process"; import fs from "node:fs"; import path from "node:path"; @@ -141,12 +142,49 @@ async function checkExamples( `Found ${compareResult.differences} differences in ${exampleId} please generate examples again.`, ); consola.error(compareResult.diffSet?.filter(d => d.state !== "equal")); + + for (const q of compareResult.diffSet ?? []) { + if (q.state !== "equal") { + const aPath = q.path1 && q.name1 + ? q.path1 + q.relativePath + q.name1 + : null; + const bPath = q.path2 && q.name2 + ? q.path2 + q.relativePath + q.name2 + : null; + + const aContents = getContents(aPath); + const bContents = getContents(bPath); + + if (aContents || bContents) { + consola.error("Contents differ"); + consola.error( + jestDiff.diff(aContents, bContents, { + aAnnotation: aPath ?? undefined, + bAnnotation: bPath ?? undefined, + contextLines: 3, + }), + ); + } + } + } + process.exit(1); } consola.success(`Contents equal`); } } +function getContents(aPath: string | null) { + return aPath?.endsWith(".json") + ? JSON.parse( + fs.readFileSync(aPath, "utf-8"), + ) + : aPath?.endsWith(".ts") || aPath?.endsWith(".tsx") + || aPath?.endsWith(".js") || aPath?.endsWith(".jsx") + ? fs.readFileSync(aPath, "utf-8") + : null; +} + async function copyExamples( resolvedOutput: string, tmpDir: tmp.DirResult, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 69a3fdc2f..45b94af97 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -993,6 +993,21 @@ importers: packages/create-app: dependencies: + '@osdk/create-app.template.next-static-export': + specifier: workspace:* + version: link:../create-app.template.next-static-export + '@osdk/create-app.template.react': + specifier: workspace:* + version: link:../create-app.template.react + '@osdk/create-app.template.tutorial-todo-aip-app': + specifier: workspace:* + version: link:../create-app.template.tutorial-todo-aip-app + '@osdk/create-app.template.tutorial-todo-app': + specifier: workspace:* + version: link:../create-app.template.tutorial-todo-app + '@osdk/create-app.template.vue': + specifier: workspace:* + version: link:../create-app.template.vue consola: specifier: ^3.2.3 version: 3.2.3 @@ -1031,6 +1046,240 @@ importers: specifier: ^5.5.2 version: 5.5.2 + packages/create-app.template-packager: + dependencies: + consola: + specifier: ^3.2.3 + version: 3.2.3 + find-up: + specifier: ^7.0.0 + version: 7.0.0 + serialize-javascript: + specifier: ^6.0.2 + version: 6.0.2 + devDependencies: + '@types/node': + specifier: ^18.0.0 + version: 18.17.15 + '@types/serialize-javascript': + specifier: ^5.0.4 + version: 5.0.4 + '@types/tmp': + specifier: ^0.2.6 + version: 0.2.6 + '@types/yargs': + specifier: ^17.0.29 + version: 17.0.32 + tmp: + specifier: ^0.2.3 + version: 0.2.3 + typescript: + specifier: ^5.5.2 + version: 5.5.3 + + packages/create-app.template.next-static-export: + dependencies: + next: + specifier: 14.2.3 + version: 14.2.3(@babel/core@7.24.5)(react-dom@18.3.1)(react@18.3.1) + react: + specifier: ^18 + version: 18.3.1 + react-dom: + specifier: ^18 + version: 18.3.1(react@18.3.1) + devDependencies: + '@osdk/create-app.template-packager': + specifier: workspace:~ + version: link:../create-app.template-packager + '@types/node': + specifier: ^20 + version: 20.14.10 + '@types/react': + specifier: ^18 + version: 18.3.2 + '@types/react-dom': + specifier: ^18 + version: 18.3.0 + eslint: + specifier: ^8.57.0 + version: 8.57.0 + eslint-config-next: + specifier: ^14.2.3 + version: 14.2.3(eslint@8.57.0)(typescript@5.5.3) + typescript: + specifier: ^5 + version: 5.5.3 + + packages/create-app.template.react: + dependencies: + react: + specifier: ^18 + version: 18.3.1 + react-dom: + specifier: ^18 + version: 18.3.1(react@18.3.1) + react-router-dom: + specifier: ^6.23.1 + version: 6.23.1(react-dom@18.3.1)(react@18.3.1) + devDependencies: + '@osdk/create-app.template-packager': + specifier: workspace:~ + version: link:../create-app.template-packager + '@types/react': + specifier: ^18 + version: 18.3.2 + '@types/react-dom': + specifier: ^18 + version: 18.3.0 + '@typescript-eslint/eslint-plugin': + specifier: ^7.16.0 + version: 7.16.0(@typescript-eslint/parser@7.16.0)(eslint@8.57.0)(typescript@5.5.3) + '@typescript-eslint/parser': + specifier: ^7.16.0 + version: 7.16.0(eslint@8.57.0)(typescript@5.5.3) + '@vitejs/plugin-react': + specifier: ^4.2.0 + version: 4.2.1(vite@5.2.11) + eslint: + specifier: ^8.57.0 + version: 8.57.0 + eslint-plugin-react-hooks: + specifier: ^4.6.2 + version: 4.6.2(eslint@8.57.0) + eslint-plugin-react-refresh: + specifier: ^0.4.6 + version: 0.4.7(eslint@8.57.0) + typescript: + specifier: ^5.2.2 + version: 5.5.3 + vite: + specifier: ^5.2.11 + version: 5.2.11(@types/node@20.12.12) + + packages/create-app.template.tutorial-todo-aip-app: + dependencies: + react: + specifier: ^18 + version: 18.3.1 + react-dom: + specifier: ^18 + version: 18.3.1(react@18.3.1) + react-router-dom: + specifier: ^6.23.1 + version: 6.23.1(react-dom@18.3.1)(react@18.3.1) + swr: + specifier: ^2.2.5 + version: 2.2.5(react@18.3.1) + devDependencies: + '@osdk/create-app.template-packager': + specifier: workspace:~ + version: link:../create-app.template-packager + '@types/react': + specifier: ^18 + version: 18.3.2 + '@types/react-dom': + specifier: ^18 + version: 18.3.0 + '@typescript-eslint/eslint-plugin': + specifier: ^7.16.0 + version: 7.16.0(@typescript-eslint/parser@7.16.0)(eslint@8.57.0)(typescript@5.5.3) + '@typescript-eslint/parser': + specifier: ^7.16.0 + version: 7.16.0(eslint@8.57.0)(typescript@5.5.3) + '@vitejs/plugin-react': + specifier: ^4.2.0 + version: 4.2.1(vite@5.2.11) + eslint: + specifier: ^8.57.0 + version: 8.57.0 + eslint-plugin-react-hooks: + specifier: ^4.6.2 + version: 4.6.2(eslint@8.57.0) + eslint-plugin-react-refresh: + specifier: ^0.4.6 + version: 0.4.7(eslint@8.57.0) + typescript: + specifier: ^5.2.2 + version: 5.5.3 + vite: + specifier: ^5.2.11 + version: 5.2.11(@types/node@20.12.12) + + packages/create-app.template.tutorial-todo-app: + dependencies: + react: + specifier: ^18 + version: 18.3.1 + react-dom: + specifier: ^18 + version: 18.3.1(react@18.3.1) + react-router-dom: + specifier: ^6.23.1 + version: 6.23.1(react-dom@18.3.1)(react@18.3.1) + swr: + specifier: ^2.2.5 + version: 2.2.5(react@18.3.1) + devDependencies: + '@osdk/create-app.template-packager': + specifier: workspace:~ + version: link:../create-app.template-packager + '@types/react': + specifier: ^18 + version: 18.3.2 + '@types/react-dom': + specifier: ^18 + version: 18.3.0 + '@typescript-eslint/eslint-plugin': + specifier: ^7.16.0 + version: 7.16.0(@typescript-eslint/parser@7.16.0)(eslint@8.57.0)(typescript@5.5.3) + '@typescript-eslint/parser': + specifier: ^7.16.0 + version: 7.16.0(eslint@8.57.0)(typescript@5.5.3) + '@vitejs/plugin-react': + specifier: ^4.2.0 + version: 4.2.1(vite@5.2.11) + eslint: + specifier: ^8.57.0 + version: 8.57.0 + eslint-plugin-react-hooks: + specifier: ^4.6.2 + version: 4.6.2(eslint@8.57.0) + eslint-plugin-react-refresh: + specifier: ^0.4.6 + version: 0.4.7(eslint@8.57.0) + typescript: + specifier: ^5.2.2 + version: 5.5.3 + vite: + specifier: ^5.2.11 + version: 5.2.11(@types/node@20.12.12) + + packages/create-app.template.vue: + dependencies: + vue: + specifier: ^3.4.27 + version: 3.4.27(typescript@5.5.3) + vue-router: + specifier: ^4.2.5 + version: 4.3.2(vue@3.4.27) + devDependencies: + '@osdk/create-app.template-packager': + specifier: workspace:~ + version: link:../create-app.template-packager + '@vitejs/plugin-vue': + specifier: ^4.5.0 + version: 4.6.2(vite@5.2.11)(vue@3.4.27) + typescript: + specifier: ^5.2.2 + version: 5.5.3 + vite: + specifier: ^5.2.11 + version: 5.2.11(@types/node@20.12.12) + vue-tsc: + specifier: ^1.8.22 + version: 1.8.27(typescript@5.5.3) + packages/example-generator: dependencies: '@osdk/create-app': @@ -1048,6 +1297,9 @@ importers: globby: specifier: ^14.0.1 version: 14.0.1 + jest-diff: + specifier: ^29.7.0 + version: 29.7.0 tmp: specifier: ^0.2.3 version: 0.2.3 @@ -3253,7 +3505,7 @@ packages: '@inquirer/figures': 1.0.1 '@inquirer/type': 1.3.1 '@types/mute-stream': 0.0.4 - '@types/node': 20.12.12 + '@types/node': 20.14.10 '@types/wrap-ansi': 3.0.0 ansi-escapes: 4.3.2 chalk: 4.1.2 @@ -3288,7 +3540,6 @@ packages: engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: '@sinclair/typebox': 0.27.8 - dev: true /@jridgewell/gen-mapping@0.3.5: resolution: {integrity: sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==} @@ -4165,7 +4416,6 @@ packages: /@sinclair/typebox@0.27.8: resolution: {integrity: sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==} - dev: true /@sindresorhus/is@4.6.0: resolution: {integrity: sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw==} @@ -4301,7 +4551,7 @@ packages: /@types/mute-stream@0.0.4: resolution: {integrity: sha512-CPM9nzrCPPJHQNA9keH9CVkVI+WR5kMa+7XEs5jcGQ0VoAGnLv242w8lIVgwAEfmE4oufJRaTc9PNLQl0ioAow==} dependencies: - '@types/node': 20.12.12 + '@types/node': 20.14.10 /@types/ngeohash@0.6.8: resolution: {integrity: sha512-A90x3HMwE1yXbWCnd0ztHzv8rAQPjwTzX2diYI/6OrWm/3oairDaehw5WPWJFgZ+8+J/OuF99IbipmMa2le6tQ==} @@ -4318,6 +4568,7 @@ packages: resolution: {integrity: sha512-eWLDGF/FOSPtAvEqeRAQ4C8LSA7M1I7i0ky1I8U7kD1J5ITyW3AsRhQrKVoWf5pFKZ2kILsEGJhsI9r93PYnOw==} dependencies: undici-types: 5.26.5 + dev: true /@types/node@20.14.10: resolution: {integrity: sha512-MdiXf+nDuMvY0gJKxyfZ7/6UFsETO7mGKF54MVD/ekJS6HdFtpZFBgrh6Pseu64XTb2MLyFPlbW6hj8HYRQNOQ==} @@ -4352,7 +4603,7 @@ packages: /@types/readdir-glob@1.1.3: resolution: {integrity: sha512-trCChHpWDGCJCUPJRwD62eapW4KOru6h4S7n9KUIESaxhyBM/2Jh20P3XrFRQQ6Df78E/rq2DbUCVZlI8CXPnA==} dependencies: - '@types/node': 20.12.12 + '@types/node': 20.14.10 dev: true /@types/resolve@1.20.2: @@ -4363,6 +4614,10 @@ packages: resolution: {integrity: sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ==} dev: true + /@types/serialize-javascript@5.0.4: + resolution: {integrity: sha512-Z2R7UKFuNWCP8eoa2o9e5rkD3hmWxx/1L0CYz0k2BZzGh0PhEVMp9kfGiqEml/0IglwNERXZ2hwNzIrSz/KHTA==} + dev: true + /@types/statuses@2.0.5: resolution: {integrity: sha512-jmIUGWrAiwu3dZpxntxieC+1n/5c3mjrImkmOSQ2NC5uP6cYO4aAZDdSmRcI5C1oiTmqlZGHC+/NmJrKogbP5A==} @@ -4419,6 +4674,33 @@ packages: - supports-color dev: true + /@typescript-eslint/eslint-plugin@7.16.0(@typescript-eslint/parser@7.16.0)(eslint@8.57.0)(typescript@5.5.3): + resolution: {integrity: sha512-py1miT6iQpJcs1BiJjm54AMzeuMPBSPuKPlnT8HlfudbcS5rYeX5jajpLf3mrdRh9dA/Ec2FVUY0ifeVNDIhZw==} + engines: {node: ^18.18.0 || >=20.0.0} + peerDependencies: + '@typescript-eslint/parser': ^7.0.0 + eslint: ^8.56.0 + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@eslint-community/regexpp': 4.10.0 + '@typescript-eslint/parser': 7.16.0(eslint@8.57.0)(typescript@5.5.3) + '@typescript-eslint/scope-manager': 7.16.0 + '@typescript-eslint/type-utils': 7.16.0(eslint@8.57.0)(typescript@5.5.3) + '@typescript-eslint/utils': 7.16.0(eslint@8.57.0)(typescript@5.5.3) + '@typescript-eslint/visitor-keys': 7.16.0 + eslint: 8.57.0 + graphemer: 1.4.0 + ignore: 5.3.1 + natural-compare: 1.4.0 + ts-api-utils: 1.3.0(typescript@5.5.3) + typescript: 5.5.3 + transitivePeerDependencies: + - supports-color + dev: true + /@typescript-eslint/eslint-plugin@7.16.0(@typescript-eslint/parser@7.16.0)(eslint@9.3.0)(typescript@5.5.3): resolution: {integrity: sha512-py1miT6iQpJcs1BiJjm54AMzeuMPBSPuKPlnT8HlfudbcS5rYeX5jajpLf3mrdRh9dA/Ec2FVUY0ifeVNDIhZw==} engines: {node: ^18.18.0 || >=20.0.0} @@ -4467,6 +4749,27 @@ packages: - supports-color dev: true + /@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.5.3): + resolution: {integrity: sha512-tbsV1jPne5CkFQCgPBcDOt30ItF7aJoZL997JSF7MhGQqOeT3svWRYxiqlfA5RUdlHN6Fi+EI9bxqbdyAUZjYQ==} + engines: {node: ^16.0.0 || >=18.0.0} + peerDependencies: + eslint: ^7.0.0 || ^8.0.0 + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@typescript-eslint/scope-manager': 6.21.0 + '@typescript-eslint/types': 6.21.0 + '@typescript-eslint/typescript-estree': 6.21.0(typescript@5.5.3) + '@typescript-eslint/visitor-keys': 6.21.0 + debug: 4.3.4 + eslint: 8.57.0 + typescript: 5.5.3 + transitivePeerDependencies: + - supports-color + dev: true + /@typescript-eslint/parser@7.16.0(eslint@8.57.0)(typescript@5.4.5): resolution: {integrity: sha512-ar9E+k7CU8rWi2e5ErzQiC93KKEFAXA2Kky0scAlPcxYblLt8+XZuHUZwlyfXILyQa95P6lQg+eZgh/dDs3+Vw==} engines: {node: ^18.18.0 || >=20.0.0} @@ -4488,6 +4791,27 @@ packages: - supports-color dev: true + /@typescript-eslint/parser@7.16.0(eslint@8.57.0)(typescript@5.5.3): + resolution: {integrity: sha512-ar9E+k7CU8rWi2e5ErzQiC93KKEFAXA2Kky0scAlPcxYblLt8+XZuHUZwlyfXILyQa95P6lQg+eZgh/dDs3+Vw==} + engines: {node: ^18.18.0 || >=20.0.0} + peerDependencies: + eslint: ^8.56.0 + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@typescript-eslint/scope-manager': 7.16.0 + '@typescript-eslint/types': 7.16.0 + '@typescript-eslint/typescript-estree': 7.16.0(typescript@5.5.3) + '@typescript-eslint/visitor-keys': 7.16.0 + debug: 4.3.4 + eslint: 8.57.0 + typescript: 5.5.3 + transitivePeerDependencies: + - supports-color + dev: true + /@typescript-eslint/parser@7.16.0(eslint@9.3.0)(typescript@5.5.3): resolution: {integrity: sha512-ar9E+k7CU8rWi2e5ErzQiC93KKEFAXA2Kky0scAlPcxYblLt8+XZuHUZwlyfXILyQa95P6lQg+eZgh/dDs3+Vw==} engines: {node: ^18.18.0 || >=20.0.0} @@ -4545,6 +4869,26 @@ packages: - supports-color dev: true + /@typescript-eslint/type-utils@7.16.0(eslint@8.57.0)(typescript@5.5.3): + resolution: {integrity: sha512-j0fuUswUjDHfqV/UdW6mLtOQQseORqfdmoBNDFOqs9rvNVR2e+cmu6zJu/Ku4SDuqiJko6YnhwcL8x45r8Oqxg==} + engines: {node: ^18.18.0 || >=20.0.0} + peerDependencies: + eslint: ^8.56.0 + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@typescript-eslint/typescript-estree': 7.16.0(typescript@5.5.3) + '@typescript-eslint/utils': 7.16.0(eslint@8.57.0)(typescript@5.5.3) + debug: 4.3.4 + eslint: 8.57.0 + ts-api-utils: 1.3.0(typescript@5.5.3) + typescript: 5.5.3 + transitivePeerDependencies: + - supports-color + dev: true + /@typescript-eslint/type-utils@7.16.0(eslint@9.3.0)(typescript@5.5.3): resolution: {integrity: sha512-j0fuUswUjDHfqV/UdW6mLtOQQseORqfdmoBNDFOqs9rvNVR2e+cmu6zJu/Ku4SDuqiJko6YnhwcL8x45r8Oqxg==} engines: {node: ^18.18.0 || >=20.0.0} @@ -4597,6 +4941,28 @@ packages: - supports-color dev: true + /@typescript-eslint/typescript-estree@6.21.0(typescript@5.5.3): + resolution: {integrity: sha512-6npJTkZcO+y2/kr+z0hc4HwNfrrP4kNYh57ek7yCNlrBjWQ1Y0OS7jiZTkgumrvkX5HkEKXFZkkdFNkaW2wmUQ==} + engines: {node: ^16.0.0 || >=18.0.0} + peerDependencies: + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@typescript-eslint/types': 6.21.0 + '@typescript-eslint/visitor-keys': 6.21.0 + debug: 4.3.4 + globby: 11.1.0 + is-glob: 4.0.3 + minimatch: 9.0.3 + semver: 7.6.2 + ts-api-utils: 1.3.0(typescript@5.5.3) + typescript: 5.5.3 + transitivePeerDependencies: + - supports-color + dev: true + /@typescript-eslint/typescript-estree@7.16.0(typescript@5.4.5): resolution: {integrity: sha512-a5NTvk51ZndFuOLCh5OaJBELYc2O3Zqxfl3Js78VFE1zE46J2AaVuW+rEbVkQznjkmlzWsUI15BG5tQMixzZLw==} engines: {node: ^18.18.0 || >=20.0.0} @@ -4657,6 +5023,22 @@ packages: - typescript dev: true + /@typescript-eslint/utils@7.16.0(eslint@8.57.0)(typescript@5.5.3): + resolution: {integrity: sha512-PqP4kP3hb4r7Jav+NiRCntlVzhxBNWq6ZQ+zQwII1y/G/1gdIPeYDCKr2+dH6049yJQsWZiHU6RlwvIFBXXGNA==} + engines: {node: ^18.18.0 || >=20.0.0} + peerDependencies: + eslint: ^8.56.0 + dependencies: + '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) + '@typescript-eslint/scope-manager': 7.16.0 + '@typescript-eslint/types': 7.16.0 + '@typescript-eslint/typescript-estree': 7.16.0(typescript@5.5.3) + eslint: 8.57.0 + transitivePeerDependencies: + - supports-color + - typescript + dev: true + /@typescript-eslint/utils@7.16.0(eslint@9.3.0)(typescript@5.5.3): resolution: {integrity: sha512-PqP4kP3hb4r7Jav+NiRCntlVzhxBNWq6ZQ+zQwII1y/G/1gdIPeYDCKr2+dH6049yJQsWZiHU6RlwvIFBXXGNA==} engines: {node: ^18.18.0 || >=20.0.0} @@ -4836,6 +5218,26 @@ packages: vue-template-compiler: 2.7.16 dev: true + /@vue/language-core@1.8.27(typescript@5.5.3): + resolution: {integrity: sha512-L8Kc27VdQserNaCUNiSFdDl9LWT24ly8Hpwf1ECy3aFb9m6bDhBGQYOujDm21N7EW3moKIOKEanQwe1q5BK+mA==} + peerDependencies: + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@volar/language-core': 1.11.1 + '@volar/source-map': 1.11.1 + '@vue/compiler-dom': 3.4.27 + '@vue/shared': 3.4.27 + computeds: 0.0.1 + minimatch: 9.0.4 + muggle-string: 0.3.1 + path-browserify: 1.0.1 + typescript: 5.5.3 + vue-template-compiler: 2.7.16 + dev: true + /@vue/reactivity@3.4.27: resolution: {integrity: sha512-kK0g4NknW6JX2yySLpsm2jlunZJl2/RJGZ0H9ddHdfBVHcNzxmQ0sS0b09ipmBoQpY8JM2KmUw+a6sO8Zo+zIA==} dependencies: @@ -4985,7 +5387,6 @@ packages: /ansi-styles@5.2.0: resolution: {integrity: sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==} engines: {node: '>=10'} - dev: true /ansi-styles@6.2.1: resolution: {integrity: sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==} @@ -5849,7 +6250,6 @@ packages: /diff-sequences@29.6.3: resolution: {integrity: sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dev: true /diff@4.0.2: resolution: {integrity: sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==} @@ -6177,6 +6577,31 @@ packages: - supports-color dev: true + /eslint-config-next@14.2.3(eslint@8.57.0)(typescript@5.5.3): + resolution: {integrity: sha512-ZkNztm3Q7hjqvB1rRlOX8P9E/cXRL9ajRcs8jufEtwMfTVYRqnmtnaSu57QqHyBlovMuiB8LEzfLBkh5RYV6Fg==} + peerDependencies: + eslint: ^7.23.0 || ^8.0.0 + typescript: '>=3.3.1' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@next/eslint-plugin-next': 14.2.3 + '@rushstack/eslint-patch': 1.10.3 + '@typescript-eslint/parser': 6.21.0(eslint@8.57.0)(typescript@5.5.3) + eslint: 8.57.0 + eslint-import-resolver-node: 0.3.9 + eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@6.21.0)(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1)(eslint@8.57.0) + eslint-plugin-import: 2.29.1(@typescript-eslint/parser@7.16.0)(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0) + eslint-plugin-jsx-a11y: 6.8.0(eslint@8.57.0) + eslint-plugin-react: 7.34.1(eslint@8.57.0) + eslint-plugin-react-hooks: 4.6.2(eslint@8.57.0) + typescript: 5.5.3 + transitivePeerDependencies: + - eslint-import-resolver-webpack + - supports-color + dev: true + /eslint-import-resolver-node@0.3.9: resolution: {integrity: sha512-WFj2isz22JahUv+B788TlO3N6zL3nNJGU8CcZbPZvVEkBPaJdCV4vy5wyghty5ROFbCRnm132v8BScu5/1BQ8g==} dependencies: @@ -7677,7 +8102,6 @@ packages: diff-sequences: 29.6.3 jest-get-type: 29.6.3 pretty-format: 29.7.0 - dev: true /jest-extended@4.0.2: resolution: {integrity: sha512-FH7aaPgtGYHc9mRjriS0ZEHYM5/W69tLrFTIdzm+yJgeoCmmrSB/luSfMSqWP9O29QWHPEmJ4qmU6EwsZideog==} @@ -7695,7 +8119,6 @@ packages: /jest-get-type@29.6.3: resolution: {integrity: sha512-zrteXnqYxfQh7l5FHyL38jL39di8H8rHoecLH3JNxH3BwOrBsNeabdap5e0I23lD4HHI8W5VFBZqG4Eaq5LNcw==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dev: true /jiti@1.21.0: resolution: {integrity: sha512-gFqAIbuKyyso/3G2qhiO2OM6shY6EPP/R0+mkDbyspxKazh8BXDC5FiFsUjlczgdNz/vfra0da2y+aHrusLG/Q==} @@ -8940,7 +9363,6 @@ packages: '@jest/schemas': 29.6.3 ansi-styles: 5.2.0 react-is: 18.2.0 - dev: true /pretty-ms@9.0.0: resolution: {integrity: sha512-E9e9HJ9R9NasGOgPaPE8VMeiPKAyWR5jcFpNnwIejslIhWqdqOrb2wShBsncMPUb+BcCd2OPYfh7p2W6oemTng==} @@ -9004,6 +9426,12 @@ packages: engines: {node: '>=8'} dev: true + /randombytes@2.1.0: + resolution: {integrity: sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==} + dependencies: + safe-buffer: 5.2.1 + dev: false + /rc@1.2.8: resolution: {integrity: sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==} hasBin: true @@ -9030,7 +9458,6 @@ packages: /react-is@18.2.0: resolution: {integrity: sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==} - dev: true /react-refresh@0.14.0: resolution: {integrity: sha512-wViHqhAd8OHeLS/IRMJjTSDHF3U9eWi62F/MledQGPdJGDhodXJ9PBLNGr6WWL7qlH12Mt3TyTpbS+hGXMjCzQ==} @@ -9454,6 +9881,12 @@ packages: engines: {node: '>=10'} hasBin: true + /serialize-javascript@6.0.2: + resolution: {integrity: sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==} + dependencies: + randombytes: 2.1.0 + dev: false + /set-blocking@2.0.0: resolution: {integrity: sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==} dev: true @@ -10983,6 +11416,18 @@ packages: typescript: 5.4.5 dev: true + /vue-tsc@1.8.27(typescript@5.5.3): + resolution: {integrity: sha512-WesKCAZCRAbmmhuGl3+VrdWItEvfoFIPXOvUJkjULi+x+6G/Dy69yO3TBRJDr9eUlmsNAwVmxsNZxvHKzbkKdg==} + hasBin: true + peerDependencies: + typescript: '*' + dependencies: + '@volar/typescript': 1.11.1 + '@vue/language-core': 1.8.27(typescript@5.5.3) + semver: 7.6.2 + typescript: 5.5.3 + dev: true + /vue@3.4.27(typescript@5.4.5): resolution: {integrity: sha512-8s/56uK6r01r1icG/aEOHqyMVxd1bkYcSe9j8HcKtr/xTOFWvnzIVTehNW+5Yt89f+DLBe4A569pnZLS5HzAMA==} peerDependencies: @@ -10998,6 +11443,22 @@ packages: '@vue/shared': 3.4.27 typescript: 5.4.5 + /vue@3.4.27(typescript@5.5.3): + resolution: {integrity: sha512-8s/56uK6r01r1icG/aEOHqyMVxd1bkYcSe9j8HcKtr/xTOFWvnzIVTehNW+5Yt89f+DLBe4A569pnZLS5HzAMA==} + peerDependencies: + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@vue/compiler-dom': 3.4.27 + '@vue/compiler-sfc': 3.4.27 + '@vue/runtime-dom': 3.4.27 + '@vue/server-renderer': 3.4.27(vue@3.4.27) + '@vue/shared': 3.4.27 + typescript: 5.5.3 + dev: false + /wcwidth@1.0.1: resolution: {integrity: sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==} dependencies: diff --git a/turbo.json b/turbo.json index 393eda3a2..f50d191c5 100644 --- a/turbo.json +++ b/turbo.json @@ -132,11 +132,7 @@ "outputLogs": "new-only", "dependsOn": ["@osdk/monorepo.tsup#typecheck", "@osdk/monorepo.tsconfig#typecheck", "^transpile", "codegen"], "inputs": ["src/**", "tsup.config.js", "tsconfig.json", "tsconfig.cjs.json"], - "outputs": [ - "dist/**", - "lib/**", - "build/{esm,cjs,browser}/**/*.{js,cjs,js.map,cjs.map}" - ] + "outputs": ["dist/**", "lib/**", "build/**/*.{js,cjs,js.map,cjs.map}"] }, "test": { @@ -146,7 +142,6 @@ }, "//#check-mrl": { - "outputLogs": "new-only", "inputs": [ "package.json", ".monorepolint.config.mjs",