diff --git a/.gitignore b/.gitignore index 5fe266c..a65aae9 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,8 @@ node_modules *.local +packages/*/build + sandbox/* !sandbox/.gitkeep diff --git a/lerna.json b/lerna.json index 47d9403..6fe7ddc 100644 --- a/lerna.json +++ b/lerna.json @@ -1,6 +1,6 @@ { "$schema": "node_modules/lerna/schemas/lerna-schema.json", "version": "0.0.0", - "packages": ["packages/*", "templates/*"], + "packages": ["packages/*"], "npmClient": "yarn" } diff --git a/package.json b/package.json index 027dbc3..ad586c8 100644 --- a/package.json +++ b/package.json @@ -3,20 +3,23 @@ "private": true, "packageManager": "yarn@4.2.2", "workspaces": [ - "packages/*", - "templates/*" + "packages/*" ], "scripts": { "dev": "lerna run dev", "build": "lerna run build", "lint": "lerna run lint", - "preview": "lerna run preview" + "preview": "lerna run preview", + "clean": "lerna run clean" }, "devDependencies": { + "@types/meow": "^6.0.0", "@typescript-eslint/eslint-plugin": "^7.15.0", "@typescript-eslint/parser": "^7.15.0", "eslint": "^8.57.0", "lerna": "^8.1.6", + "meow": "^13.2.0", + "prettier": "^3.3.3", "typescript": "^5.2.2", "vite": "^5.3.4" }, diff --git a/templates/create-angular/.editorconfig b/packages/create-angular/.editorconfig similarity index 100% rename from templates/create-angular/.editorconfig rename to packages/create-angular/.editorconfig diff --git a/templates/create-angular/.gitignore b/packages/create-angular/.gitignore similarity index 100% rename from templates/create-angular/.gitignore rename to packages/create-angular/.gitignore diff --git a/templates/create-angular/.vscode/extensions.json b/packages/create-angular/.vscode/extensions.json similarity index 100% rename from templates/create-angular/.vscode/extensions.json rename to packages/create-angular/.vscode/extensions.json diff --git a/templates/create-angular/.vscode/launch.json b/packages/create-angular/.vscode/launch.json similarity index 100% rename from templates/create-angular/.vscode/launch.json rename to packages/create-angular/.vscode/launch.json diff --git a/templates/create-angular/.vscode/tasks.json b/packages/create-angular/.vscode/tasks.json similarity index 100% rename from templates/create-angular/.vscode/tasks.json rename to packages/create-angular/.vscode/tasks.json diff --git a/templates/create-angular/README.md b/packages/create-angular/README.md similarity index 100% rename from templates/create-angular/README.md rename to packages/create-angular/README.md diff --git a/templates/create-angular/angular.json b/packages/create-angular/angular.json similarity index 100% rename from templates/create-angular/angular.json rename to packages/create-angular/angular.json diff --git a/templates/create-angular/package.json b/packages/create-angular/package.json similarity index 100% rename from templates/create-angular/package.json rename to packages/create-angular/package.json diff --git a/templates/create-angular/public/favicon.ico b/packages/create-angular/public/favicon.ico similarity index 100% rename from templates/create-angular/public/favicon.ico rename to packages/create-angular/public/favicon.ico diff --git a/templates/create-angular/scripts/create.js b/packages/create-angular/scripts/create.js similarity index 100% rename from templates/create-angular/scripts/create.js rename to packages/create-angular/scripts/create.js diff --git a/templates/create-angular/src/app/app.component.css b/packages/create-angular/src/app/app.component.css similarity index 100% rename from templates/create-angular/src/app/app.component.css rename to packages/create-angular/src/app/app.component.css diff --git a/templates/create-angular/src/app/app.component.html b/packages/create-angular/src/app/app.component.html similarity index 100% rename from templates/create-angular/src/app/app.component.html rename to packages/create-angular/src/app/app.component.html diff --git a/templates/create-angular/src/app/app.component.ts b/packages/create-angular/src/app/app.component.ts similarity index 100% rename from templates/create-angular/src/app/app.component.ts rename to packages/create-angular/src/app/app.component.ts diff --git a/templates/create-angular/src/app/app.config.ts b/packages/create-angular/src/app/app.config.ts similarity index 100% rename from templates/create-angular/src/app/app.config.ts rename to packages/create-angular/src/app/app.config.ts diff --git a/templates/create-angular/src/app/app.routes.ts b/packages/create-angular/src/app/app.routes.ts similarity index 100% rename from templates/create-angular/src/app/app.routes.ts rename to packages/create-angular/src/app/app.routes.ts diff --git a/templates/create-angular/src/index.html b/packages/create-angular/src/index.html similarity index 100% rename from templates/create-angular/src/index.html rename to packages/create-angular/src/index.html diff --git a/templates/create-angular/src/main.ts b/packages/create-angular/src/main.ts similarity index 100% rename from templates/create-angular/src/main.ts rename to packages/create-angular/src/main.ts diff --git a/templates/create-angular/src/styles.css b/packages/create-angular/src/styles.css similarity index 100% rename from templates/create-angular/src/styles.css rename to packages/create-angular/src/styles.css diff --git a/templates/create-angular/tsconfig.app.json b/packages/create-angular/tsconfig.app.json similarity index 100% rename from templates/create-angular/tsconfig.app.json rename to packages/create-angular/tsconfig.app.json diff --git a/templates/create-angular/tsconfig.json b/packages/create-angular/tsconfig.json similarity index 100% rename from templates/create-angular/tsconfig.json rename to packages/create-angular/tsconfig.json diff --git a/templates/create-angular/tsconfig.spec.json b/packages/create-angular/tsconfig.spec.json similarity index 100% rename from templates/create-angular/tsconfig.spec.json rename to packages/create-angular/tsconfig.spec.json diff --git a/packages/create-common/bin.js b/packages/create-common/bin.js deleted file mode 100644 index aa7c1b9..0000000 --- a/packages/create-common/bin.js +++ /dev/null @@ -1 +0,0 @@ -import './build/create.modern.js'; diff --git a/packages/create-common/package.json b/packages/create-common/package.json index 3018bd4..7a01bf4 100644 --- a/packages/create-common/package.json +++ b/packages/create-common/package.json @@ -2,6 +2,7 @@ "name": "@carto/create-common", "packageManager": "yarn@4.2.2", "author": "Don McCurdy ", + "version": "0.0.0", "license": "MIT", "publishConfig": { "access": "public", @@ -21,9 +22,9 @@ } }, "browserslist": [ - "defaults", - "not IE 11", - "node >= 18" + "defaults", + "not IE 11", + "node >= 18" ], "scripts": { "build": "microbundle --format cjs,modern --no-compress --define VERSION=$npm_package_version", @@ -36,9 +37,11 @@ }, "dependencies": { "kolorist": "^1.8.0", + "meow": "^13.2.0", "prompts": "^2.4.2" }, "devDependencies": { + "@types/meow": "^6.0.0", "@types/prompts": "^2.4.9", "microbundle": "^0.15.1" } diff --git a/packages/create-common/src/index.ts b/packages/create-common/src/index.ts index 3d36bc1..a9e5775 100644 --- a/packages/create-common/src/index.ts +++ b/packages/create-common/src/index.ts @@ -1,23 +1,271 @@ -import prompts from 'prompts'; - -const config = await prompts([ - { - name: 'title', - type: 'text', - message: 'Title for the application', - validate: (text) => text.length === 0 ? 'Title is required' : true - }, - { - name: 'accessToken', - type: 'text', - message: 'Access token for CARTO API', - validate: (text) => text.length === 0 ? 'Access token is required' : true - }, - { - name: 'apiBaseUrl', - type: 'text', - message: 'Base URL for CARTO API (optional)', - } -]) - -console.log(config) +import { + copyFileSync, + existsSync, + mkdirSync, + readdirSync, + rmSync, + statSync, +} from "node:fs"; +import { + rm, + stat, + copyFile, + readFile, + writeFile, + mkdir, +} from "node:fs/promises"; +import { resolve } from "node:path"; +import prompts from "prompts"; +import { green, bold, dim, bgGray, bgGreen, yellow } from "kolorist"; + +// TODO: Simplify this. +const pkg = pkgFromUserAgent(process.env.npm_config_user_agent); +const pkgManager = pkg ? pkg.name : "npm"; +const isYarn1 = pkgManager === "yarn" && pkg?.version.startsWith("1."); + +/** List of relative paths in the template to be _removed_ from new projects. */ +const TEMPLATE_EXCLUDE_PATHS = ["node_modules", "scripts"]; + +/** List of dependencies in the template to be _removed_ from new projects. */ +const TEMPLATE_EXCLUDE_DEPS = ["@carto/create-common"]; + +/** + * List of package.json fields to clear from new projects. + * See: https://docs.npmjs.com/cli/v10/configuring-npm/package-json + */ +const TEMPLATE_EXCLUDE_PKG_FIELDS = [ + "author", + "bin", + "bugs", + "description", + "files", + "homepage", + "keywords", + "license", + "publishConfig", + "repository", + "version", +]; + +/** + * Creates a new CARTO app in the target directory, given a template. + * + * @param templateDir Absolute path to template directory + * @param targetDir Relative or absolute path to target directory + */ +export async function createProject( + templateDir: string, + inputTargetDir: string, +) { + const targetDir = resolve(process.cwd(), inputTargetDir); + + console.log(` +${green("✔")} ${bold("Template directory")} ${dim("…")} ${templateDir} +${green("✔")} ${bold("Target directory")} ${dim("…")} ${targetDir} + `); + + console.log(dim("…\n")); + + /**************************************************************************** + * Validate target directory. + */ + + if (targetDir === templateDir) { + throw new Error(`Target and template directories cannot be the same.`); + } + + if (existsSync(targetDir) && !isEmpty(targetDir)) { + const { overwrite } = await prompts([ + { + type: "confirm", + name: "overwrite", + message: `Target directory "${targetDir}" is not empty. Overwrite?`, + }, + ]); + + if (!overwrite) { + console.warn(`Project creation cancelled.`); + process.exit(2); + } + } else if (!existsSync(targetDir)) { + mkdirSync(targetDir, { recursive: true }); + } + + /**************************************************************************** + * Project configuration. + */ + + const config = await prompts( + [ + { + name: "title", + type: "text", + message: "Title for the application", + validate: (text) => (text.length === 0 ? "Title is required" : true), + }, + { + name: "accessToken", + type: "password", + message: "Access token for CARTO API", + validate: (text) => + text.length === 0 ? "Access token is required" : true, + }, + { + name: "apiBaseUrl", + type: "text", + message: "Base URL for CARTO API (optional)", + }, + ], + { + onCancel: () => { + console.warn(`Project creation cancelled.`); + process.exit(2); + }, + }, + ); + + console.log(dim("\n…")); + + /**************************************************************************** + * Populate project directory. + */ + + // Overwrite was explicitly approved by user above. + if (existsSync(targetDir) && !isEmpty(targetDir)) { + emptyDir(targetDir); + } + + copyDir(templateDir, targetDir); + + // Remove template files not needed in project. + for (const excludePath of TEMPLATE_EXCLUDE_PATHS) { + await rm(resolve(targetDir, excludePath), { recursive: true, force: true }); + } + + // Set up package.json. + const pkgPath = resolve(targetDir, "package.json"); + const pkg = JSON.parse(await readFile(pkgPath, "utf8")); + removePkgDependencies(pkg, TEMPLATE_EXCLUDE_DEPS); + removePkgFields(pkg, TEMPLATE_EXCLUDE_PKG_FIELDS); + pkg.name = toValidPackageName(config.title); + pkg.private = true; + await writeFile(pkgPath, JSON.stringify(pkg, null, 2)); + + // Suggest next steps + console.log(` +${green("✔")} ${bold(`Project "${config.title}" was created!`)} + +${bold(yellow("!"))} ${bold("Next steps")}: + +${[ + ...(inputTargetDir !== "." ? [`${dim("$")} cd ${inputTargetDir}`] : []), + `${dim("$")} yarn`, + `${dim("$")} yarn dev`, +].join("\n")} + `); +} + +/****************************************************************************** + * Utility functions. + * + * References: + * - https://github.com/vitejs/vite/blob/main/packages/create-vite/src/index.ts + */ + +function removePkgDependencies>( + pkg: T, + excludeDeps: string[], +): T { + const dependencyTypes = [ + "dependencies", + "devDependencies", + "optionalDependencies", + "peerDependencies", + ]; + + for (const exclude of excludeDeps) { + for (const type of dependencyTypes) { + const dependencies = pkg[type] as Record | undefined; + if (dependencies && dependencies[exclude]) { + delete dependencies[exclude]; + } + } + } + + return pkg; +} + +function removePkgFields>( + pkg: T, + excludeFields: string[], +): T { + for (const field of TEMPLATE_EXCLUDE_PKG_FIELDS) { + delete pkg[field]; + } + return pkg; +} + +function formatTargetDir(targetDir: string | undefined) { + return targetDir?.trim().replace(/\/+$/g, ""); +} + +function copy(src: string, dest: string) { + const stat = statSync(src); + if (stat.isDirectory()) { + copyDir(src, dest); + } else { + copyFileSync(src, dest); + } +} + +const VALIDATE_PKG_NAME_REGEX = + /^(?:@[a-z\d\-*~][a-z\d\-*._~]*\/)?[a-z\d\-~][a-z\d\-._~]*$/; + +function toValidPackageName(projectName: string) { + if (VALIDATE_PKG_NAME_REGEX.test(projectName)) { + return projectName; + } + + return projectName + .trim() + .toLowerCase() + .replace(/\s+/g, "-") + .replace(/^[._]/, "") + .replace(/[^a-z\d\-~]+/g, "-"); +} + +function copyDir(srcDir: string, destDir: string) { + mkdirSync(destDir, { recursive: true }); + for (const file of readdirSync(srcDir)) { + const srcFile = resolve(srcDir, file); + const destFile = resolve(destDir, file); + copy(srcFile, destFile); + } +} + +function isEmpty(path: string) { + const files = readdirSync(path); + return files.length === 0 || (files.length === 1 && files[0] === ".git"); +} + +function emptyDir(dir: string) { + if (!existsSync(dir)) { + return; + } + for (const file of readdirSync(dir)) { + if (file === ".git") { + continue; + } + rmSync(resolve(dir, file), { recursive: true, force: true }); + } +} + +function pkgFromUserAgent(userAgent: string | undefined) { + if (!userAgent) return undefined; + const pkgSpec = userAgent.split(" ")[0]; + const pkgSpecArr = pkgSpec.split("/"); + return { + name: pkgSpecArr[0], + version: pkgSpecArr[1], + }; +} diff --git a/templates/create-react/.eslintrc.cjs b/packages/create-react/.eslintrc.cjs similarity index 100% rename from templates/create-react/.eslintrc.cjs rename to packages/create-react/.eslintrc.cjs diff --git a/templates/create-react/.gitignore b/packages/create-react/.gitignore similarity index 100% rename from templates/create-react/.gitignore rename to packages/create-react/.gitignore diff --git a/templates/create-react/README.md b/packages/create-react/README.md similarity index 100% rename from templates/create-react/README.md rename to packages/create-react/README.md diff --git a/templates/create-react/index.html b/packages/create-react/index.html similarity index 100% rename from templates/create-react/index.html rename to packages/create-react/index.html diff --git a/templates/create-react/package.json b/packages/create-react/package.json similarity index 95% rename from templates/create-react/package.json rename to packages/create-react/package.json index 3da3752..a76034e 100644 --- a/templates/create-react/package.json +++ b/packages/create-react/package.json @@ -10,6 +10,7 @@ }, "version": "0.0.0", "type": "module", + "bin": "scripts/create.js", "scripts": { "dev": "vite --port 4001", "build": "tsc -b && vite build", @@ -18,6 +19,7 @@ }, "dependencies": { "@carto/api-client": "^0.0.1-2", + "@carto/create-common": "^0.0.0", "@deck.gl/aggregation-layers": "^9.0.24", "@deck.gl/carto": "^9.0.24", "@deck.gl/core": "^9.0.24", diff --git a/templates/create-react/public/carto.svg b/packages/create-react/public/carto.svg similarity index 100% rename from templates/create-react/public/carto.svg rename to packages/create-react/public/carto.svg diff --git a/packages/create-react/scripts/create.js b/packages/create-react/scripts/create.js new file mode 100755 index 0000000..a8cc49d --- /dev/null +++ b/packages/create-react/scripts/create.js @@ -0,0 +1,21 @@ +#!/usr/bin/env node +import { resolve } from "node:path"; +import { fileURLToPath } from "node:url"; +import { createProject } from "@carto/create-common"; +import meow from "meow"; + +const cli = meow( + ` + Usage + $ yarn create @carto/react + `, + { + importMeta: import.meta, + autoHelp: true, + autoVersion: true, + }, +); + +const templateDir = resolve(fileURLToPath(import.meta.url), "../.."); +const targetDir = cli.input.at(0) || "."; +await createProject(templateDir, targetDir); diff --git a/templates/create-react/src/App.tsx b/packages/create-react/src/App.tsx similarity index 100% rename from templates/create-react/src/App.tsx rename to packages/create-react/src/App.tsx diff --git a/templates/create-react/src/assets/react.svg b/packages/create-react/src/assets/react.svg similarity index 100% rename from templates/create-react/src/assets/react.svg rename to packages/create-react/src/assets/react.svg diff --git a/templates/create-react/src/components/Map.tsx b/packages/create-react/src/components/Map.tsx similarity index 100% rename from templates/create-react/src/components/Map.tsx rename to packages/create-react/src/components/Map.tsx diff --git a/templates/create-react/src/context.ts b/packages/create-react/src/context.ts similarity index 100% rename from templates/create-react/src/context.ts rename to packages/create-react/src/context.ts diff --git a/templates/create-react/src/index.css b/packages/create-react/src/index.css similarity index 100% rename from templates/create-react/src/index.css rename to packages/create-react/src/index.css diff --git a/templates/create-react/src/main.tsx b/packages/create-react/src/main.tsx similarity index 100% rename from templates/create-react/src/main.tsx rename to packages/create-react/src/main.tsx diff --git a/templates/create-react/src/vite-env.d.ts b/packages/create-react/src/vite-env.d.ts similarity index 100% rename from templates/create-react/src/vite-env.d.ts rename to packages/create-react/src/vite-env.d.ts diff --git a/templates/create-react/tsconfig.app.json b/packages/create-react/tsconfig.app.json similarity index 100% rename from templates/create-react/tsconfig.app.json rename to packages/create-react/tsconfig.app.json diff --git a/templates/create-react/tsconfig.json b/packages/create-react/tsconfig.json similarity index 100% rename from templates/create-react/tsconfig.json rename to packages/create-react/tsconfig.json diff --git a/templates/create-react/tsconfig.node.json b/packages/create-react/tsconfig.node.json similarity index 100% rename from templates/create-react/tsconfig.node.json rename to packages/create-react/tsconfig.node.json diff --git a/templates/create-react/vite.config.ts b/packages/create-react/vite.config.ts similarity index 100% rename from templates/create-react/vite.config.ts rename to packages/create-react/vite.config.ts diff --git a/templates/create-vue/.gitignore b/packages/create-vue/.gitignore similarity index 100% rename from templates/create-vue/.gitignore rename to packages/create-vue/.gitignore diff --git a/templates/create-vue/.vscode/extensions.json b/packages/create-vue/.vscode/extensions.json similarity index 100% rename from templates/create-vue/.vscode/extensions.json rename to packages/create-vue/.vscode/extensions.json diff --git a/templates/create-vue/README.md b/packages/create-vue/README.md similarity index 100% rename from templates/create-vue/README.md rename to packages/create-vue/README.md diff --git a/templates/create-vue/index.html b/packages/create-vue/index.html similarity index 100% rename from templates/create-vue/index.html rename to packages/create-vue/index.html diff --git a/templates/create-vue/package.json b/packages/create-vue/package.json similarity index 100% rename from templates/create-vue/package.json rename to packages/create-vue/package.json diff --git a/templates/create-vue/public/vite.svg b/packages/create-vue/public/vite.svg similarity index 100% rename from templates/create-vue/public/vite.svg rename to packages/create-vue/public/vite.svg diff --git a/templates/create-vue/scripts/create.js b/packages/create-vue/scripts/create.js similarity index 100% rename from templates/create-vue/scripts/create.js rename to packages/create-vue/scripts/create.js diff --git a/templates/create-vue/src/App.vue b/packages/create-vue/src/App.vue similarity index 100% rename from templates/create-vue/src/App.vue rename to packages/create-vue/src/App.vue diff --git a/templates/create-vue/src/assets/vue.svg b/packages/create-vue/src/assets/vue.svg similarity index 100% rename from templates/create-vue/src/assets/vue.svg rename to packages/create-vue/src/assets/vue.svg diff --git a/templates/create-vue/src/components/HelloWorld.vue b/packages/create-vue/src/components/HelloWorld.vue similarity index 100% rename from templates/create-vue/src/components/HelloWorld.vue rename to packages/create-vue/src/components/HelloWorld.vue diff --git a/templates/create-vue/src/main.ts b/packages/create-vue/src/main.ts similarity index 100% rename from templates/create-vue/src/main.ts rename to packages/create-vue/src/main.ts diff --git a/templates/create-vue/src/style.css b/packages/create-vue/src/style.css similarity index 100% rename from templates/create-vue/src/style.css rename to packages/create-vue/src/style.css diff --git a/templates/create-vue/src/vite-env.d.ts b/packages/create-vue/src/vite-env.d.ts similarity index 100% rename from templates/create-vue/src/vite-env.d.ts rename to packages/create-vue/src/vite-env.d.ts diff --git a/templates/create-vue/tsconfig.app.json b/packages/create-vue/tsconfig.app.json similarity index 100% rename from templates/create-vue/tsconfig.app.json rename to packages/create-vue/tsconfig.app.json diff --git a/templates/create-vue/tsconfig.json b/packages/create-vue/tsconfig.json similarity index 100% rename from templates/create-vue/tsconfig.json rename to packages/create-vue/tsconfig.json diff --git a/templates/create-vue/tsconfig.node.json b/packages/create-vue/tsconfig.node.json similarity index 100% rename from templates/create-vue/tsconfig.node.json rename to packages/create-vue/tsconfig.node.json diff --git a/templates/create-vue/vite.config.ts b/packages/create-vue/vite.config.ts similarity index 100% rename from templates/create-vue/vite.config.ts rename to packages/create-vue/vite.config.ts diff --git a/templates/create-react/scripts/create.js b/templates/create-react/scripts/create.js deleted file mode 100644 index cfae918..0000000 --- a/templates/create-react/scripts/create.js +++ /dev/null @@ -1 +0,0 @@ -console.log('react::create') diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..3735ca5 --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,12 @@ +{ + "include": ["packages/*/src/**/*.ts", "templates/*/src/**/*.ts"], + "compilerOptions": { + "target": "es2022", + "module": "es2022", + "moduleResolution": "bundler", + "esModuleInterop": true, + "allowSyntheticDefaultImports": true, + "lib": ["es2022", "DOM", "DOM.Iterable"], + "strict": true + } +} diff --git a/yarn.lock b/yarn.lock index bb48714..c4956e8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2057,9 +2057,9 @@ __metadata: languageName: node linkType: hard -"@carto/create-angular@workspace:templates/create-angular": +"@carto/create-angular@workspace:packages/create-angular": version: 0.0.0-use.local - resolution: "@carto/create-angular@workspace:templates/create-angular" + resolution: "@carto/create-angular@workspace:packages/create-angular" dependencies: "@angular-devkit/build-angular": "npm:^18.1.1" "@angular/animations": "npm:^18.1.0" @@ -2079,22 +2079,25 @@ __metadata: languageName: unknown linkType: soft -"@carto/create-common@workspace:packages/create-common": +"@carto/create-common@npm:^0.0.0, @carto/create-common@workspace:packages/create-common": version: 0.0.0-use.local resolution: "@carto/create-common@workspace:packages/create-common" dependencies: + "@types/meow": "npm:^6.0.0" "@types/prompts": "npm:^2.4.9" kolorist: "npm:^1.8.0" + meow: "npm:^13.2.0" microbundle: "npm:^0.15.1" prompts: "npm:^2.4.2" languageName: unknown linkType: soft -"@carto/create-react@workspace:templates/create-react": +"@carto/create-react@workspace:packages/create-react": version: 0.0.0-use.local - resolution: "@carto/create-react@workspace:templates/create-react" + resolution: "@carto/create-react@workspace:packages/create-react" dependencies: "@carto/api-client": "npm:^0.0.1-2" + "@carto/create-common": "npm:^0.0.0" "@deck.gl/aggregation-layers": "npm:^9.0.24" "@deck.gl/carto": "npm:^9.0.24" "@deck.gl/core": "npm:^9.0.24" @@ -2121,12 +2124,14 @@ __metadata: react-map-gl: "npm:^7.1.7" typescript: "npm:^5.2.2" vite: "npm:^5.3.4" + bin: + create-react: scripts/create.js languageName: unknown linkType: soft -"@carto/create-vue@workspace:templates/create-vue": +"@carto/create-vue@workspace:packages/create-vue": version: 0.0.0-use.local - resolution: "@carto/create-vue@workspace:templates/create-vue" + resolution: "@carto/create-vue@workspace:packages/create-vue" dependencies: "@vitejs/plugin-vue": "npm:^5.0.5" typescript: "npm:^5.2.2" @@ -4888,6 +4893,15 @@ __metadata: languageName: node linkType: hard +"@types/meow@npm:^6.0.0": + version: 6.0.0 + resolution: "@types/meow@npm:6.0.0" + dependencies: + meow: "npm:*" + checksum: 10c0/ca305535b86af6b52cb88782de78034a7b2afe347cf616c851d89e7f277d49c135e17877570efa5eabff7465af53842b5a9f99d10b231391250d35fb5fd5ec01 + languageName: node + linkType: hard + "@types/mime@npm:^1": version: 1.3.5 resolution: "@types/mime@npm:1.3.5" @@ -6451,10 +6465,13 @@ __metadata: version: 0.0.0-use.local resolution: "carto-app-templates@workspace:." dependencies: + "@types/meow": "npm:^6.0.0" "@typescript-eslint/eslint-plugin": "npm:^7.15.0" "@typescript-eslint/parser": "npm:^7.15.0" eslint: "npm:^8.57.0" lerna: "npm:^8.1.6" + meow: "npm:^13.2.0" + prettier: "npm:^3.3.3" typescript: "npm:^5.2.2" vite: "npm:^5.3.4" languageName: unknown @@ -11312,6 +11329,13 @@ __metadata: languageName: node linkType: hard +"meow@npm:*, meow@npm:^13.2.0": + version: 13.2.0 + resolution: "meow@npm:13.2.0" + checksum: 10c0/d5b339ae314715bcd0b619dd2f8a266891928e21526b4800d49b4fba1cc3fff7e2c1ff5edd3344149fac841bc2306157f858e8c4d5eaee4d52ce52ad925664ce + languageName: node + linkType: hard + "meow@npm:^8.1.2": version: 8.1.2 resolution: "meow@npm:8.1.2" @@ -13377,6 +13401,15 @@ __metadata: languageName: node linkType: hard +"prettier@npm:^3.3.3": + version: 3.3.3 + resolution: "prettier@npm:3.3.3" + bin: + prettier: bin/prettier.cjs + checksum: 10c0/b85828b08e7505716324e4245549b9205c0cacb25342a030ba8885aba2039a115dbcf75a0b7ca3b37bc9d101ee61fab8113fc69ca3359f2a226f1ecc07ad2e26 + languageName: node + linkType: hard + "pretty-bytes@npm:^3.0.0": version: 3.0.1 resolution: "pretty-bytes@npm:3.0.1"