@superblocksteam/cli 2.0.129 → 2.0.130-next.0
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/README.md +1 -1
- package/dist/{acorn-QSWNZOFP.js → acorn-EIVCA5KI.js} +3 -3
- package/dist/{angular-DHY3SEYB.js → angular-ZI3WOILR.js} +3 -3
- package/dist/{api-VUIRZDBP.js → api-WJS3DAJX.js} +4 -4
- package/dist/{babel-GASJSHSO.js → babel-HTLPYRLD.js} +3 -3
- package/dist/{chunk-EGM37OQF.js → chunk-6VFLSGDN.js} +2 -2
- package/dist/{chunk-RABHHN5M.js → chunk-A5FURMJX.js} +3 -3
- package/dist/{chunk-7QCZIAE3.js → chunk-D4HIK2GJ.js} +6 -6
- package/dist/{chunk-UNRUYGVR.js → chunk-E2SVRGEH.js} +3 -3
- package/dist/{chunk-CT4JPEBI.js → chunk-GOFUJ2AG.js} +4 -4
- package/dist/{chunk-U6O6JKMB.js → chunk-HMXDYMYV.js} +3 -3
- package/dist/{chunk-WC2YCWOJ.js → chunk-HR2F24F5.js} +4 -4
- package/dist/{chunk-HCQRUSQE.js → chunk-ILX5T2IO.js} +115 -20
- package/dist/{chunk-HCQRUSQE.js.map → chunk-ILX5T2IO.js.map} +1 -1
- package/dist/{chunk-ETHLIHQN.js → chunk-ISZCKU4B.js} +4 -4
- package/dist/{chunk-CH75SIZH.js → chunk-OGDGQ2PN.js} +4 -4
- package/dist/{chunk-EB4E42MD.js → chunk-PQ54MZVY.js} +3 -3
- package/dist/{chunk-ZRBMSD5I.js → chunk-QA5FLQ3P.js} +3 -3
- package/dist/{chunk-CLFZWWA4.js → chunk-RJATMZXQ.js} +6567 -2975
- package/dist/{chunk-CLFZWWA4.js.map → chunk-RJATMZXQ.js.map} +1 -1
- package/dist/{chunk-IAOLN6TE.js → chunk-VZBG3KKO.js} +3 -3
- package/dist/{chunk-VSBRAS53.js → chunk-W25HYL6C.js} +3 -3
- package/dist/{chunk-PBNML3U3.js → chunk-XBHQTUMW.js} +3 -3
- package/dist/{chunk-ZKLX2TF6.js → chunk-Z5A7GY7B.js} +3 -3
- package/dist/{cli-truncate-SGCWVQL7.js → cli-truncate-GHVTGJXO.js} +5 -5
- package/dist/commands/dev-parent.js +236 -13
- package/dist/commands/dev-parent.js.map +4 -4
- package/dist/{dd-trace-MVYTHNWK.js → dd-trace-YAWRQ5EZ.js} +7 -7
- package/dist/{dist-BPLLMMH5.js → dist-TXXS6BKN.js} +13 -13
- package/dist/{embedded-playwright-mcp-server-NX4VPFKL.js → embedded-playwright-mcp-server-4UYBA4W6.js} +3 -3
- package/dist/{enquirer-67ACZ6H7.js → enquirer-2MRXSM6K.js} +4 -4
- package/dist/{estree-6IHM4FJN.js → estree-ZBMBDQAY.js} +3 -3
- package/dist/{flow-QQLJLSKU.js → flow-2ZNURIEE.js} +3 -3
- package/dist/{getMachineId-bsd-LBVX3ZHR.js → getMachineId-bsd-DXDSHGIE.js} +5 -5
- package/dist/{getMachineId-darwin-JWMNMYIC.js → getMachineId-darwin-K5OI2B3N.js} +5 -5
- package/dist/{getMachineId-linux-X6FYAGRD.js → getMachineId-linux-7MLYPCC7.js} +4 -4
- package/dist/{getMachineId-unsupported-5S3Q7BMR.js → getMachineId-unsupported-IKZRQ3MK.js} +4 -4
- package/dist/{getMachineId-win-2UEEWMOJ.js → getMachineId-win-5IHDHKM5.js} +5 -5
- package/dist/{glimmer-YINHMTOC.js → glimmer-LX7HAVG6.js} +3 -3
- package/dist/{graphql-KAMTCTIJ.js → graphql-EHBPTXKK.js} +3 -3
- package/dist/{html-VKMCUGUM.js → html-MB6KSJUN.js} +3 -3
- package/dist/{http-LOAAFORX.js → http-RBFGWTRX.js} +12 -12
- package/dist/index.js +132 -75
- package/dist/index.js.map +1 -1
- package/dist/{jiti-GV55T5J6.js → jiti-Q3RXB6Y7.js} +3 -3
- package/dist/{log-update-G4JSB323.js → log-update-JRCOAYY2.js} +6 -6
- package/dist/{markdown-2TJTXEMG.js → markdown-W55LWCO3.js} +3 -3
- package/dist/{meriyah-HKBYUY4P.js → meriyah-YVBIMQDI.js} +3 -3
- package/dist/migration-templates/app-fullstack/css.d.ts +3 -0
- package/dist/migration-templates/app-fullstack/package.json +2 -2
- package/dist/{postcss-MT55EDUP.js → postcss-JBENB6QU.js} +3 -3
- package/dist/{read-pkg-ZFRXLQYD.js → read-pkg-3DM6HDIL.js} +5 -5
- package/dist/{spans-BSDMAZHA.js → spans-UZF3APNT.js} +4 -4
- package/dist/{src-K7B55BJR.js → src-S7DFYQDZ.js} +3 -3
- package/dist/{token-D4W2TY76.js → token-64CRCULC.js} +5 -5
- package/dist/{token-util-DE2LUHKB.js → token-util-2QIXH643.js} +5 -5
- package/dist/{typescript-OBOFG5TQ.js → typescript-GJ4FX6G3.js} +3 -3
- package/dist/{wrap-ansi-HN7FYF5E.js → wrap-ansi-H3UZAKUB.js} +5 -5
- package/dist/{yaml-XTRA2PRF.js → yaml-FZJ4633S.js} +3 -3
- package/oclif.manifest.json +1 -1
- package/package.json +8 -8
- /package/dist/{acorn-QSWNZOFP.js.map → acorn-EIVCA5KI.js.map} +0 -0
- /package/dist/{angular-DHY3SEYB.js.map → angular-ZI3WOILR.js.map} +0 -0
- /package/dist/{api-VUIRZDBP.js.map → api-WJS3DAJX.js.map} +0 -0
- /package/dist/{babel-GASJSHSO.js.map → babel-HTLPYRLD.js.map} +0 -0
- /package/dist/{chunk-EGM37OQF.js.map → chunk-6VFLSGDN.js.map} +0 -0
- /package/dist/{chunk-RABHHN5M.js.map → chunk-A5FURMJX.js.map} +0 -0
- /package/dist/{chunk-7QCZIAE3.js.map → chunk-D4HIK2GJ.js.map} +0 -0
- /package/dist/{chunk-UNRUYGVR.js.map → chunk-E2SVRGEH.js.map} +0 -0
- /package/dist/{chunk-CT4JPEBI.js.map → chunk-GOFUJ2AG.js.map} +0 -0
- /package/dist/{chunk-U6O6JKMB.js.map → chunk-HMXDYMYV.js.map} +0 -0
- /package/dist/{chunk-WC2YCWOJ.js.map → chunk-HR2F24F5.js.map} +0 -0
- /package/dist/{chunk-ETHLIHQN.js.map → chunk-ISZCKU4B.js.map} +0 -0
- /package/dist/{chunk-CH75SIZH.js.map → chunk-OGDGQ2PN.js.map} +0 -0
- /package/dist/{chunk-EB4E42MD.js.map → chunk-PQ54MZVY.js.map} +0 -0
- /package/dist/{chunk-ZRBMSD5I.js.map → chunk-QA5FLQ3P.js.map} +0 -0
- /package/dist/{chunk-IAOLN6TE.js.map → chunk-VZBG3KKO.js.map} +0 -0
- /package/dist/{chunk-VSBRAS53.js.map → chunk-W25HYL6C.js.map} +0 -0
- /package/dist/{chunk-PBNML3U3.js.map → chunk-XBHQTUMW.js.map} +0 -0
- /package/dist/{chunk-ZKLX2TF6.js.map → chunk-Z5A7GY7B.js.map} +0 -0
- /package/dist/{cli-truncate-SGCWVQL7.js.map → cli-truncate-GHVTGJXO.js.map} +0 -0
- /package/dist/{dd-trace-MVYTHNWK.js.map → dd-trace-YAWRQ5EZ.js.map} +0 -0
- /package/dist/{dist-BPLLMMH5.js.map → dist-TXXS6BKN.js.map} +0 -0
- /package/dist/{embedded-playwright-mcp-server-NX4VPFKL.js.map → embedded-playwright-mcp-server-4UYBA4W6.js.map} +0 -0
- /package/dist/{enquirer-67ACZ6H7.js.map → enquirer-2MRXSM6K.js.map} +0 -0
- /package/dist/{estree-6IHM4FJN.js.map → estree-ZBMBDQAY.js.map} +0 -0
- /package/dist/{flow-QQLJLSKU.js.map → flow-2ZNURIEE.js.map} +0 -0
- /package/dist/{getMachineId-bsd-LBVX3ZHR.js.map → getMachineId-bsd-DXDSHGIE.js.map} +0 -0
- /package/dist/{getMachineId-darwin-JWMNMYIC.js.map → getMachineId-darwin-K5OI2B3N.js.map} +0 -0
- /package/dist/{getMachineId-linux-X6FYAGRD.js.map → getMachineId-linux-7MLYPCC7.js.map} +0 -0
- /package/dist/{getMachineId-unsupported-5S3Q7BMR.js.map → getMachineId-unsupported-IKZRQ3MK.js.map} +0 -0
- /package/dist/{getMachineId-win-2UEEWMOJ.js.map → getMachineId-win-5IHDHKM5.js.map} +0 -0
- /package/dist/{glimmer-YINHMTOC.js.map → glimmer-LX7HAVG6.js.map} +0 -0
- /package/dist/{graphql-KAMTCTIJ.js.map → graphql-EHBPTXKK.js.map} +0 -0
- /package/dist/{html-VKMCUGUM.js.map → html-MB6KSJUN.js.map} +0 -0
- /package/dist/{http-LOAAFORX.js.map → http-RBFGWTRX.js.map} +0 -0
- /package/dist/{jiti-GV55T5J6.js.map → jiti-Q3RXB6Y7.js.map} +0 -0
- /package/dist/{log-update-G4JSB323.js.map → log-update-JRCOAYY2.js.map} +0 -0
- /package/dist/{markdown-2TJTXEMG.js.map → markdown-W55LWCO3.js.map} +0 -0
- /package/dist/{meriyah-HKBYUY4P.js.map → meriyah-YVBIMQDI.js.map} +0 -0
- /package/dist/{postcss-MT55EDUP.js.map → postcss-JBENB6QU.js.map} +0 -0
- /package/dist/{read-pkg-ZFRXLQYD.js.map → read-pkg-3DM6HDIL.js.map} +0 -0
- /package/dist/{spans-BSDMAZHA.js.map → spans-UZF3APNT.js.map} +0 -0
- /package/dist/{src-K7B55BJR.js.map → src-S7DFYQDZ.js.map} +0 -0
- /package/dist/{token-D4W2TY76.js.map → token-64CRCULC.js.map} +0 -0
- /package/dist/{token-util-DE2LUHKB.js.map → token-util-2QIXH643.js.map} +0 -0
- /package/dist/{typescript-OBOFG5TQ.js.map → typescript-GJ4FX6G3.js.map} +0 -0
- /package/dist/{wrap-ansi-HN7FYF5E.js.map → wrap-ansi-H3UZAKUB.js.map} +0 -0
- /package/dist/{yaml-XTRA2PRF.js.map → yaml-FZJ4633S.js.map} +0 -0
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
if (typeof process === 'object' && process !== null &&
|
|
2
2
|
process.env !== null && typeof process.env === 'object') {
|
|
3
3
|
process.env.DD_GIT_REPOSITORY_URL = 'https://token@github.com/superblocksteam/superblocks.git';
|
|
4
|
-
process.env.DD_GIT_COMMIT_SHA = '
|
|
4
|
+
process.env.DD_GIT_COMMIT_SHA = 'c1adb1813d85d91d7b88389107ac6cfff9ba6513';
|
|
5
5
|
}
|
|
6
6
|
import { createRequire as $dd_createRequire } from 'module';
|
|
7
7
|
import { fileURLToPath as $dd_fileURLToPath } from 'url';
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
configPathForClient,
|
|
16
16
|
labelForClient,
|
|
17
17
|
mergeMcpConfig
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-GOFUJ2AG.js";
|
|
19
19
|
import {
|
|
20
20
|
AUTO_UPGRADE_EXIT_CODE,
|
|
21
21
|
AuthHotReloadServer,
|
|
@@ -86,28 +86,28 @@ import {
|
|
|
86
86
|
writeApplicationToDisk,
|
|
87
87
|
writeResourceToDisk,
|
|
88
88
|
yellow
|
|
89
|
-
} from "./chunk-
|
|
90
|
-
import "./chunk-
|
|
89
|
+
} from "./chunk-RJATMZXQ.js";
|
|
90
|
+
import "./chunk-XBHQTUMW.js";
|
|
91
91
|
import {
|
|
92
92
|
require_enquirer
|
|
93
|
-
} from "./chunk-
|
|
93
|
+
} from "./chunk-PQ54MZVY.js";
|
|
94
94
|
import {
|
|
95
95
|
init_lodash,
|
|
96
96
|
isEmpty_default,
|
|
97
97
|
require_lib
|
|
98
|
-
} from "./chunk-
|
|
98
|
+
} from "./chunk-Z5A7GY7B.js";
|
|
99
99
|
import {
|
|
100
100
|
require_rfdc
|
|
101
|
-
} from "./chunk-
|
|
102
|
-
import "./chunk-
|
|
103
|
-
import "./chunk-
|
|
104
|
-
import "./chunk-
|
|
105
|
-
import "./chunk-
|
|
101
|
+
} from "./chunk-D4HIK2GJ.js";
|
|
102
|
+
import "./chunk-VZBG3KKO.js";
|
|
103
|
+
import "./chunk-QA5FLQ3P.js";
|
|
104
|
+
import "./chunk-A5FURMJX.js";
|
|
105
|
+
import "./chunk-E2SVRGEH.js";
|
|
106
106
|
import {
|
|
107
107
|
__commonJS,
|
|
108
108
|
__toESM,
|
|
109
109
|
init_cjs_shims
|
|
110
|
-
} from "./chunk-
|
|
110
|
+
} from "./chunk-6VFLSGDN.js";
|
|
111
111
|
|
|
112
112
|
// ../../../../node_modules/.pnpm/eventemitter3@5.0.1/node_modules/eventemitter3/index.js
|
|
113
113
|
var require_eventemitter3 = __commonJS({
|
|
@@ -1019,7 +1019,7 @@ async function createPrompt(options, settings) {
|
|
|
1019
1019
|
enquirer3 = settings.enquirer;
|
|
1020
1020
|
} else {
|
|
1021
1021
|
try {
|
|
1022
|
-
enquirer3 = await import("./enquirer-
|
|
1022
|
+
enquirer3 = await import("./enquirer-2MRXSM6K.js").then((imported) => imported.default ? new imported.default() : new imported());
|
|
1023
1023
|
} catch (e) {
|
|
1024
1024
|
if (this instanceof TaskWrapper) {
|
|
1025
1025
|
this.task.prompt = new PromptError("Enquirer is a peer dependency that must be installed separately.");
|
|
@@ -1227,9 +1227,9 @@ var _DefaultRenderer = class {
|
|
|
1227
1227
|
return typeof bottomBar === "number" && bottomBar !== 0 || typeof bottomBar === "boolean" && bottomBar !== false || !task.hasTitle();
|
|
1228
1228
|
}
|
|
1229
1229
|
async render() {
|
|
1230
|
-
const { createLogUpdate } = await import("./log-update-
|
|
1231
|
-
const { default: truncate } = await import("./cli-truncate-
|
|
1232
|
-
const { default: wrap } = await import("./wrap-ansi-
|
|
1230
|
+
const { createLogUpdate } = await import("./log-update-JRCOAYY2.js");
|
|
1231
|
+
const { default: truncate } = await import("./cli-truncate-GHVTGJXO.js");
|
|
1232
|
+
const { default: wrap } = await import("./wrap-ansi-H3UZAKUB.js");
|
|
1233
1233
|
this.updater = createLogUpdate(this.logger.process.stdout);
|
|
1234
1234
|
this.truncate = truncate;
|
|
1235
1235
|
this.wrap = wrap;
|
|
@@ -3924,9 +3924,9 @@ import { createLogger, build } from "vite";
|
|
|
3924
3924
|
// src/productionCssPlugin.mts
|
|
3925
3925
|
init_cjs_shims();
|
|
3926
3926
|
import path6 from "node:path";
|
|
3927
|
-
function getInjector(
|
|
3927
|
+
function getInjector(path20) {
|
|
3928
3928
|
return `(() => {
|
|
3929
|
-
const link = document.createElement("link"); link.rel = "stylesheet"; link.href = new URL("${
|
|
3929
|
+
const link = document.createElement("link"); link.rel = "stylesheet"; link.href = new URL("${path20}", import.meta.url).toString();
|
|
3930
3930
|
document.querySelector("head").appendChild(link);
|
|
3931
3931
|
})();`;
|
|
3932
3932
|
}
|
|
@@ -4794,11 +4794,49 @@ var Deploy = class _Deploy extends AuthenticatedCommand {
|
|
|
4794
4794
|
// src/commands/dev.mts
|
|
4795
4795
|
init_cjs_shims();
|
|
4796
4796
|
import * as child_process from "node:child_process";
|
|
4797
|
-
import * as
|
|
4797
|
+
import * as fs7 from "node:fs";
|
|
4798
4798
|
import * as http from "node:http";
|
|
4799
4799
|
import { basename, dirname, join as join3, resolve } from "node:path";
|
|
4800
4800
|
import { Flags as Flags6, ux as ux4 } from "@oclif/core";
|
|
4801
4801
|
var import_util13 = __toESM(require_dist2(), 1);
|
|
4802
|
+
|
|
4803
|
+
// src/commands/warm-activation-marker.mts
|
|
4804
|
+
init_cjs_shims();
|
|
4805
|
+
import fs6 from "node:fs";
|
|
4806
|
+
import os from "node:os";
|
|
4807
|
+
import path11 from "node:path";
|
|
4808
|
+
var WARM_ACTIVATION_MARKER_FILE = "warm-activation.json";
|
|
4809
|
+
function warmActivationMarkerPath(appDir) {
|
|
4810
|
+
return path11.join(
|
|
4811
|
+
appDir,
|
|
4812
|
+
"..",
|
|
4813
|
+
"..",
|
|
4814
|
+
".superblocks",
|
|
4815
|
+
WARM_ACTIVATION_MARKER_FILE
|
|
4816
|
+
);
|
|
4817
|
+
}
|
|
4818
|
+
function resolveMarkerTemplateName(payloadTemplateName, appDir) {
|
|
4819
|
+
if (!payloadTemplateName) {
|
|
4820
|
+
return null;
|
|
4821
|
+
}
|
|
4822
|
+
return path11.basename(appDir) === payloadTemplateName ? payloadTemplateName : null;
|
|
4823
|
+
}
|
|
4824
|
+
function writeWarmActivationMarker(args) {
|
|
4825
|
+
const markerPath = warmActivationMarkerPath(args.appDir);
|
|
4826
|
+
const marker = {
|
|
4827
|
+
version: 1,
|
|
4828
|
+
podName: args.podName || os.hostname(),
|
|
4829
|
+
cwd: args.appDir,
|
|
4830
|
+
templateName: args.templateName,
|
|
4831
|
+
hostname: args.hostname,
|
|
4832
|
+
activatedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
4833
|
+
};
|
|
4834
|
+
fs6.mkdirSync(path11.dirname(markerPath), { recursive: true });
|
|
4835
|
+
fs6.writeFileSync(markerPath, JSON.stringify(marker));
|
|
4836
|
+
return markerPath;
|
|
4837
|
+
}
|
|
4838
|
+
|
|
4839
|
+
// src/commands/dev.mts
|
|
4802
4840
|
function extractTraceparent(headers) {
|
|
4803
4841
|
const tp = headers["traceparent"];
|
|
4804
4842
|
const ts = headers["tracestate"];
|
|
@@ -5329,7 +5367,7 @@ var Dev = class _Dev extends AuthenticatedCommand {
|
|
|
5329
5367
|
"..",
|
|
5330
5368
|
activationConfig.templateName
|
|
5331
5369
|
);
|
|
5332
|
-
if (
|
|
5370
|
+
if (fs7.existsSync(targetDir)) {
|
|
5333
5371
|
logger.info(
|
|
5334
5372
|
`Switching template directory: ${currentDir} -> ${activationConfig.templateName}`
|
|
5335
5373
|
);
|
|
@@ -5342,8 +5380,8 @@ var Dev = class _Dev extends AuthenticatedCommand {
|
|
|
5342
5380
|
}
|
|
5343
5381
|
}
|
|
5344
5382
|
const authFilePath = (0, import_util13.resolveAuthFilePath)();
|
|
5345
|
-
|
|
5346
|
-
|
|
5383
|
+
fs7.mkdirSync(dirname(authFilePath), { recursive: true });
|
|
5384
|
+
fs7.writeFileSync(
|
|
5347
5385
|
authFilePath,
|
|
5348
5386
|
JSON.stringify({
|
|
5349
5387
|
superblocksBaseUrl: activationConfig.baseUrl,
|
|
@@ -5355,8 +5393,8 @@ var Dev = class _Dev extends AuthenticatedCommand {
|
|
|
5355
5393
|
".superblocks",
|
|
5356
5394
|
"superblocks.json"
|
|
5357
5395
|
);
|
|
5358
|
-
|
|
5359
|
-
|
|
5396
|
+
fs7.mkdirSync(dirname(appConfigPath), { recursive: true });
|
|
5397
|
+
fs7.writeFileSync(
|
|
5360
5398
|
appConfigPath,
|
|
5361
5399
|
JSON.stringify({
|
|
5362
5400
|
configType: "APPLICATION_V2",
|
|
@@ -5370,14 +5408,33 @@ var Dev = class _Dev extends AuthenticatedCommand {
|
|
|
5370
5408
|
".superblocks",
|
|
5371
5409
|
"dev-environment.json"
|
|
5372
5410
|
);
|
|
5373
|
-
|
|
5374
|
-
|
|
5411
|
+
fs7.mkdirSync(dirname(devEnvPath), { recursive: true });
|
|
5412
|
+
fs7.writeFileSync(
|
|
5375
5413
|
devEnvPath,
|
|
5376
5414
|
JSON.stringify({
|
|
5377
5415
|
configType: "DEV_ENVIRONMENT",
|
|
5378
5416
|
branch: activationConfig.branch
|
|
5379
5417
|
})
|
|
5380
5418
|
);
|
|
5419
|
+
try {
|
|
5420
|
+
writeWarmActivationMarker({
|
|
5421
|
+
appDir: process.cwd(),
|
|
5422
|
+
podName: process.env.HOSTNAME ?? null,
|
|
5423
|
+
// Record the template the cwd actually represents, not the requested
|
|
5424
|
+
// one: if activation's chdir was skipped (sibling dir missing) the
|
|
5425
|
+
// requested name would mismatch marker.cwd on restart.
|
|
5426
|
+
templateName: resolveMarkerTemplateName(
|
|
5427
|
+
activationConfig.templateName,
|
|
5428
|
+
process.cwd()
|
|
5429
|
+
),
|
|
5430
|
+
hostname: activationConfig.hostname ?? null
|
|
5431
|
+
});
|
|
5432
|
+
} catch (error) {
|
|
5433
|
+
logger.error(
|
|
5434
|
+
"Failed to write warm-activation marker; in-place restart will fall back to pod swap",
|
|
5435
|
+
getErrorMeta(error)
|
|
5436
|
+
);
|
|
5437
|
+
}
|
|
5381
5438
|
this.forcePackageInstall = false;
|
|
5382
5439
|
this.packageJsonSnapshotBeforeRestore = void 0;
|
|
5383
5440
|
if (activationConfig.downloadURL) {
|
|
@@ -5651,7 +5708,7 @@ var Dev = class _Dev extends AuthenticatedCommand {
|
|
|
5651
5708
|
// src/commands/hidden/application/build.mts
|
|
5652
5709
|
init_cjs_shims();
|
|
5653
5710
|
var import_fs_extra5 = __toESM(require_lib(), 1);
|
|
5654
|
-
import
|
|
5711
|
+
import path12 from "node:path";
|
|
5655
5712
|
import { Command as Command5, Flags as Flags7, ux as ux5 } from "@oclif/core";
|
|
5656
5713
|
var Build = class _Build extends Command5 {
|
|
5657
5714
|
static description = "[EXPERIMENTAL] Build builds a (deploy-ready) application bundle from your application source code.";
|
|
@@ -5684,7 +5741,7 @@ var Build = class _Build extends Command5 {
|
|
|
5684
5741
|
async run() {
|
|
5685
5742
|
const { flags } = await this.parse(_Build);
|
|
5686
5743
|
ux5.action.start("Validating source directory...");
|
|
5687
|
-
const rootPath =
|
|
5744
|
+
const rootPath = path12.resolve(flags.root);
|
|
5688
5745
|
const srcExists = await import_fs_extra5.default.pathExists(rootPath);
|
|
5689
5746
|
if (!srcExists) {
|
|
5690
5747
|
ux5.action.stop();
|
|
@@ -5694,9 +5751,9 @@ var Build = class _Build extends Command5 {
|
|
|
5694
5751
|
this.exit(1);
|
|
5695
5752
|
}
|
|
5696
5753
|
ux5.action.start("Validating destination directory...");
|
|
5697
|
-
let outDirPath =
|
|
5754
|
+
let outDirPath = path12.resolve(flags.outDir);
|
|
5698
5755
|
if (outDirPath === "") {
|
|
5699
|
-
outDirPath =
|
|
5756
|
+
outDirPath = path12.join(rootPath, "dist");
|
|
5700
5757
|
}
|
|
5701
5758
|
const destExists = await import_fs_extra5.default.pathExists(outDirPath);
|
|
5702
5759
|
if (destExists && (await import_fs_extra5.default.readdir(outDirPath)).length > 0) {
|
|
@@ -5886,7 +5943,7 @@ var SyncCheck = class _SyncCheck extends Command7 {
|
|
|
5886
5943
|
|
|
5887
5944
|
// src/commands/init.mts
|
|
5888
5945
|
init_cjs_shims();
|
|
5889
|
-
import
|
|
5946
|
+
import path13 from "path";
|
|
5890
5947
|
import { Args as Args5, Flags as Flags10 } from "@oclif/core";
|
|
5891
5948
|
var import_fs_extra7 = __toESM(require_lib(), 1);
|
|
5892
5949
|
init_lodash();
|
|
@@ -6035,7 +6092,7 @@ var Initialize = class _Initialize extends AuthenticatedCommand {
|
|
|
6035
6092
|
title: "Writing resources to a disk...",
|
|
6036
6093
|
task: async (ctx, task) => {
|
|
6037
6094
|
const subtasks = [];
|
|
6038
|
-
const superblocksRootPath = ctx.superblocksRootConfigPath ?
|
|
6095
|
+
const superblocksRootPath = ctx.superblocksRootConfigPath ? path13.resolve(path13.dirname(ctx.superblocksRootConfigPath), "..") : void 0;
|
|
6039
6096
|
for (const resourceId of ctx.resourceIdsToInitialize) {
|
|
6040
6097
|
const resource = ctx.fetchedResources[resourceId];
|
|
6041
6098
|
if (!resource) {
|
|
@@ -6350,12 +6407,12 @@ var McpServe = class _McpServe extends Command9 {
|
|
|
6350
6407
|
"HTTP transport requires auth token. Pass --http-token <token> or set SUPERBLOCKS_MCP_HTTP_TOKEN."
|
|
6351
6408
|
);
|
|
6352
6409
|
}
|
|
6353
|
-
const { startHttpServer } = await import("./http-
|
|
6410
|
+
const { startHttpServer } = await import("./http-RBFGWTRX.js");
|
|
6354
6411
|
await startHttpServer({ port: flags.port, authToken: httpToken });
|
|
6355
6412
|
await new Promise(() => {
|
|
6356
6413
|
});
|
|
6357
6414
|
} else {
|
|
6358
|
-
const { startServer } = await import("./dist-
|
|
6415
|
+
const { startServer } = await import("./dist-TXXS6BKN.js");
|
|
6359
6416
|
await startServer();
|
|
6360
6417
|
await new Promise((resolve2) => {
|
|
6361
6418
|
process.stdin.once("end", () => resolve2());
|
|
@@ -6442,7 +6499,7 @@ var McpSetup = class _McpSetup extends Command10 {
|
|
|
6442
6499
|
// src/commands/migrate.mts
|
|
6443
6500
|
init_cjs_shims();
|
|
6444
6501
|
import { exec as exec2 } from "node:child_process";
|
|
6445
|
-
import
|
|
6502
|
+
import path14 from "node:path";
|
|
6446
6503
|
import util2 from "node:util";
|
|
6447
6504
|
var import_fs_extra8 = __toESM(require_lib(), 1);
|
|
6448
6505
|
var import_semver5 = __toESM(require_semver(), 1);
|
|
@@ -6483,8 +6540,8 @@ var Migrate = class extends AuthenticatedCommand {
|
|
|
6483
6540
|
task
|
|
6484
6541
|
);
|
|
6485
6542
|
const subtasks = [];
|
|
6486
|
-
const superblocksRootPath =
|
|
6487
|
-
|
|
6543
|
+
const superblocksRootPath = path14.resolve(
|
|
6544
|
+
path14.dirname(ctx.superblocksRootConfigPath),
|
|
6488
6545
|
".."
|
|
6489
6546
|
);
|
|
6490
6547
|
for (const resourceId of resourceIdsToMigrate) {
|
|
@@ -6619,7 +6676,7 @@ var Migrate = class extends AuthenticatedCommand {
|
|
|
6619
6676
|
}
|
|
6620
6677
|
}
|
|
6621
6678
|
async migrateCustomComponentVersion(applicationResource, superblocksRootPath) {
|
|
6622
|
-
const packageJsonPath =
|
|
6679
|
+
const packageJsonPath = path14.join(
|
|
6623
6680
|
superblocksRootPath,
|
|
6624
6681
|
applicationResource.location,
|
|
6625
6682
|
"package.json"
|
|
@@ -6633,7 +6690,7 @@ var Migrate = class extends AuthenticatedCommand {
|
|
|
6633
6690
|
await util2.promisify(exec2)(
|
|
6634
6691
|
`npm install @superblocksteam/custom-components@${this.config.version}`,
|
|
6635
6692
|
{
|
|
6636
|
-
cwd:
|
|
6693
|
+
cwd: path14.join(superblocksRootPath, applicationResource.location)
|
|
6637
6694
|
}
|
|
6638
6695
|
);
|
|
6639
6696
|
} else {
|
|
@@ -6666,7 +6723,7 @@ var Migrate = class extends AuthenticatedCommand {
|
|
|
6666
6723
|
|
|
6667
6724
|
// src/commands/pull.mts
|
|
6668
6725
|
init_cjs_shims();
|
|
6669
|
-
import
|
|
6726
|
+
import path15 from "node:path";
|
|
6670
6727
|
import { Args as Args6, Flags as Flags14 } from "@oclif/core";
|
|
6671
6728
|
var import_util18 = __toESM(require_dist2(), 1);
|
|
6672
6729
|
var Pull = class _Pull extends AuthenticatedCommand {
|
|
@@ -6731,8 +6788,8 @@ var Pull = class _Pull extends AuthenticatedCommand {
|
|
|
6731
6788
|
ctx.superblocksRootConfigPath
|
|
6732
6789
|
] = await (0, import_util18.getSuperblocksMonorepoConfigJson)(true);
|
|
6733
6790
|
ctx.existingSuperblocksResourceConfig = await (0, import_util18.getSuperblocksResourceConfigIfExists)();
|
|
6734
|
-
ctx.superblocksRootPath =
|
|
6735
|
-
|
|
6791
|
+
ctx.superblocksRootPath = path15.resolve(
|
|
6792
|
+
path15.dirname(ctx.superblocksRootConfigPath),
|
|
6736
6793
|
".."
|
|
6737
6794
|
);
|
|
6738
6795
|
} catch {
|
|
@@ -7096,7 +7153,7 @@ Would you like to also delete these resources from your filesystem?`
|
|
|
7096
7153
|
|
|
7097
7154
|
// src/commands/push.mts
|
|
7098
7155
|
init_cjs_shims();
|
|
7099
|
-
import
|
|
7156
|
+
import path16 from "node:path";
|
|
7100
7157
|
import { Args as Args7, Flags as Flags15 } from "@oclif/core";
|
|
7101
7158
|
init_lodash();
|
|
7102
7159
|
var import_util19 = __toESM(require_dist2(), 1);
|
|
@@ -7153,8 +7210,8 @@ var Push = class _Push extends AuthenticatedCommand {
|
|
|
7153
7210
|
ctx.superblocksRootConfigPath
|
|
7154
7211
|
] = await (0, import_util19.getSuperblocksMonorepoConfigJson)(true);
|
|
7155
7212
|
ctx.existingSuperblocksResourceConfig = await (0, import_util19.getSuperblocksResourceConfigIfExists)();
|
|
7156
|
-
ctx.superblocksRootPath =
|
|
7157
|
-
|
|
7213
|
+
ctx.superblocksRootPath = path16.resolve(
|
|
7214
|
+
path16.dirname(ctx.superblocksRootConfigPath),
|
|
7158
7215
|
".."
|
|
7159
7216
|
);
|
|
7160
7217
|
} catch {
|
|
@@ -7358,8 +7415,8 @@ Would you like to also delete these resources from your filesystem?`
|
|
|
7358
7415
|
task: async (ctx, task) => {
|
|
7359
7416
|
task.title = `Validating project structure...`;
|
|
7360
7417
|
const subtasks = [];
|
|
7361
|
-
const superblocksRootPath =
|
|
7362
|
-
|
|
7418
|
+
const superblocksRootPath = path16.resolve(
|
|
7419
|
+
path16.dirname(ctx.superblocksRootConfigPath),
|
|
7363
7420
|
".."
|
|
7364
7421
|
);
|
|
7365
7422
|
for (const resourceId of ctx.resourceIdsToPush) {
|
|
@@ -7389,8 +7446,8 @@ Would you like to also delete these resources from your filesystem?`
|
|
|
7389
7446
|
task: async (ctx, task) => {
|
|
7390
7447
|
task.title = `Pushing resources to branch '${ctx.localBranch.branchName}'...`;
|
|
7391
7448
|
const subtasks = [];
|
|
7392
|
-
const superblocksRootPath =
|
|
7393
|
-
|
|
7449
|
+
const superblocksRootPath = path16.resolve(
|
|
7450
|
+
path16.dirname(ctx.superblocksRootConfigPath),
|
|
7394
7451
|
".."
|
|
7395
7452
|
);
|
|
7396
7453
|
for (const resourceId of ctx.resourceIdsToPush) {
|
|
@@ -7403,7 +7460,7 @@ Would you like to also delete these resources from your filesystem?`
|
|
|
7403
7460
|
let configType;
|
|
7404
7461
|
try {
|
|
7405
7462
|
const applicationConfig2 = await (0, import_util19.getSuperblocksApplicationV2ConfigJson)(
|
|
7406
|
-
|
|
7463
|
+
path16.join(superblocksRootPath, resource.location)
|
|
7407
7464
|
);
|
|
7408
7465
|
configType = applicationConfig2.configType;
|
|
7409
7466
|
} catch {
|
|
@@ -7417,7 +7474,7 @@ Would you like to also delete these resources from your filesystem?`
|
|
|
7417
7474
|
await this.getSdk().pushApplicationCodeMode({
|
|
7418
7475
|
applicationId: resourceId,
|
|
7419
7476
|
branch: ctx.localBranch.branchName,
|
|
7420
|
-
localDirectoryPath:
|
|
7477
|
+
localDirectoryPath: path16.join(
|
|
7421
7478
|
superblocksRootPath,
|
|
7422
7479
|
resource.location
|
|
7423
7480
|
),
|
|
@@ -7613,7 +7670,7 @@ Would you like to also delete these resources from your filesystem?`
|
|
|
7613
7670
|
// src/commands/rm.mts
|
|
7614
7671
|
init_cjs_shims();
|
|
7615
7672
|
var import_fs_extra9 = __toESM(require_lib(), 1);
|
|
7616
|
-
import
|
|
7673
|
+
import path17 from "path";
|
|
7617
7674
|
import { Args as Args8 } from "@oclif/core";
|
|
7618
7675
|
init_lodash();
|
|
7619
7676
|
var import_util20 = __toESM(require_dist2(), 1);
|
|
@@ -7650,8 +7707,8 @@ var Remove = class _Remove extends AuthenticatedCommand {
|
|
|
7650
7707
|
ctx.existingSuperblocksRootConfig,
|
|
7651
7708
|
ctx.superblocksRootConfigPath
|
|
7652
7709
|
] = await (0, import_util20.getSuperblocksMonorepoConfigJson)(true);
|
|
7653
|
-
ctx.superblocksRootPath =
|
|
7654
|
-
|
|
7710
|
+
ctx.superblocksRootPath = path17.resolve(
|
|
7711
|
+
path17.dirname(ctx.superblocksRootConfigPath),
|
|
7655
7712
|
".."
|
|
7656
7713
|
);
|
|
7657
7714
|
} catch {
|
|
@@ -7838,9 +7895,9 @@ function getResourceIdFromLocation(ctx, resourceLocation) {
|
|
|
7838
7895
|
// src/commands/sync.mts
|
|
7839
7896
|
init_cjs_shims();
|
|
7840
7897
|
import { execFile } from "node:child_process";
|
|
7841
|
-
import * as
|
|
7842
|
-
import * as
|
|
7843
|
-
import
|
|
7898
|
+
import * as fs13 from "node:fs/promises";
|
|
7899
|
+
import * as os2 from "node:os";
|
|
7900
|
+
import path18 from "node:path";
|
|
7844
7901
|
import { promisify as promisify2 } from "node:util";
|
|
7845
7902
|
import { Command as Command11, Flags as Flags16 } from "@oclif/core";
|
|
7846
7903
|
var import_util21 = __toESM(require_dist2(), 1);
|
|
@@ -7932,10 +7989,10 @@ var Sync = class _Sync extends Command11 {
|
|
|
7932
7989
|
appRelativePath,
|
|
7933
7990
|
requestedSha
|
|
7934
7991
|
}) {
|
|
7935
|
-
const worktreeBase = await
|
|
7936
|
-
|
|
7992
|
+
const worktreeBase = await fs13.mkdtemp(
|
|
7993
|
+
path18.join(os2.tmpdir(), "superblocks-sync-main-")
|
|
7937
7994
|
);
|
|
7938
|
-
const worktreePath =
|
|
7995
|
+
const worktreePath = path18.join(worktreeBase, "worktree");
|
|
7939
7996
|
const authEnv = await this.getGitFetchAuthEnv(
|
|
7940
7997
|
sdk,
|
|
7941
7998
|
gitRemoteUrl,
|
|
@@ -7970,7 +8027,7 @@ var Sync = class _Sync extends Command11 {
|
|
|
7970
8027
|
`Resolved worktree SHA mismatch. Expected ${sha}, got ${snapshotSha}.`
|
|
7971
8028
|
);
|
|
7972
8029
|
}
|
|
7973
|
-
const snapshotAppPath =
|
|
8030
|
+
const snapshotAppPath = path18.join(worktreePath, appRelativePath);
|
|
7974
8031
|
await (0, import_util21.getSuperblocksApplicationV2ConfigJson)(snapshotAppPath);
|
|
7975
8032
|
const snapshotUploadPath = await this.resolveSnapshotUploadPath({
|
|
7976
8033
|
worktreeBase,
|
|
@@ -7992,7 +8049,7 @@ var Sync = class _Sync extends Command11 {
|
|
|
7992
8049
|
);
|
|
7993
8050
|
} catch {
|
|
7994
8051
|
}
|
|
7995
|
-
await
|
|
8052
|
+
await fs13.rm(worktreeBase, { recursive: true, force: true });
|
|
7996
8053
|
}
|
|
7997
8054
|
}
|
|
7998
8055
|
async resolveRepoRoot(localDirectoryPath) {
|
|
@@ -8012,7 +8069,7 @@ var Sync = class _Sync extends Command11 {
|
|
|
8012
8069
|
return repoRoot;
|
|
8013
8070
|
}
|
|
8014
8071
|
resolveAppRelativePath(repoRoot, appPath) {
|
|
8015
|
-
const relativePath =
|
|
8072
|
+
const relativePath = path18.relative(repoRoot, appPath);
|
|
8016
8073
|
if (relativePath.startsWith("..")) {
|
|
8017
8074
|
throw new Error(
|
|
8018
8075
|
"Current directory must be inside a git repository checkout."
|
|
@@ -8028,11 +8085,11 @@ var Sync = class _Sync extends Command11 {
|
|
|
8028
8085
|
if (appRelativePath !== ".") {
|
|
8029
8086
|
return snapshotAppPath;
|
|
8030
8087
|
}
|
|
8031
|
-
const uploadPath =
|
|
8032
|
-
await
|
|
8088
|
+
const uploadPath = path18.join(worktreeBase, "upload");
|
|
8089
|
+
await fs13.cp(snapshotAppPath, uploadPath, {
|
|
8033
8090
|
recursive: true,
|
|
8034
8091
|
force: true,
|
|
8035
|
-
filter: (sourcePath) =>
|
|
8092
|
+
filter: (sourcePath) => path18.basename(sourcePath) !== ".git"
|
|
8036
8093
|
});
|
|
8037
8094
|
return uploadPath;
|
|
8038
8095
|
}
|
|
@@ -8105,7 +8162,7 @@ var Sync = class _Sync extends Command11 {
|
|
|
8105
8162
|
|
|
8106
8163
|
// src/commands/upload.mts
|
|
8107
8164
|
init_cjs_shims();
|
|
8108
|
-
import
|
|
8165
|
+
import path19 from "node:path";
|
|
8109
8166
|
import { Args as Args9, Flags as Flags17 } from "@oclif/core";
|
|
8110
8167
|
init_lodash();
|
|
8111
8168
|
var import_util22 = __toESM(require_dist2(), 1);
|
|
@@ -8146,8 +8203,8 @@ var Upload3 = class _Upload extends AuthenticatedCommand {
|
|
|
8146
8203
|
ctx.superblocksRootConfigPath
|
|
8147
8204
|
] = await (0, import_util22.getSuperblocksMonorepoConfigJson)(true);
|
|
8148
8205
|
ctx.existingSuperblocksResourceConfig = await (0, import_util22.getSuperblocksResourceConfigIfExists)();
|
|
8149
|
-
ctx.superblocksRootPath =
|
|
8150
|
-
|
|
8206
|
+
ctx.superblocksRootPath = path19.resolve(
|
|
8207
|
+
path19.dirname(ctx.superblocksRootConfigPath),
|
|
8151
8208
|
".."
|
|
8152
8209
|
);
|
|
8153
8210
|
} catch {
|
|
@@ -8265,8 +8322,8 @@ Would you like to also delete these resources from your filesystem?`
|
|
|
8265
8322
|
task: async (ctx, task) => {
|
|
8266
8323
|
task.title = `Validating project structure...`;
|
|
8267
8324
|
const subtasks = [];
|
|
8268
|
-
const superblocksRootPath =
|
|
8269
|
-
|
|
8325
|
+
const superblocksRootPath = path19.resolve(
|
|
8326
|
+
path19.dirname(ctx.superblocksRootConfigPath),
|
|
8270
8327
|
".."
|
|
8271
8328
|
);
|
|
8272
8329
|
for (const resourceId of ctx.resourceIdsToPush) {
|
|
@@ -8296,8 +8353,8 @@ Would you like to also delete these resources from your filesystem?`
|
|
|
8296
8353
|
task: async (ctx, task) => {
|
|
8297
8354
|
task.title = `Uploading files to branch ${ctx.localBranchInfo.branchName}...`;
|
|
8298
8355
|
const subtasks = [];
|
|
8299
|
-
const superblocksRootPath =
|
|
8300
|
-
|
|
8356
|
+
const superblocksRootPath = path19.resolve(
|
|
8357
|
+
path19.dirname(ctx.superblocksRootConfigPath),
|
|
8301
8358
|
".."
|
|
8302
8359
|
);
|
|
8303
8360
|
for (const resourceId of ctx.resourceIdsToPush) {
|
|
@@ -8309,7 +8366,7 @@ Would you like to also delete these resources from your filesystem?`
|
|
|
8309
8366
|
task: async (_ctx, task2) => {
|
|
8310
8367
|
try {
|
|
8311
8368
|
await (0, import_util22.getSuperblocksApplicationV2ConfigJson)(
|
|
8312
|
-
|
|
8369
|
+
path19.join(superblocksRootPath, resource.location)
|
|
8313
8370
|
);
|
|
8314
8371
|
} catch {
|
|
8315
8372
|
throw new Error(
|
|
@@ -8319,7 +8376,7 @@ Would you like to also delete these resources from your filesystem?`
|
|
|
8319
8376
|
await this.getSdk().dbfsPutApplication({
|
|
8320
8377
|
applicationId: resourceId,
|
|
8321
8378
|
branch: ctx.localBranchInfo.branchName,
|
|
8322
|
-
localDirectoryPath:
|
|
8379
|
+
localDirectoryPath: path19.join(
|
|
8323
8380
|
superblocksRootPath,
|
|
8324
8381
|
resource.location
|
|
8325
8382
|
)
|