@snapback/cli 1.6.0 → 3.0.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 +120 -21
- package/dist/SkippedTestDetector-AXTMWWHC.js +5 -0
- package/dist/SkippedTestDetector-QLSQV7K7.js +5 -0
- package/dist/analysis-6WTBZJH3.js +6 -0
- package/dist/analysis-C472LUGW.js +2475 -0
- package/dist/auth-TDIHGKKL.js +1446 -0
- package/dist/auto-provision-organization-CXHL46P3.js +161 -0
- package/dist/{chunk-FVIYXFCL.js → chunk-4YTE4JEW.js} +2 -3
- package/dist/chunk-5EOPYJ4Y.js +12 -0
- package/dist/{chunk-ARVV3F4K.js → chunk-5SQA44V7.js} +1085 -18
- package/dist/{chunk-RB7H4UQJ.js → chunk-7ADPL4Q3.js} +10 -3
- package/dist/chunk-CBGOC6RV.js +293 -0
- package/dist/chunk-CPZWXRP2.js +4432 -0
- package/dist/{chunk-7JX6Y4TL.js → chunk-DPWFZNMY.js} +21 -34
- package/dist/{chunk-R7CUQ7CU.js → chunk-E6V6QKS7.js} +317 -33
- package/dist/chunk-FMWCFAY7.js +111 -0
- package/dist/chunk-GQ73B37K.js +314 -0
- package/dist/chunk-LIBBDBW5.js +6136 -0
- package/dist/chunk-O7HMAZ7L.js +3497 -0
- package/dist/chunk-PL4HF4M2.js +593 -0
- package/dist/chunk-Q4VC7GND.js +2300 -0
- package/dist/chunk-WS36HDEU.js +3735 -0
- package/dist/chunk-ZBQDE6WJ.js +108 -0
- package/dist/client-62E3L6DW.js +8 -0
- package/dist/dist-5LR7APG5.js +5 -0
- package/dist/dist-NFU5UJEW.js +9 -0
- package/dist/dist-OO5LJHL6.js +12 -0
- package/dist/index.js +61644 -37198
- package/dist/local-service-adapter-AB3UYRUK.js +6 -0
- package/dist/pioneer-oauth-hook-V2JKEXM7.js +12 -0
- package/dist/{secure-credentials-IWQB6KU4.js → secure-credentials-UEPG7GWW.js} +2 -3
- package/dist/snapback-dir-MG7DTRMF.js +6 -0
- package/package.json +12 -11
- package/scripts/postinstall.mjs +2 -3
- package/dist/SkippedTestDetector-5WJZKZQ3.js +0 -5
- package/dist/SkippedTestDetector-5WJZKZQ3.js.map +0 -1
- package/dist/analysis-YI4UNUCM.js +0 -6
- package/dist/analysis-YI4UNUCM.js.map +0 -1
- package/dist/chunk-7JX6Y4TL.js.map +0 -1
- package/dist/chunk-ARVV3F4K.js.map +0 -1
- package/dist/chunk-EU2IZPOK.js +0 -13002
- package/dist/chunk-EU2IZPOK.js.map +0 -1
- package/dist/chunk-FVIYXFCL.js.map +0 -1
- package/dist/chunk-R7CUQ7CU.js.map +0 -1
- package/dist/chunk-RB7H4UQJ.js.map +0 -1
- package/dist/chunk-SOABQWAU.js +0 -385
- package/dist/chunk-SOABQWAU.js.map +0 -1
- package/dist/dist-O6EBXLN6.js +0 -5
- package/dist/dist-O6EBXLN6.js.map +0 -1
- package/dist/dist-PJVBBZTF.js +0 -5
- package/dist/dist-PJVBBZTF.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/learning-pruner-QC4CTJDX.js +0 -5
- package/dist/learning-pruner-QC4CTJDX.js.map +0 -1
- package/dist/secure-credentials-IWQB6KU4.js.map +0 -1
- package/dist/snapback-dir-V6MWXIW4.js +0 -5
- package/dist/snapback-dir-V6MWXIW4.js.map +0 -1
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
#!/usr/bin/env node --no-warnings=ExperimentalWarning
|
|
2
|
+
import { __name } from './chunk-7ADPL4Q3.js';
|
|
3
|
+
import { parse } from '@babel/parser';
|
|
4
|
+
|
|
5
|
+
process.env.SNAPBACK_CLI='true';
|
|
6
|
+
function detectSkippedTests(code, filePath) {
|
|
7
|
+
const skipped = [];
|
|
8
|
+
try {
|
|
9
|
+
let visit2 = function(node) {
|
|
10
|
+
if (node.type === "CallExpression") {
|
|
11
|
+
const callee = node.callee;
|
|
12
|
+
if (callee.type === "MemberExpression" && callee.property.type === "Identifier" && callee.property.name === "skip" && callee.object.type === "Identifier") {
|
|
13
|
+
const testType = callee.object.name;
|
|
14
|
+
if (testType === "describe" || testType === "it" || testType === "test") {
|
|
15
|
+
let name;
|
|
16
|
+
if (node.arguments.length > 0) {
|
|
17
|
+
const firstArg = node.arguments[0];
|
|
18
|
+
if (firstArg.type === "StringLiteral") {
|
|
19
|
+
name = firstArg.value;
|
|
20
|
+
} else if (firstArg.type === "TemplateLiteral" && firstArg.quasis.length === 1) {
|
|
21
|
+
name = firstArg.quasis[0].value.raw;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
skipped.push({
|
|
25
|
+
type: testType,
|
|
26
|
+
name,
|
|
27
|
+
line: node.loc?.start.line ?? 0,
|
|
28
|
+
column: node.loc?.start.column ?? 0,
|
|
29
|
+
file: filePath
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
for (const key of Object.keys(node)) {
|
|
35
|
+
const value = node[key];
|
|
36
|
+
if (value && typeof value === "object") {
|
|
37
|
+
if (Array.isArray(value)) {
|
|
38
|
+
for (const item of value) {
|
|
39
|
+
if (item && typeof item === "object" && "type" in item) {
|
|
40
|
+
visit2(item);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
} else if ("type" in value) {
|
|
44
|
+
visit2(value);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
var visit = visit2;
|
|
50
|
+
__name(visit2, "visit");
|
|
51
|
+
const ast = parse(code, {
|
|
52
|
+
sourceType: "module",
|
|
53
|
+
plugins: [
|
|
54
|
+
"typescript",
|
|
55
|
+
"jsx"
|
|
56
|
+
],
|
|
57
|
+
errorRecovery: true
|
|
58
|
+
});
|
|
59
|
+
visit2(ast.program);
|
|
60
|
+
return {
|
|
61
|
+
file: filePath,
|
|
62
|
+
skipped,
|
|
63
|
+
parsed: true
|
|
64
|
+
};
|
|
65
|
+
} catch (error) {
|
|
66
|
+
return {
|
|
67
|
+
file: filePath,
|
|
68
|
+
skipped: [],
|
|
69
|
+
parsed: false,
|
|
70
|
+
error: error instanceof Error ? error.message : String(error)
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
__name(detectSkippedTests, "detectSkippedTests");
|
|
75
|
+
function analyzeSkippedTests(files) {
|
|
76
|
+
const results = [];
|
|
77
|
+
for (const [filePath, content] of files) {
|
|
78
|
+
if (filePath.includes(".test.") || filePath.includes(".spec.") || filePath.includes("__tests__")) {
|
|
79
|
+
results.push(detectSkippedTests(content, filePath));
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
return results;
|
|
83
|
+
}
|
|
84
|
+
__name(analyzeSkippedTests, "analyzeSkippedTests");
|
|
85
|
+
function getSkippedTestSummary(results) {
|
|
86
|
+
const summary = {
|
|
87
|
+
totalSkipped: 0,
|
|
88
|
+
byType: {
|
|
89
|
+
describe: 0,
|
|
90
|
+
it: 0,
|
|
91
|
+
test: 0
|
|
92
|
+
},
|
|
93
|
+
filesWithSkipped: []
|
|
94
|
+
};
|
|
95
|
+
for (const result of results) {
|
|
96
|
+
if (result.skipped.length > 0) {
|
|
97
|
+
summary.filesWithSkipped.push(result.file);
|
|
98
|
+
summary.totalSkipped += result.skipped.length;
|
|
99
|
+
for (const test of result.skipped) {
|
|
100
|
+
summary.byType[test.type]++;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
return summary;
|
|
105
|
+
}
|
|
106
|
+
__name(getSkippedTestSummary, "getSkippedTestSummary");
|
|
107
|
+
|
|
108
|
+
export { analyzeSkippedTests, detectSkippedTests, getSkippedTestSummary };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
#!/usr/bin/env node --no-warnings=ExperimentalWarning
|
|
2
|
+
export { checkDatabaseConnection, closeDatabaseConnection, combinedSchema, db, pool } from './chunk-LIBBDBW5.js';
|
|
3
|
+
import './chunk-WS36HDEU.js';
|
|
4
|
+
import './chunk-5EOPYJ4Y.js';
|
|
5
|
+
import './chunk-CBGOC6RV.js';
|
|
6
|
+
import './chunk-7ADPL4Q3.js';
|
|
7
|
+
|
|
8
|
+
process.env.SNAPBACK_CLI='true';
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
#!/usr/bin/env node --no-warnings=ExperimentalWarning
|
|
2
|
+
export { createManagedMetadata, detectAIClients, detectMCPProcesses, detectWorkspaceConfig, evictCachedPath, getAllCachedPaths, getCachedPath, getClient, getClientConfigPath, getConfiguredClients, getOrCreateIdentity, getServerKey, getSnapbackConfigDir, getSnapbackMCPConfig, injectWorkspacePath, isCommandExecutable2 as isCommandExecutable, isOwnedByThisInstall, isSnapbackMCPRunning, patchApiKeyInClientConfig, readClientConfig, removeSnapbackConfig, repairClientConfig, resetIdentityCache, resolveNodePath, setCachedPath, validateClientConfig, validateConfig, validateWorkspacePath, writeClientConfig } from './chunk-E6V6QKS7.js';
|
|
3
|
+
import './chunk-7ADPL4Q3.js';
|
|
4
|
+
|
|
5
|
+
process.env.SNAPBACK_CLI='true';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
#!/usr/bin/env node --no-warnings=ExperimentalWarning
|
|
2
|
+
export { AnalyticsEvents, CORRELATION_ANALYSES, CORRELATION_COHORTS, KEY_METRIC_ALERTS, OTelInstrumentationProvider, RETENTION_COHORTS, TelemetryClient, addSentryBreadcrumb, captureError, captureMessage, checkDatabaseConnection, checkErrorBudget, checkHttpService, checkRedisConnection, clearSentryUser, createAlert, createCohort, createGracefulShutdown, createHealthCheck, createSentryMiddleware, deleteAlert, deleteCohort, detectSurface, drainAndCloseServer, flushSentry, getAlerts, getAnalyticsEnv, getAnalyticsSuperProperties, getCohort, getCohortMembers, getCohorts, getCorrelationAnalysis, getDeploymentEnv, getEnvironmentInfo, getErrorRate, getMetrics, initSentry, isDevelopment, isProduction, neon_exports as neon, performCorrelationAnalysis, preStopDelay, prometheus_exports as prometheus, recordError, recordSuccess, registerKeyMetricAlerts, resetMetrics, setSentryUser, startSentryTransaction, toggleAlert, updateCohort } from './chunk-Q4VC7GND.js';
|
|
3
|
+
export { cache_exports as cache, logger, makeWatcher, resiliency_exports as resiliency } from './chunk-PL4HF4M2.js';
|
|
4
|
+
export { LogLevel, NoOpInstrumentationProvider } from './chunk-WS36HDEU.js';
|
|
5
|
+
import './chunk-5EOPYJ4Y.js';
|
|
6
|
+
import './chunk-CBGOC6RV.js';
|
|
7
|
+
import './chunk-7ADPL4Q3.js';
|
|
8
|
+
|
|
9
|
+
process.env.SNAPBACK_CLI='true';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
#!/usr/bin/env node --no-warnings=ExperimentalWarning
|
|
2
|
+
export { AccountSchema, AiChatSchema, AttributionServiceImpl, EntitlementsServiceImpl, InvitationSchema, MCPService, MemberSchema, OrganizationSchema, OrganizationUpdateSchema, PasskeySchema, PioneerServiceImpl, PurchaseInsertSchema, PurchaseSchema, PurchaseUpdateSchema, SagaOrchestratorImpl, SessionSchema, SnapshotStoreDb, TelemetrySinkDb, TelemetrySinkDbAdapter, UserSchema, UserUpdateSchema, VerificationSchema, anonymizeEmail, anonymizeUserData, anonymizeUserId, appendFalsePositivePatterns, calculateDecayedWeight, cleanupExpiredData, clearCapabilityCache, closeTestDb, countAllOrganizations, countAllUsers, createPurchase, createTestUser, createTierUpgradeSagaWithDeps, createUser, createUserAccount, databaseService, deletePurchaseBySubscriptionId, deleteUserApiKeys, deleteUserData, exportUserData, extensionLinkTokens, extensionSessions as extensionSessionsAuth, findSimilarPatterns, generateOrganizationSlug, getAccountById, getCacheMetrics, getCapabilities, getCapabilityAuditHistory, getInvitationById, getMCPService, getOrganizationById, getOrganizationBySlug, getOrganizationMembership, getOrganizationWithPurchasesAndMembersCount, getOrganizations, getOrganizationsWithMembers, getPendingInvitationByEmail, getPurchaseById, getPurchaseBySubscriptionId, getPurchasesByOrganizationId, getPurchasesByUserId, getTestDb, getUserByEmail, getUserById, getUserPrivacyPreferences, getUsers, getVectorStats, getWorkspaceLinkById, getWorkspaceLinksByUserId, handleTierDowngrade, handleTierUpgrade, healthCheck, incrementDetectionsAnalyzed, insertPatternWithEmbedding, invalidateCapabilityCache, isPgvectorEnabled, linkWorkspace, logAnonymizedEvent, logCapabilityAudit, mergeSignalIntoPattern, recordFalsePositiveSignal, resetCacheMetrics, resetCapabilities, resolveTierByWorkspaceId, sagaPersistence, sanitizeForLogging, searchSimilarPatterns, shouldRetainData, signalToPattern, testInTransaction, truncateAllTables, unlinkAllWorkspacesForUser, unlinkWorkspace, updateCapabilities, updateOrganization, updatePatternEmbedding, updatePurchase, updateUser, updateWorkspaceTier } from './chunk-CPZWXRP2.js';
|
|
3
|
+
export { closeRedis, getRedisClient, initializeRedis, isRedisAvailable } from './chunk-GQ73B37K.js';
|
|
4
|
+
export { TOPUP_PACKS, account, activationCodeRedemptions, activationCodes, adminAuditLog, agentSuggestions, analysisEvents, apiKeyMetadata, apiKeyUsage, apiKeys, apiUsage, apiUsageLogs, checkDatabaseConnection, clientTokens, combinedSchema, creditJobTypeEnum, creditTopups, creditTransactionStatusEnum, creditTransactionTypeEnum, creditsLedger, db, deviceTrials, emailDeliveries, emailPreferences, extensionSessions, featureUsage, feedback, fileSnapshotSessions, fingerprints, getTopupPackDetails, isValidPackSize, loops, mcpActivityEvents, mcpAggregatedLearnings, mcpSessions, member, newsletterSubscribers, orgDailyMetrics, organization, pioneerActions, pioneerCodes, pioneerRedemptions, pioneerTierHistory, pioneers, policyEvaluations, pool, postAcceptOutcomes, purchase, rateLimitViolations, responseCache, retentionConfig, rollbackEvents, ruleViolations, postgres_exports as schema, securityEvents, snapbackSchema, snapshotFiles, snapshots, subscriptions, superAdmins, telemetryDailyStats, telemetryEvents, telemetryIdempotencyKeys, telemetryOutbox, topupStatusEnum, usageLimits, user, userProductMetrics, userSafetyProfiles, waitlist, waitlistAuditLogs, waitlistReferrals, waitlistTasks } from './chunk-LIBBDBW5.js';
|
|
5
|
+
import './chunk-Q4VC7GND.js';
|
|
6
|
+
import './chunk-PL4HF4M2.js';
|
|
7
|
+
import './chunk-WS36HDEU.js';
|
|
8
|
+
import './chunk-5EOPYJ4Y.js';
|
|
9
|
+
import './chunk-CBGOC6RV.js';
|
|
10
|
+
import './chunk-7ADPL4Q3.js';
|
|
11
|
+
|
|
12
|
+
process.env.SNAPBACK_CLI='true';
|