@superblocksteam/sdk 2.0.149 → 2.0.150-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/.turbo/turbo-build.log +1 -1
- package/dist/cli-replacement/dependency-install-classifier.d.mts +3 -1
- package/dist/cli-replacement/dependency-install-classifier.d.mts.map +1 -1
- package/dist/cli-replacement/dependency-install-classifier.mjs +16 -5
- package/dist/cli-replacement/dependency-install-classifier.mjs.map +1 -1
- package/dist/cli-replacement/dev-s3-restore.test.mjs +73 -14
- package/dist/cli-replacement/dev-s3-restore.test.mjs.map +1 -1
- package/dist/cli-replacement/dev-startup-git-before-dbfs-order.test.mjs +4 -0
- package/dist/cli-replacement/dev-startup-git-before-dbfs-order.test.mjs.map +1 -1
- package/dist/cli-replacement/dev.d.mts.map +1 -1
- package/dist/cli-replacement/dev.mjs +19 -4
- package/dist/cli-replacement/dev.mjs.map +1 -1
- package/package.json +6 -6
- package/src/cli-replacement/dependency-install-classifier.mts +38 -6
- package/src/cli-replacement/dev-s3-restore.test.mts +98 -14
- package/src/cli-replacement/dev-startup-git-before-dbfs-order.test.mts +4 -0
- package/src/cli-replacement/dev.mts +27 -1
- package/tsconfig.tsbuildinfo +1 -1
|
@@ -26,6 +26,7 @@ import {
|
|
|
26
26
|
AiService,
|
|
27
27
|
AiServiceFeatureFlags,
|
|
28
28
|
SnapshotManager,
|
|
29
|
+
hasEditLifecycleCapability,
|
|
29
30
|
isSdkApiTemplate,
|
|
30
31
|
stripResolvedFromLockfile,
|
|
31
32
|
} from "@superblocksteam/vite-plugin-file-sync/ai-service";
|
|
@@ -40,6 +41,7 @@ import {
|
|
|
40
41
|
type NpmRegistryClient,
|
|
41
42
|
type NpmRegistryFetchResult,
|
|
42
43
|
type ParseContext,
|
|
44
|
+
NpmInstallBlocked,
|
|
43
45
|
shouldIgnoreInstallScripts,
|
|
44
46
|
} from "@superblocksteam/vite-plugin-file-sync/npm-registry";
|
|
45
47
|
import { OperationQueue } from "@superblocksteam/vite-plugin-file-sync/operation-queue";
|
|
@@ -55,7 +57,11 @@ import type {
|
|
|
55
57
|
TokenManager,
|
|
56
58
|
SuperblocksSdk,
|
|
57
59
|
} from "../index.js";
|
|
58
|
-
import {
|
|
60
|
+
import {
|
|
61
|
+
getTracer,
|
|
62
|
+
isCloudPrem,
|
|
63
|
+
shutdownTelemetry,
|
|
64
|
+
} from "../telemetry/index.js";
|
|
59
65
|
import { getErrorMeta, getLogger, type Logger } from "../telemetry/logging.js";
|
|
60
66
|
import type {
|
|
61
67
|
ApplicationConfig,
|
|
@@ -68,6 +74,7 @@ import {
|
|
|
68
74
|
} from "./automatic-upgrades.js";
|
|
69
75
|
import {
|
|
70
76
|
classifyInitialInstallError,
|
|
77
|
+
initialInstallFailedFromBlocked,
|
|
71
78
|
InitialInstallFailed,
|
|
72
79
|
UpgradeFailed,
|
|
73
80
|
} from "./dependency-install-classifier.mjs";
|
|
@@ -1181,6 +1188,10 @@ export async function dev(options: {
|
|
|
1181
1188
|
appRootDirPath: options.cwd,
|
|
1182
1189
|
applicationId: applicationConfig.id,
|
|
1183
1190
|
organizationId: currentUser.organizations[0].id,
|
|
1191
|
+
agentType: currentUser.organizations[0].agentType,
|
|
1192
|
+
isCloudPrem,
|
|
1193
|
+
managedNativeDbLifecycleCapableForEdit:
|
|
1194
|
+
hasEditLifecycleCapability(currentUser.agents),
|
|
1184
1195
|
fsOperationQueue,
|
|
1185
1196
|
draftInterface: syncService as DraftInterface,
|
|
1186
1197
|
rpcClient,
|
|
@@ -1515,6 +1526,21 @@ export async function dev(options: {
|
|
|
1515
1526
|
);
|
|
1516
1527
|
}
|
|
1517
1528
|
|
|
1529
|
+
try {
|
|
1530
|
+
await aiService?.remediateDeclaredDependencies();
|
|
1531
|
+
} catch (error) {
|
|
1532
|
+
// Soft package.json rewrite failures are already swallowed inside
|
|
1533
|
+
// applyPackageJsonSubstitutions. A gate/registry hard-block must
|
|
1534
|
+
// not fall through into the ungated CLI install below.
|
|
1535
|
+
if (error instanceof NpmInstallBlocked) {
|
|
1536
|
+
throw initialInstallFailedFromBlocked(error);
|
|
1537
|
+
}
|
|
1538
|
+
logger.warn(
|
|
1539
|
+
"[pkg-security] startup remediation failed; keeping declared versions",
|
|
1540
|
+
getErrorMeta(error),
|
|
1541
|
+
);
|
|
1542
|
+
}
|
|
1543
|
+
|
|
1518
1544
|
const packageJsonAfter = await readPkgJson(cwd);
|
|
1519
1545
|
|
|
1520
1546
|
let packageJsonSnapshotBefore: PackageJsonSnapshot | null = null;
|