@instafy/cli 0.1.8-staging.348 → 0.1.8-staging.350
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/index.js +32 -32
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -73,6 +73,38 @@ program
|
|
|
73
73
|
process.exit(1);
|
|
74
74
|
}
|
|
75
75
|
});
|
|
76
|
+
const projectInitCommand = program
|
|
77
|
+
.command("project:init")
|
|
78
|
+
.description("Create an Instafy project and link this folder (.instafy/project.json)")
|
|
79
|
+
.option("--path <dir>", "Directory where the manifest should be written (default: cwd)");
|
|
80
|
+
addServerUrlOptions(projectInitCommand);
|
|
81
|
+
projectInitCommand
|
|
82
|
+
.option("--access-token <token>", "Instafy or Supabase access token")
|
|
83
|
+
.option("--project-type <type>", "Project type (customer|sandbox)")
|
|
84
|
+
.option("--org-id <uuid>", "Optional organization id")
|
|
85
|
+
.option("--org-name <name>", "Optional organization name")
|
|
86
|
+
.option("--org-slug <slug>", "Optional organization slug")
|
|
87
|
+
.option("--owner-user-id <uuid>", "Explicit owner user id (defaults to caller)")
|
|
88
|
+
.option("--json", "Output JSON")
|
|
89
|
+
.action(async (opts) => {
|
|
90
|
+
try {
|
|
91
|
+
await projectInit({
|
|
92
|
+
path: opts.path,
|
|
93
|
+
controllerUrl: opts.serverUrl ?? opts.controllerUrl,
|
|
94
|
+
accessToken: opts.accessToken,
|
|
95
|
+
projectType: opts.projectType,
|
|
96
|
+
orgId: opts.orgId,
|
|
97
|
+
orgName: opts.orgName,
|
|
98
|
+
orgSlug: opts.orgSlug,
|
|
99
|
+
ownerUserId: opts.ownerUserId,
|
|
100
|
+
json: opts.json,
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
catch (error) {
|
|
104
|
+
console.error(kleur.red(String(error)));
|
|
105
|
+
process.exit(1);
|
|
106
|
+
}
|
|
107
|
+
});
|
|
76
108
|
const configCommand = program.command("config").description("Get/set saved CLI configuration");
|
|
77
109
|
configCommand
|
|
78
110
|
.command("path")
|
|
@@ -295,38 +327,6 @@ program
|
|
|
295
327
|
process.exit(1);
|
|
296
328
|
}
|
|
297
329
|
});
|
|
298
|
-
const projectInitCommand = program
|
|
299
|
-
.command("project:init")
|
|
300
|
-
.description("Create an Instafy project and link this folder (.instafy/project.json)")
|
|
301
|
-
.option("--path <dir>", "Directory where the manifest should be written (default: cwd)");
|
|
302
|
-
addServerUrlOptions(projectInitCommand);
|
|
303
|
-
projectInitCommand
|
|
304
|
-
.option("--access-token <token>", "Instafy or Supabase access token")
|
|
305
|
-
.option("--project-type <type>", "Project type (customer|sandbox)")
|
|
306
|
-
.option("--org-id <uuid>", "Optional organization id")
|
|
307
|
-
.option("--org-name <name>", "Optional organization name")
|
|
308
|
-
.option("--org-slug <slug>", "Optional organization slug")
|
|
309
|
-
.option("--owner-user-id <uuid>", "Explicit owner user id (defaults to caller)")
|
|
310
|
-
.option("--json", "Output JSON")
|
|
311
|
-
.action(async (opts) => {
|
|
312
|
-
try {
|
|
313
|
-
await projectInit({
|
|
314
|
-
path: opts.path,
|
|
315
|
-
controllerUrl: opts.serverUrl ?? opts.controllerUrl,
|
|
316
|
-
accessToken: opts.accessToken,
|
|
317
|
-
projectType: opts.projectType,
|
|
318
|
-
orgId: opts.orgId,
|
|
319
|
-
orgName: opts.orgName,
|
|
320
|
-
orgSlug: opts.orgSlug,
|
|
321
|
-
ownerUserId: opts.ownerUserId,
|
|
322
|
-
json: opts.json,
|
|
323
|
-
});
|
|
324
|
-
}
|
|
325
|
-
catch (error) {
|
|
326
|
-
console.error(kleur.red(String(error)));
|
|
327
|
-
process.exit(1);
|
|
328
|
-
}
|
|
329
|
-
});
|
|
330
330
|
const tunnelCommand = program
|
|
331
331
|
.command("tunnel")
|
|
332
332
|
.description("Start a shareable tunnel URL for a local port (defaults to detached)")
|
package/package.json
CHANGED