@supernovaio/cli 2.0.13 → 2.0.14

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.
@@ -0,0 +1,24 @@
1
+ import { z, ZodType } from "zod";
2
+ import { SentryCommand } from "../types/index.js";
3
+ declare const TemplateUploadConfig: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
4
+ type TemplateUploadConfig = z.infer<typeof TemplateUploadConfig>;
5
+ export default class TemplateUploadDocker extends SentryCommand<TemplateUploadConfig> {
6
+ static args: {};
7
+ static description: string;
8
+ static examples: string[];
9
+ static hidden: boolean;
10
+ static flags: {
11
+ from: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
12
+ workspaceId: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
13
+ designSystemId: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
14
+ };
15
+ get commandId(): string;
16
+ get configSchema(): ZodType<TemplateUploadConfig>;
17
+ run(): Promise<void>;
18
+ private validateDockerDaemon;
19
+ private buildDockerImage;
20
+ private pushDockerImage;
21
+ private remoteTemplateBuild;
22
+ }
23
+ export {};
24
+ //# sourceMappingURL=template-upload-docker.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"template-upload-docker.d.ts","sourceRoot":"","sources":["../../src/commands/template-upload-docker.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,CAAC,EAAE,OAAO,EAAE,MAAM,KAAK,CAAA;AAEhC,OAAO,EAAe,aAAa,EAAE,MAAM,mBAAmB,CAAA;AAO9D,QAAA,MAAM,oBAAoB,gDAAe,CAAA;AAEzC,KAAK,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAA;AAsBhE,MAAM,CAAC,OAAO,OAAO,oBAAqB,SAAQ,aAAa,CAAC,oBAAoB,CAAC;IACnF,OAAgB,IAAI,KAAK;IACzB,OAAgB,WAAW,SAAiD;IAC5E,OAAgB,QAAQ,WAAgE;IACxF,OAAgB,MAAM,EAAE,OAAO,CAAO;IACtC,OAAgB,KAAK;;;;MAapB;IAED,IAAI,SAAS,IAAI,MAAM,CAEtB;IAED,IAAI,YAAY,IAAI,OAAO,CAAC,oBAAoB,CAAC,CAEhD;IAGY,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;YA6CnB,oBAAoB;YAMpB,gBAAgB;YAehB,eAAe;YASf,mBAAmB;CA0BlC"}
@@ -0,0 +1,159 @@
1
+
2
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="af9409d8-4d1b-519b-a0d8-58e14ea316e3")}catch(e){}}();
3
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
4
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
5
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
6
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
7
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
8
+ };
9
+ var __metadata = (this && this.__metadata) || function (k, v) {
10
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
11
+ };
12
+ import { Flags } from "@oclif/core";
13
+ import { action } from "@oclif/core/ux";
14
+ import { SentryTraced } from "@sentry/nestjs";
15
+ import { exec as execCallback } from "node:child_process";
16
+ import * as fs from "node:fs/promises";
17
+ import path from "node:path";
18
+ import { promisify } from "node:util";
19
+ import { z } from "zod";
20
+ import { commonFlags, SentryCommand } from "../types/index.js";
21
+ import { sleep } from "../utils/common.js";
22
+ const exec = promisify(execCallback);
23
+ const TemplateUploadConfig = z.object({});
24
+ async function fileExists(p) {
25
+ try {
26
+ await fs.access(p);
27
+ return true;
28
+ }
29
+ catch {
30
+ return false;
31
+ }
32
+ }
33
+ const dockerfile = `
34
+ FROM node:22-slim
35
+
36
+ RUN apt-get update && apt-get install -y curl && apt-get clean && rm -rf /var/lib/apt/lists/*
37
+
38
+ WORKDIR /home/user
39
+
40
+ COPY . .
41
+ RUN rm -rf node_modules && npm i && npm install -g pm2
42
+ `;
43
+ export default class TemplateUploadDocker extends SentryCommand {
44
+ static args = {};
45
+ static description = "Upload custom prototype app sandbox template";
46
+ static examples = ["<%= config.bin %> <%= command.id %> TemplateUploadDocker "];
47
+ static hidden = true;
48
+ static flags = {
49
+ ...commonFlags,
50
+ from: Flags.string({
51
+ char: "f",
52
+ description: "Directory to upload template from, defaults to the current directory",
53
+ required: false,
54
+ }),
55
+ workspaceId: Flags.string({ char: "w", description: "Workspace ID to upload the template to", required: true }),
56
+ designSystemId: Flags.string({
57
+ char: "d",
58
+ description: "Design system ID to upload the template to",
59
+ required: true,
60
+ }),
61
+ };
62
+ get commandId() {
63
+ return TemplateUploadDocker.id;
64
+ }
65
+ get configSchema() {
66
+ return TemplateUploadConfig;
67
+ }
68
+ async run() {
69
+ const apiClient = await this.apiClient();
70
+ const { flags } = await this.parse();
71
+ let pkg;
72
+ try {
73
+ pkg = await readPackageJson();
74
+ }
75
+ catch (error) {
76
+ if (error instanceof Error)
77
+ this.error(`Failed to read or parse package.json: ${error.message}`);
78
+ else
79
+ throw error;
80
+ }
81
+ const buildData = await apiClient.sandboxes.builds.start({
82
+ workspaceId: flags.workspaceId,
83
+ designSystemId: flags.designSystemId,
84
+ name: pkg.name,
85
+ version: pkg.version,
86
+ });
87
+ const url = imageUrl(buildData);
88
+ await this.validateDockerDaemon();
89
+ await this.buildDockerImage(url);
90
+ await this.pushDockerImage(url);
91
+ await this.remoteTemplateBuild(apiClient, buildData.build.id);
92
+ this.log(`✅ Template has been successfully uploaded`);
93
+ }
94
+ async validateDockerDaemon() {
95
+ await exec("docker info").catch(() => {
96
+ this.error(`Docker is not available, please start docker daemon and try again`);
97
+ });
98
+ }
99
+ async buildDockerImage(imageUrl) {
100
+ action.start("🔨 Building docker image");
101
+ const process = exec(`docker build --progress=plain -t ${imageUrl} --pull --platform linux/amd64 -f - .`);
102
+ process.child.stdin.write(dockerfile);
103
+ process.child.stdin.end();
104
+ const result = await process;
105
+ action.stop("done");
106
+ console.log(result.stdout);
107
+ console.log(result.stderr);
108
+ }
109
+ async pushDockerImage(imageUrl) {
110
+ action.start("⬆️ Uploading docker image to Supernova");
111
+ const result = await exec(`docker push ${imageUrl}`);
112
+ action.stop("done");
113
+ console.log(result.stdout);
114
+ console.log(result.stderr);
115
+ }
116
+ async remoteTemplateBuild(client, buildId) {
117
+ action.start("📦 Creating template with the image");
118
+ await client.sandboxes.builds.finalize(buildId);
119
+ const pollIntervalMs = 2000;
120
+ const timeoutMs = 5 * 60 * 1000;
121
+ const startTime = Date.now();
122
+ let build;
123
+ do {
124
+ await sleep(pollIntervalMs);
125
+ build = (await client.sandboxes.builds.get(buildId)).build;
126
+ } while (build.state === "Building" && Date.now() - startTime < timeoutMs);
127
+ if (build.state !== "Success") {
128
+ this.error(`Template creation failed`);
129
+ }
130
+ action.stop("done");
131
+ }
132
+ }
133
+ __decorate([
134
+ SentryTraced(),
135
+ __metadata("design:type", Function),
136
+ __metadata("design:paramtypes", []),
137
+ __metadata("design:returntype", Promise)
138
+ ], TemplateUploadDocker.prototype, "run", null);
139
+ async function readPackageJson() {
140
+ const pkgPath = path.join(process.cwd(), "package.json");
141
+ if (!(await fileExists(pkgPath)))
142
+ throw new Error(`package.json file was not found in the current directory`);
143
+ const raw = await fs.readFile(pkgPath, "utf8");
144
+ const pkg = JSON.parse(raw);
145
+ if (typeof pkg !== "object" || pkg === null)
146
+ throw new Error(`Error parsing package.json: not a json`);
147
+ if (typeof pkg.name !== "string")
148
+ throw new Error(`Error parsing package.json: 'name' must be defined`);
149
+ if (typeof pkg.version !== "string")
150
+ throw new Error(`Error parsing package.json: 'version' must be defined`);
151
+ if (typeof pkg.dependencies !== "object" || pkg.dependencies === null)
152
+ throw new Error(`Error parsing package.json: 'dependencies' must be defined`);
153
+ return pkg;
154
+ }
155
+ function imageUrl(build) {
156
+ return `${build.dockerRegistryDomain}${build.build.dockerImagePath}`;
157
+ }
158
+ //# sourceMappingURL=template-upload-docker.js.map
159
+ //# debugId=af9409d8-4d1b-519b-a0d8-58e14ea316e3
@@ -0,0 +1 @@
1
+ {"version":3,"file":"template-upload-docker.js","sources":["../../src/commands/template-upload-docker.ts"],"sourceRoot":"","sourcesContent":["import { Flags } from \"@oclif/core\"\nimport { action } from \"@oclif/core/ux\"\nimport { SentryTraced } from \"@sentry/nestjs\"\nimport { exec as execCallback } from \"node:child_process\"\nimport * as fs from \"node:fs/promises\"\nimport path from \"node:path\"\nimport { promisify } from \"node:util\"\nimport { z, ZodType } from \"zod\"\n\nimport { commonFlags, SentryCommand } from \"../types/index.js\"\n\nimport { DTOSandboxTemplateBuildCreateResponse, SupernovaApiClient } from \"@supernova-studio/client\"\nimport { sleep } from \"../utils/common.js\"\n\nconst exec = promisify(execCallback)\n\nconst TemplateUploadConfig = z.object({})\n\ntype TemplateUploadConfig = z.infer<typeof TemplateUploadConfig>\n\nasync function fileExists(p: string) {\n try {\n await fs.access(p)\n return true\n } catch {\n return false\n }\n}\n\nconst dockerfile = `\nFROM node:22-slim\n\nRUN apt-get update && apt-get install -y curl && apt-get clean && rm -rf /var/lib/apt/lists/*\n\nWORKDIR /home/user\n\nCOPY . .\nRUN rm -rf node_modules && npm i && npm install -g pm2\n`\n\nexport default class TemplateUploadDocker extends SentryCommand<TemplateUploadConfig> {\n static override args = {}\n static override description = \"Upload custom prototype app sandbox template\"\n static override examples = [\"<%= config.bin %> <%= command.id %> TemplateUploadDocker \"]\n static override hidden: boolean = true\n static override flags = {\n ...commonFlags,\n from: Flags.string({\n char: \"f\",\n description: \"Directory to upload template from, defaults to the current directory\",\n required: false,\n }),\n workspaceId: Flags.string({ char: \"w\", description: \"Workspace ID to upload the template to\", required: true }),\n designSystemId: Flags.string({\n char: \"d\",\n description: \"Design system ID to upload the template to\",\n required: true,\n }),\n }\n\n get commandId(): string {\n return TemplateUploadDocker.id\n }\n\n get configSchema(): ZodType<TemplateUploadConfig> {\n return TemplateUploadConfig\n }\n\n @SentryTraced()\n public async run(): Promise<void> {\n const apiClient = await this.apiClient()\n const { flags } = await this.parse()\n\n // Read package json\n let pkg\n try {\n pkg = await readPackageJson()\n } catch (error) {\n if (error instanceof Error) this.error(`Failed to read or parse package.json: ${error.message}`)\n else throw error\n }\n\n //\n // From here\n //\n\n // Request build\n const buildData = await apiClient.sandboxes.builds.start({\n workspaceId: flags.workspaceId,\n designSystemId: flags.designSystemId,\n name: pkg.name,\n version: pkg.version,\n })\n\n // Build image\n const url = imageUrl(buildData)\n\n await this.validateDockerDaemon()\n await this.buildDockerImage(url)\n await this.pushDockerImage(url)\n await this.remoteTemplateBuild(apiClient, buildData.build.id)\n\n this.log(`✅ Template has been successfully uploaded`)\n\n // // Create a new build\n\n // try {\n // await buildAndUpload(apiClient, buildData)\n // } catch (e) {\n // // TODO Artem: mark build as failed\n // // TODO Artem: mark\n // }\n }\n\n private async validateDockerDaemon() {\n await exec(\"docker info\").catch(() => {\n this.error(`Docker is not available, please start docker daemon and try again`)\n })\n }\n\n private async buildDockerImage(imageUrl: string) {\n action.start(\"🔨 Building docker image\")\n\n const process = exec(`docker build --progress=plain -t ${imageUrl} --pull --platform linux/amd64 -f - .`)\n process.child.stdin!.write(dockerfile)\n process.child.stdin!.end()\n\n const result = await process\n\n action.stop(\"done\")\n\n console.log(result.stdout)\n console.log(result.stderr)\n }\n\n private async pushDockerImage(imageUrl: string) {\n action.start(\"⬆️ Uploading docker image to Supernova\")\n const result = await exec(`docker push ${imageUrl}`)\n action.stop(\"done\")\n\n console.log(result.stdout)\n console.log(result.stderr)\n }\n\n private async remoteTemplateBuild(client: SupernovaApiClient, buildId: string) {\n // Poll every 2 seconds for roughly 5 minutes\n action.start(\"📦 Creating template with the image\")\n\n // Trigger remote build phase\n await client.sandboxes.builds.finalize(buildId)\n\n // Await remote build\n const pollIntervalMs = 2000\n const timeoutMs = 5 * 60 * 1000\n\n const startTime = Date.now()\n\n let build\n do {\n await sleep(pollIntervalMs)\n build = (await client.sandboxes.builds.get(buildId)).build\n } while (build.state === \"Building\" && Date.now() - startTime < timeoutMs)\n\n // Verify build state\n if (build.state !== \"Success\") {\n this.error(`Template creation failed`)\n }\n\n action.stop(\"done\")\n }\n}\n\ntype PackageJson = { name: string; version: string; dependencies: Record<string, string> }\n\nasync function readPackageJson(): Promise<PackageJson> {\n const pkgPath = path.join(process.cwd(), \"package.json\")\n\n if (!(await fileExists(pkgPath))) throw new Error(`package.json file was not found in the current directory`)\n\n const raw = await fs.readFile(pkgPath, \"utf8\")\n const pkg = JSON.parse(raw)\n\n if (typeof pkg !== \"object\" || pkg === null) throw new Error(`Error parsing package.json: not a json`)\n\n if (typeof pkg.name !== \"string\") throw new Error(`Error parsing package.json: 'name' must be defined`)\n if (typeof pkg.version !== \"string\") throw new Error(`Error parsing package.json: 'version' must be defined`)\n if (typeof pkg.dependencies !== \"object\" || pkg.dependencies === null)\n throw new Error(`Error parsing package.json: 'dependencies' must be defined`)\n\n return pkg\n}\n\nfunction imageUrl(build: DTOSandboxTemplateBuildCreateResponse) {\n return `${build.dockerRegistryDomain}${build.build.dockerImagePath}`\n}\n"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAA;AACnC,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAA;AACvC,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAC7C,OAAO,EAAE,IAAI,IAAI,YAAY,EAAE,MAAM,oBAAoB,CAAA;AACzD,OAAO,KAAK,EAAE,MAAM,kBAAkB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AAiD,CAAC;;;;;;uBAAiU,CAAC;kBAAsC,CAAC;;;CADp3/qV"}
1
+ {"version":3,"file":"user.service.d.ts","sourceRoot":"","sources":["../../src/services/user.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAA;AAE7D,qBAAa,WAAW;IACV,OAAO,CAAC,QAAQ,CAAC,MAAM;gBAAN,MAAM,EAAE,kBAAkB;IAEvD,KAAK;;;;;;;wBAIwr++d,CAAC;sBAA4C,CAAC;0BAAgD,CAAC;+BAAmC,CAAC;uCAA6D,CAAC;8CAAoE,CAAC;8BAAoD,CAAC;4BAAoG,CAAC;yBAA+C,CAAC;4BAAkD,CAAC;oCAA+G,CAAC;sCAA4D,CAAC;iDAAuE,CAAC;4BAAmD,CAAC;iDAAuE,CAAC;;qBAA2E,CAAC;mCAAuC,CAAC;+BAAqD,CAAC;4BAAkD,CAAC;sCAA4D,CAAC;4CAAmE,CAAC;qCAA2D,CAAC;iCAAuD,CAAC;0BAAiD,CAAC;;2BAA8M,CAAC;mCAAuC,CAAC;+BAAqD,CAAC;4BAAkD,CAAC;sCAA4D,CAAC;4CAAmE,CAAC;qCAA2D,CAAC;iCAAuD,CAAC;0BAAiD,CAAC;;;;;;uBAAiU,CAAC;kBAAsC,CAAC;;;CADtij/d"}
@@ -501,6 +501,57 @@
501
501
  "sync-tokens.js"
502
502
  ]
503
503
  },
504
+ "template-upload-docker": {
505
+ "aliases": [],
506
+ "args": {},
507
+ "description": "Upload custom prototype app sandbox template",
508
+ "examples": [
509
+ "<%= config.bin %> <%= command.id %> TemplateUploadDocker "
510
+ ],
511
+ "flags": {
512
+ "from": {
513
+ "char": "f",
514
+ "description": "Directory to upload template from, defaults to the current directory",
515
+ "name": "from",
516
+ "required": false,
517
+ "hasDynamicHelp": false,
518
+ "multiple": false,
519
+ "type": "option"
520
+ },
521
+ "workspaceId": {
522
+ "char": "w",
523
+ "description": "Workspace ID to upload the template to",
524
+ "name": "workspaceId",
525
+ "required": true,
526
+ "hasDynamicHelp": false,
527
+ "multiple": false,
528
+ "type": "option"
529
+ },
530
+ "designSystemId": {
531
+ "char": "d",
532
+ "description": "Design system ID to upload the template to",
533
+ "name": "designSystemId",
534
+ "required": true,
535
+ "hasDynamicHelp": false,
536
+ "multiple": false,
537
+ "type": "option"
538
+ }
539
+ },
540
+ "hasDynamicHelp": false,
541
+ "hidden": true,
542
+ "hiddenAliases": [],
543
+ "id": "template-upload-docker",
544
+ "pluginAlias": "@supernovaio/cli",
545
+ "pluginName": "@supernovaio/cli",
546
+ "pluginType": "core",
547
+ "strict": true,
548
+ "isESM": true,
549
+ "relativePath": [
550
+ "dist",
551
+ "commands",
552
+ "template-upload-docker.js"
553
+ ]
554
+ },
504
555
  "template-upload": {
505
556
  "aliases": [],
506
557
  "args": {},
@@ -557,5 +608,5 @@
557
608
  ]
558
609
  }
559
610
  },
560
- "version": "2.0.13"
611
+ "version": "2.0.14"
561
612
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@supernovaio/cli",
3
3
  "description": "Supernova.io Command Line Interface",
4
- "version": "2.0.13",
4
+ "version": "2.0.14",
5
5
  "author": "Supernova.io",
6
6
  "bin": {
7
7
  "supernova": "./bin/run"
@@ -16,7 +16,7 @@
16
16
  "@sentry/node": "^9.9.0",
17
17
  "@sentry/profiling-node": "^9.9.0",
18
18
  "@sindresorhus/slugify": "^2.2.1",
19
- "@supernova-studio/client": "1.48.8",
19
+ "@supernova-studio/client": "1.50.6",
20
20
  "@supernova-studio/pulsar-core": "2.6.13",
21
21
  "@supernova-studio/pulsar-language": "^2.6.12",
22
22
  "@supernovaio/code-analyzer": "^1.0.1-alpha.2",