create-tamagui 1.36.3 → 1.36.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/helpers/getProjectName.js +2 -2
- package/dist/helpers/getTemplateInfo.js +31 -15
- package/dist/helpers/getTemplateInfo.js.map +2 -2
- package/dist/index.js +408 -392
- package/dist/index.js.map +2 -2
- package/dist/steps/takeout.js +29 -13
- package/dist/steps/takeout.js.map +2 -2
- package/dist/templates.js +31 -15
- package/dist/templates.js.map +2 -2
- package/package.json +2 -2
|
@@ -6354,7 +6354,7 @@ var import_prompts = __toESM(require_prompts3());
|
|
|
6354
6354
|
// package.json
|
|
6355
6355
|
var package_default = {
|
|
6356
6356
|
name: "create-tamagui",
|
|
6357
|
-
version: "1.36.
|
|
6357
|
+
version: "1.36.4",
|
|
6358
6358
|
bin: "./run.js",
|
|
6359
6359
|
main: "dist",
|
|
6360
6360
|
files: [
|
|
@@ -6389,7 +6389,7 @@ var package_default = {
|
|
|
6389
6389
|
},
|
|
6390
6390
|
devDependencies: {
|
|
6391
6391
|
"@playwright/test": "^1.29.0",
|
|
6392
|
-
"@tamagui/build": "1.36.
|
|
6392
|
+
"@tamagui/build": "1.36.4",
|
|
6393
6393
|
"@types/async-retry": "1.4.2",
|
|
6394
6394
|
"@types/cross-spawn": "^6.0.2",
|
|
6395
6395
|
"@types/node": "^16.11.9",
|
|
@@ -5537,15 +5537,15 @@ var require_route = __commonJS({
|
|
|
5537
5537
|
};
|
|
5538
5538
|
}
|
|
5539
5539
|
function wrapConversion(toModel, graph) {
|
|
5540
|
-
const
|
|
5540
|
+
const path2 = [graph[toModel].parent, toModel];
|
|
5541
5541
|
let fn = conversions[graph[toModel].parent][toModel];
|
|
5542
5542
|
let cur = graph[toModel].parent;
|
|
5543
5543
|
while (graph[cur].parent) {
|
|
5544
|
-
|
|
5544
|
+
path2.unshift(graph[cur].parent);
|
|
5545
5545
|
fn = link(conversions[graph[cur].parent][cur], fn);
|
|
5546
5546
|
cur = graph[cur].parent;
|
|
5547
5547
|
}
|
|
5548
|
-
fn.conversion =
|
|
5548
|
+
fn.conversion = path2;
|
|
5549
5549
|
return fn;
|
|
5550
5550
|
}
|
|
5551
5551
|
module2.exports = function(fromModel) {
|
|
@@ -6223,7 +6223,7 @@ module.exports = __toCommonJS(getTemplateInfo_exports);
|
|
|
6223
6223
|
var import_prompts2 = __toESM(require_prompts3());
|
|
6224
6224
|
|
|
6225
6225
|
// src/templates.ts
|
|
6226
|
-
var
|
|
6226
|
+
var import_path2 = require("path");
|
|
6227
6227
|
var import_chalk6 = __toESM(require_source());
|
|
6228
6228
|
|
|
6229
6229
|
// src/constants.ts
|
|
@@ -6295,7 +6295,9 @@ var simple_web_default = main2;
|
|
|
6295
6295
|
|
|
6296
6296
|
// src/steps/takeout.ts
|
|
6297
6297
|
var import_child_process = require("child_process");
|
|
6298
|
+
var import_fs = require("fs");
|
|
6298
6299
|
var import_promises = __toESM(require("fs/promises"));
|
|
6300
|
+
var import_path = __toESM(require("path"));
|
|
6299
6301
|
var import_chalk5 = __toESM(require_source());
|
|
6300
6302
|
var import_prompts = __toESM(require_prompts3());
|
|
6301
6303
|
|
|
@@ -6331,7 +6333,7 @@ var takeoutAsciiArt = `\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2
|
|
|
6331
6333
|
var packageManager3 = "yarn";
|
|
6332
6334
|
var useYarn3 = packageManager3 === "yarn";
|
|
6333
6335
|
var runCommand3 = (scriptName) => `${packageManager3} ${useYarn3 ? "" : "run "}${scriptName}`;
|
|
6334
|
-
var main3 = async ({ isFullClone, projectName }) => {
|
|
6336
|
+
var main3 = async ({ isFullClone, projectName, projectPath }) => {
|
|
6335
6337
|
console.log(`
|
|
6336
6338
|
${tamaguiRainbowAsciiArt.split("\n").map((line) => ` ${line}`).join("\n")}
|
|
6337
6339
|
${takeoutAsciiArt}
|
|
@@ -6363,14 +6365,17 @@ ${takeoutAsciiArt}
|
|
|
6363
6365
|
initial: true
|
|
6364
6366
|
});
|
|
6365
6367
|
if (setUpSupabaseEnv) {
|
|
6366
|
-
|
|
6367
|
-
|
|
6368
|
-
|
|
6369
|
-
|
|
6370
|
-
|
|
6371
|
-
|
|
6372
|
-
|
|
6373
|
-
|
|
6368
|
+
const envs = getEnvFromSupabaseStatus((0, import_child_process.execSync)("yarn supa status").toString());
|
|
6369
|
+
const newEnvContent = Object.entries(envs).map(([key, value]) => `${key}=${value}`).join("\n");
|
|
6370
|
+
if ((0, import_fs.existsSync)(import_path.default.join(projectPath, ".env.local"))) {
|
|
6371
|
+
if ((0, import_fs.readFileSync)(import_path.default.join(projectPath, ".env.local")).toString() !== newEnvContent) {
|
|
6372
|
+
(0, import_fs.renameSync)(
|
|
6373
|
+
import_path.default.join(projectPath, ".env.local"),
|
|
6374
|
+
import_path.default.join(projectPath, `.env.local.old-${Number(/* @__PURE__ */ new Date())}`)
|
|
6375
|
+
);
|
|
6376
|
+
}
|
|
6377
|
+
}
|
|
6378
|
+
await import_promises.default.writeFile(import_path.default.join(projectPath, "./.env.local"), newEnvContent);
|
|
6374
6379
|
}
|
|
6375
6380
|
}
|
|
6376
6381
|
}
|
|
@@ -6451,7 +6456,7 @@ async function linkSupabase() {
|
|
|
6451
6456
|
message: "Enter your supabase project's ID (e.g. abcdefghijklmnopqrst)",
|
|
6452
6457
|
initial: true
|
|
6453
6458
|
});
|
|
6454
|
-
const cmd = `
|
|
6459
|
+
const cmd = `npx supabase link --project-ref ${supabaseRefId.trim()}`;
|
|
6455
6460
|
try {
|
|
6456
6461
|
(0, import_child_process.execSync)(cmd, {
|
|
6457
6462
|
stdio: "inherit"
|
|
@@ -6478,9 +6483,20 @@ async function linkSupabase() {
|
|
|
6478
6483
|
}
|
|
6479
6484
|
}
|
|
6480
6485
|
}
|
|
6486
|
+
function getEnvFromSupabaseStatus(status) {
|
|
6487
|
+
var _a, _b, _c, _d, _e, _f;
|
|
6488
|
+
return {
|
|
6489
|
+
NEXT_PUBLIC_SUPABASE_URL: (_a = status.match(/API URL: (.*)/)) == null ? void 0 : _a[1],
|
|
6490
|
+
NEXT_PUBLIC_SUPABASE_GRAPHQL_URL: (_b = status.match(/GraphQL URL: (.*)/)) == null ? void 0 : _b[1],
|
|
6491
|
+
SUPABASE_DB_URL: (_c = status.match(/DB URL: (.*)/)) == null ? void 0 : _c[1],
|
|
6492
|
+
NEXT_PUBLIC_SUPABASE_ANON_KEY: (_d = status.match(/anon key: (.*)/)) == null ? void 0 : _d[1],
|
|
6493
|
+
SUPABASE_SERVICE_ROLE: (_e = status.match(/service_role key: (.*)/)) == null ? void 0 : _e[1],
|
|
6494
|
+
SUPABASE_JWT_SECRET: (_f = status.match(/JWT secret: (.*)/)) == null ? void 0 : _f[1]
|
|
6495
|
+
};
|
|
6496
|
+
}
|
|
6481
6497
|
|
|
6482
6498
|
// src/templates.ts
|
|
6483
|
-
var repoRoot = (0,
|
|
6499
|
+
var repoRoot = (0, import_path2.join)(__dirname, "..", "..", "..");
|
|
6484
6500
|
var templates = [
|
|
6485
6501
|
{
|
|
6486
6502
|
title: `Next + Expo + Solito (recommended for production) - Production-ready universal app with a monorepo.`,
|