@gurulu/cli 1.6.2 → 1.6.3
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/bin.js +8 -56
- package/dist/index.d.ts +1 -1
- package/dist/index.js +8 -56
- package/dist/wizard/run.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/bin.js
CHANGED
|
@@ -42336,6 +42336,10 @@ async function runWizard(opts) {
|
|
|
42336
42336
|
}
|
|
42337
42337
|
opts.cwd = target;
|
|
42338
42338
|
}
|
|
42339
|
+
const priorConfig = readProjectConfig(opts.cwd);
|
|
42340
|
+
if (priorConfig?.workspace_id) {
|
|
42341
|
+
p4.log.info(c3.dim(`Bu proje zaten bağlı (workspace ${priorConfig.workspace_id.slice(0, 8)}…) — güncelleme / yeni özellik ekleme modu.`));
|
|
42342
|
+
}
|
|
42339
42343
|
const TOTAL = 6;
|
|
42340
42344
|
const phase = (n2, label) => {
|
|
42341
42345
|
p4.log.step(`${c3.dim(`[${n2}/${TOTAL}]`)} ${c3.bold(label)}`);
|
|
@@ -42653,61 +42657,9 @@ async function resolveWorkspace(client, authWorkspaceId, opts) {
|
|
|
42653
42657
|
if (opts.writeKey) {
|
|
42654
42658
|
return { workspaceId: opts.workspaceId ?? authWorkspaceId, writeKey: opts.writeKey };
|
|
42655
42659
|
}
|
|
42656
|
-
|
|
42657
|
-
|
|
42658
|
-
|
|
42659
|
-
return { workspaceId: wsId, writeKey: write_key2 };
|
|
42660
|
-
}
|
|
42661
|
-
let list = [];
|
|
42662
|
-
try {
|
|
42663
|
-
list = (await client.listWorkspaces()).workspaces;
|
|
42664
|
-
} catch {
|
|
42665
|
-
list = [];
|
|
42666
|
-
}
|
|
42667
|
-
const CREATE = "__create__";
|
|
42668
|
-
let selected;
|
|
42669
|
-
if (list.length === 0) {
|
|
42670
|
-
selected = CREATE;
|
|
42671
|
-
} else {
|
|
42672
|
-
const initial = list.find((w2) => w2.workspace_id === authWorkspaceId)?.workspace_id ?? list[0]?.workspace_id ?? CREATE;
|
|
42673
|
-
const choice = await p4.select({
|
|
42674
|
-
message: "Workspace seç",
|
|
42675
|
-
options: [
|
|
42676
|
-
...list.map((w2) => ({ value: w2.workspace_id, label: w2.name, hint: w2.slug })),
|
|
42677
|
-
{ value: CREATE, label: "➕ Yeni workspace oluştur" }
|
|
42678
|
-
],
|
|
42679
|
-
initialValue: initial
|
|
42680
|
-
});
|
|
42681
|
-
if (p4.isCancel(choice))
|
|
42682
|
-
bail();
|
|
42683
|
-
selected = choice;
|
|
42684
|
-
}
|
|
42685
|
-
if (selected === CREATE) {
|
|
42686
|
-
const name = await p4.text({
|
|
42687
|
-
message: "Workspace adı",
|
|
42688
|
-
placeholder: "My App",
|
|
42689
|
-
validate: (v2) => v2.trim() ? undefined : "gerekli"
|
|
42690
|
-
});
|
|
42691
|
-
if (p4.isCancel(name))
|
|
42692
|
-
bail();
|
|
42693
|
-
const domain = await p4.text({
|
|
42694
|
-
message: "Domain",
|
|
42695
|
-
placeholder: "example.com",
|
|
42696
|
-
validate: (v2) => v2.trim().length >= 3 ? undefined : "geçerli domain gerekli"
|
|
42697
|
-
});
|
|
42698
|
-
if (p4.isCancel(domain))
|
|
42699
|
-
bail();
|
|
42700
|
-
const s2 = p4.spinner();
|
|
42701
|
-
s2.start("Workspace oluşturuluyor…");
|
|
42702
|
-
const created = await client.createWorkspace({
|
|
42703
|
-
name: String(name).trim(),
|
|
42704
|
-
domain: String(domain).trim()
|
|
42705
|
-
});
|
|
42706
|
-
s2.stop(`Workspace oluşturuldu: ${created.name}`);
|
|
42707
|
-
return { workspaceId: created.workspace_id, writeKey: created.write_key };
|
|
42708
|
-
}
|
|
42709
|
-
const { write_key } = await client.issueWriteKey(selected);
|
|
42710
|
-
return { workspaceId: selected, writeKey: write_key };
|
|
42660
|
+
const wsId = opts.workspaceId ?? authWorkspaceId;
|
|
42661
|
+
const { write_key } = await client.issueWriteKey(wsId);
|
|
42662
|
+
return { workspaceId: wsId, writeKey: write_key };
|
|
42711
42663
|
}
|
|
42712
42664
|
function injectionLine(strategy, reason, file) {
|
|
42713
42665
|
if (strategy === "prepend-entry" && reason === "injected")
|
|
@@ -43148,7 +43100,7 @@ var uninstallCmd = defineCommand({
|
|
|
43148
43100
|
});
|
|
43149
43101
|
|
|
43150
43102
|
// src/index.ts
|
|
43151
|
-
var VERSION = "1.6.
|
|
43103
|
+
var VERSION = "1.6.3";
|
|
43152
43104
|
var mainCmd = defineCommand({
|
|
43153
43105
|
meta: {
|
|
43154
43106
|
name: "gurulu",
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -41913,6 +41913,10 @@ async function runWizard(opts) {
|
|
|
41913
41913
|
}
|
|
41914
41914
|
opts.cwd = target;
|
|
41915
41915
|
}
|
|
41916
|
+
const priorConfig = readProjectConfig(opts.cwd);
|
|
41917
|
+
if (priorConfig?.workspace_id) {
|
|
41918
|
+
p4.log.info(c3.dim(`Bu proje zaten bağlı (workspace ${priorConfig.workspace_id.slice(0, 8)}…) — güncelleme / yeni özellik ekleme modu.`));
|
|
41919
|
+
}
|
|
41916
41920
|
const TOTAL = 6;
|
|
41917
41921
|
const phase = (n2, label) => {
|
|
41918
41922
|
p4.log.step(`${c3.dim(`[${n2}/${TOTAL}]`)} ${c3.bold(label)}`);
|
|
@@ -42230,61 +42234,9 @@ async function resolveWorkspace(client, authWorkspaceId, opts) {
|
|
|
42230
42234
|
if (opts.writeKey) {
|
|
42231
42235
|
return { workspaceId: opts.workspaceId ?? authWorkspaceId, writeKey: opts.writeKey };
|
|
42232
42236
|
}
|
|
42233
|
-
|
|
42234
|
-
|
|
42235
|
-
|
|
42236
|
-
return { workspaceId: wsId, writeKey: write_key2 };
|
|
42237
|
-
}
|
|
42238
|
-
let list = [];
|
|
42239
|
-
try {
|
|
42240
|
-
list = (await client.listWorkspaces()).workspaces;
|
|
42241
|
-
} catch {
|
|
42242
|
-
list = [];
|
|
42243
|
-
}
|
|
42244
|
-
const CREATE = "__create__";
|
|
42245
|
-
let selected;
|
|
42246
|
-
if (list.length === 0) {
|
|
42247
|
-
selected = CREATE;
|
|
42248
|
-
} else {
|
|
42249
|
-
const initial = list.find((w2) => w2.workspace_id === authWorkspaceId)?.workspace_id ?? list[0]?.workspace_id ?? CREATE;
|
|
42250
|
-
const choice = await p4.select({
|
|
42251
|
-
message: "Workspace seç",
|
|
42252
|
-
options: [
|
|
42253
|
-
...list.map((w2) => ({ value: w2.workspace_id, label: w2.name, hint: w2.slug })),
|
|
42254
|
-
{ value: CREATE, label: "➕ Yeni workspace oluştur" }
|
|
42255
|
-
],
|
|
42256
|
-
initialValue: initial
|
|
42257
|
-
});
|
|
42258
|
-
if (p4.isCancel(choice))
|
|
42259
|
-
bail();
|
|
42260
|
-
selected = choice;
|
|
42261
|
-
}
|
|
42262
|
-
if (selected === CREATE) {
|
|
42263
|
-
const name = await p4.text({
|
|
42264
|
-
message: "Workspace adı",
|
|
42265
|
-
placeholder: "My App",
|
|
42266
|
-
validate: (v2) => v2.trim() ? undefined : "gerekli"
|
|
42267
|
-
});
|
|
42268
|
-
if (p4.isCancel(name))
|
|
42269
|
-
bail();
|
|
42270
|
-
const domain = await p4.text({
|
|
42271
|
-
message: "Domain",
|
|
42272
|
-
placeholder: "example.com",
|
|
42273
|
-
validate: (v2) => v2.trim().length >= 3 ? undefined : "geçerli domain gerekli"
|
|
42274
|
-
});
|
|
42275
|
-
if (p4.isCancel(domain))
|
|
42276
|
-
bail();
|
|
42277
|
-
const s2 = p4.spinner();
|
|
42278
|
-
s2.start("Workspace oluşturuluyor…");
|
|
42279
|
-
const created = await client.createWorkspace({
|
|
42280
|
-
name: String(name).trim(),
|
|
42281
|
-
domain: String(domain).trim()
|
|
42282
|
-
});
|
|
42283
|
-
s2.stop(`Workspace oluşturuldu: ${created.name}`);
|
|
42284
|
-
return { workspaceId: created.workspace_id, writeKey: created.write_key };
|
|
42285
|
-
}
|
|
42286
|
-
const { write_key } = await client.issueWriteKey(selected);
|
|
42287
|
-
return { workspaceId: selected, writeKey: write_key };
|
|
42237
|
+
const wsId = opts.workspaceId ?? authWorkspaceId;
|
|
42238
|
+
const { write_key } = await client.issueWriteKey(wsId);
|
|
42239
|
+
return { workspaceId: wsId, writeKey: write_key };
|
|
42288
42240
|
}
|
|
42289
42241
|
function injectionLine(strategy, reason, file) {
|
|
42290
42242
|
if (strategy === "prepend-entry" && reason === "injected")
|
|
@@ -42725,7 +42677,7 @@ var uninstallCmd = defineCommand({
|
|
|
42725
42677
|
});
|
|
42726
42678
|
|
|
42727
42679
|
// src/index.ts
|
|
42728
|
-
var VERSION = "1.6.
|
|
42680
|
+
var VERSION = "1.6.3";
|
|
42729
42681
|
var mainCmd = defineCommand({
|
|
42730
42682
|
meta: {
|
|
42731
42683
|
name: "gurulu",
|
package/dist/wizard/run.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../../src/wizard/run.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../../src/wizard/run.ts"],"names":[],"mappings":"AAuCA,MAAM,WAAW,aAAa;IAC5B,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,0DAA0D;IAC1D,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,4CAA4C;IAC5C,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,sFAAsF;IACtF,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AA0DD,wBAAsB,SAAS,CAAC,IAAI,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC,CAwclE"}
|