@linktr.ee/linkapp 0.0.38 → 0.0.39
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/cli.js +1 -0
- package/dist/cli.js.map +1 -1
- package/dist/commands/add.d.ts.map +1 -1
- package/dist/commands/add.js +84 -59
- package/dist/commands/add.js.map +1 -1
- package/dist/commands/build.d.ts.map +1 -1
- package/dist/commands/build.js +66 -84
- package/dist/commands/build.js.map +1 -1
- package/dist/commands/deploy.d.ts +15 -10
- package/dist/commands/deploy.d.ts.map +1 -1
- package/dist/commands/deploy.js +26 -199
- package/dist/commands/deploy.js.map +1 -1
- package/dist/lib/config/resolve-config-path.d.ts +19 -0
- package/dist/lib/config/resolve-config-path.d.ts.map +1 -0
- package/dist/lib/config/resolve-config-path.js +54 -0
- package/dist/lib/config/resolve-config-path.js.map +1 -0
- package/dist/lib/deploy/artifacts.d.ts +21 -0
- package/dist/lib/deploy/artifacts.d.ts.map +1 -0
- package/dist/lib/deploy/artifacts.js +35 -0
- package/dist/lib/deploy/artifacts.js.map +1 -0
- package/dist/lib/deploy/confirmation.d.ts +12 -0
- package/dist/lib/deploy/confirmation.d.ts.map +1 -0
- package/dist/lib/deploy/confirmation.js +30 -0
- package/dist/lib/deploy/confirmation.js.map +1 -0
- package/dist/lib/deploy/context.d.ts +44 -0
- package/dist/lib/deploy/context.d.ts.map +1 -0
- package/dist/lib/deploy/context.js +39 -0
- package/dist/lib/deploy/context.js.map +1 -0
- package/dist/lib/deploy/deploy-output.d.ts +10 -0
- package/dist/lib/deploy/deploy-output.d.ts.map +1 -0
- package/dist/lib/deploy/deploy-output.js +79 -0
- package/dist/lib/deploy/deploy-output.js.map +1 -0
- package/dist/lib/deploy/deploy-phases.d.ts +41 -0
- package/dist/lib/deploy/deploy-phases.d.ts.map +1 -0
- package/dist/lib/deploy/deploy-phases.js +116 -0
- package/dist/lib/deploy/deploy-phases.js.map +1 -0
- package/dist/lib/deploy/deploy-utils.d.ts +53 -0
- package/dist/lib/deploy/deploy-utils.d.ts.map +1 -0
- package/dist/lib/deploy/deploy-utils.js +149 -0
- package/dist/lib/deploy/deploy-utils.js.map +1 -0
- package/dist/lib/deploy/execution.d.ts +24 -0
- package/dist/lib/deploy/execution.d.ts.map +1 -0
- package/dist/lib/deploy/execution.js +29 -0
- package/dist/lib/deploy/execution.js.map +1 -0
- package/dist/lib/deploy/output.d.ts +16 -0
- package/dist/lib/deploy/output.d.ts.map +1 -0
- package/dist/lib/deploy/output.js +115 -0
- package/dist/lib/deploy/output.js.map +1 -0
- package/dist/lib/deploy/pack-project.js +2 -2
- package/dist/lib/deploy/pack-project.js.map +1 -1
- package/dist/lib/deploy/preflight.d.ts +9 -0
- package/dist/lib/deploy/preflight.d.ts.map +1 -0
- package/dist/lib/deploy/preflight.js +59 -0
- package/dist/lib/deploy/preflight.js.map +1 -0
- package/dist/lib/deploy/validation.d.ts.map +1 -1
- package/dist/lib/deploy/validation.js +6 -8
- package/dist/lib/deploy/validation.js.map +1 -1
- package/dist/lib/utils/constants.d.ts +42 -0
- package/dist/lib/utils/constants.d.ts.map +1 -0
- package/dist/lib/utils/constants.js +42 -0
- package/dist/lib/utils/constants.js.map +1 -0
- package/dist/lib/utils/errors.d.ts +49 -0
- package/dist/lib/utils/errors.d.ts.map +1 -0
- package/dist/lib/utils/errors.js +70 -0
- package/dist/lib/utils/errors.js.map +1 -0
- package/dist/lib/utils/formatters.d.ts +34 -0
- package/dist/lib/utils/formatters.d.ts.map +1 -0
- package/dist/lib/utils/formatters.js +59 -0
- package/dist/lib/utils/formatters.js.map +1 -0
- package/dist/lib/utils/output.d.ts +46 -0
- package/dist/lib/utils/output.d.ts.map +1 -0
- package/dist/lib/utils/output.js +66 -0
- package/dist/lib/utils/output.js.map +1 -0
- package/dist/sdk/use-open-popup.d.ts +23 -0
- package/dist/sdk/use-open-popup.d.ts.map +1 -0
- package/dist/sdk/use-open-popup.js +29 -0
- package/dist/sdk/use-open-popup.js.map +1 -0
- package/package.json +1 -26
- package/runtime/index.html +0 -1
- /package/dev-server/preview/{preview.tsx → Preview.tsx} +0 -0
package/dist/commands/deploy.js
CHANGED
|
@@ -1,208 +1,35 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
1
|
+
import { initializeDeployment, runPreflightChecks, prepareDeploymentArtifacts, confirmDeployment, executeDeployment, } from '../lib/deploy/deploy-phases.js';
|
|
2
|
+
import { displayDeploymentSuccess, displayDeploymentError, } from '../lib/deploy/deploy-output.js';
|
|
3
|
+
import { DeploymentCancelledError } from '../lib/deploy/deploy-utils.js';
|
|
4
|
+
/**
|
|
5
|
+
* Deploy command - builds and uploads a LinkApp to the Linktree platform.
|
|
6
|
+
*
|
|
7
|
+
* This command orchestrates the entire deployment process:
|
|
8
|
+
* 1. Initialize deployment context (auth, config, LinkApp ID)
|
|
9
|
+
* 2. Run preflight checks (build, validation)
|
|
10
|
+
* 3. Prepare artifacts (manifests, packed files)
|
|
11
|
+
* 4. Confirm deployment with user
|
|
12
|
+
* 5. Execute deployment (upload to API)
|
|
13
|
+
* 6. Display results
|
|
14
|
+
*
|
|
15
|
+
* @param options - Deployment options
|
|
16
|
+
*/
|
|
15
17
|
export async function deployCommand(options) {
|
|
16
|
-
const env = options.qa ? 'QA' : 'Production';
|
|
17
|
-
const startTime = Date.now();
|
|
18
18
|
try {
|
|
19
|
-
const
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
const
|
|
24
|
-
|
|
25
|
-
const linkAppId = await getLinkAppId(configPath);
|
|
26
|
-
writeLine(pc.bold(pc.cyan(`\n→ Deploying ${linkAppId} to ${env}`)));
|
|
27
|
-
writeLine(pc.dim('─'.repeat(50)));
|
|
28
|
-
writeLine();
|
|
29
|
-
// Check authentication
|
|
30
|
-
const accessToken = getToken(config.auth.audience);
|
|
31
|
-
if (!accessToken) {
|
|
32
|
-
writeLine(pc.red('✗ Not authenticated'));
|
|
33
|
-
writeLine(pc.dim(` → Run: ${pc.cyan(`npx @linktr.ee/linkapp login${options.qa ? ' --qa' : ''}`)}`));
|
|
34
|
-
writeLine();
|
|
35
|
-
process.exit(1);
|
|
36
|
-
}
|
|
37
|
-
// Run build if needed
|
|
38
|
-
if (!options.skipBuild) {
|
|
39
|
-
const distPath = join(projectPath, 'dist');
|
|
40
|
-
if (!existsSync(distPath)) {
|
|
41
|
-
writeLine(pc.bold('Building project...'));
|
|
42
|
-
const buildStart = Date.now();
|
|
43
|
-
await buildCommand({ sourcemap: false });
|
|
44
|
-
const buildTime = ((Date.now() - buildStart) / 1000).toFixed(1);
|
|
45
|
-
writeLine(pc.dim(` Completed in ${buildTime}s`));
|
|
46
|
-
writeLine();
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
// Pre-deployment validation
|
|
50
|
-
if (!options.skipChecks) {
|
|
51
|
-
writeLine(pc.bold('Pre-deployment checks'));
|
|
52
|
-
const validationResult = await validateProject();
|
|
53
|
-
printValidationResults(validationResult);
|
|
54
|
-
if (!validationResult.success) {
|
|
55
|
-
writeLine();
|
|
56
|
-
writeLine(pc.red('✗ Validation failed'));
|
|
57
|
-
writeLine();
|
|
58
|
-
process.exit(1);
|
|
59
|
-
}
|
|
60
|
-
writeLine();
|
|
61
|
-
}
|
|
62
|
-
const s = p.spinner();
|
|
63
|
-
// Generate manifest files from config
|
|
64
|
-
s.start('Generating manifest files');
|
|
65
|
-
await generateManifestFiles(projectPath);
|
|
66
|
-
s.stop('Manifest files generated');
|
|
67
|
-
// Check if LinkApp exists
|
|
68
|
-
s.start('Checking LinkApp status');
|
|
69
|
-
const apiUrl = options.endpoint ?? `${config.link_types_url}/link-types`;
|
|
70
|
-
const exists = await checkLinkAppExists(apiUrl, linkAppId, accessToken);
|
|
71
|
-
const action = exists ? 'Updating existing LinkApp' : 'Creating new LinkApp';
|
|
72
|
-
s.stop(action);
|
|
73
|
-
// Pack project
|
|
74
|
-
s.start('Packing project files');
|
|
75
|
-
const packedFiles = await packProject({ projectPath });
|
|
76
|
-
s.stop(`Packed ${packedFiles.length} ${packedFiles.length === 1 ? 'item' : 'items'}`);
|
|
77
|
-
// Show files to upload
|
|
78
|
-
writeLine();
|
|
79
|
-
writeLine(pc.bold('Files to upload:'));
|
|
80
|
-
const filesToShow = packedFiles.slice(0, 8);
|
|
81
|
-
for (const file of filesToShow) {
|
|
82
|
-
writeLine(pc.dim(` • ${file}`));
|
|
83
|
-
}
|
|
84
|
-
if (packedFiles.length > 8) {
|
|
85
|
-
writeLine(pc.dim(` • ... and ${packedFiles.length - 8} more files`));
|
|
86
|
-
}
|
|
87
|
-
// Confirm deployment
|
|
88
|
-
if (!options.skipConfirm) {
|
|
89
|
-
writeLine();
|
|
90
|
-
const shouldDeploy = await p.confirm({
|
|
91
|
-
message: `Deploy to ${env}?`,
|
|
92
|
-
initialValue: true,
|
|
93
|
-
});
|
|
94
|
-
if (p.isCancel(shouldDeploy) || !shouldDeploy) {
|
|
95
|
-
writeLine();
|
|
96
|
-
writeLine(pc.yellow('⚠ Deployment cancelled'));
|
|
97
|
-
writeLine();
|
|
98
|
-
return;
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
// Upload
|
|
102
|
-
writeLine();
|
|
103
|
-
const uploadStart = Date.now();
|
|
104
|
-
s.start('Uploading assets');
|
|
105
|
-
const result = await uploadAssets({
|
|
106
|
-
projectPath,
|
|
107
|
-
apiUrl,
|
|
108
|
-
linkAppId,
|
|
109
|
-
accessToken,
|
|
110
|
-
isUpdate: exists,
|
|
111
|
-
forceUpdate: options.force,
|
|
112
|
-
});
|
|
113
|
-
const uploadTime = ((Date.now() - uploadStart) / 1000).toFixed(1);
|
|
114
|
-
s.stop(`Assets uploaded (${uploadTime}s)`);
|
|
115
|
-
// Show success
|
|
116
|
-
const totalTime = ((Date.now() - startTime) / 1000).toFixed(1);
|
|
117
|
-
writeLine();
|
|
118
|
-
writeLine(pc.dim('─'.repeat(50)));
|
|
119
|
-
writeLine(pc.green(pc.bold('\n✓ Deployment successful!')));
|
|
120
|
-
writeLine(pc.dim(` Completed in ${totalTime}s`));
|
|
121
|
-
writeLine();
|
|
122
|
-
writeLine(pc.bold('Details:'));
|
|
123
|
-
writeLine(pc.dim(` ID: ${result.linkType.linkTypeId}`));
|
|
124
|
-
writeLine(pc.dim(` Status: ${result.linkType.status}`));
|
|
125
|
-
// Fix timestamp handling - check if it exists and handle both seconds and milliseconds
|
|
126
|
-
if (result.linkType.updatedTimestamp) {
|
|
127
|
-
const timestamp = result.linkType.updatedTimestamp;
|
|
128
|
-
// If timestamp is in seconds (less than year 2100 in seconds), convert to ms
|
|
129
|
-
const timestampMs = timestamp < 10000000000 ? timestamp * 1000 : timestamp;
|
|
130
|
-
const date = new Date(timestampMs);
|
|
131
|
-
writeLine(pc.dim(` Updated: ${date.toLocaleString()}`));
|
|
132
|
-
}
|
|
133
|
-
writeLine();
|
|
134
|
-
writeLine(pc.bold('Next steps:'));
|
|
135
|
-
// Step 1: Build is happening
|
|
136
|
-
if (result.build?.id) {
|
|
137
|
-
const buildUrl = `https://linkapp-ci.replit.app/?linkTypeId=${result.linkType.linkTypeId}&buildId=${result.build.id}`;
|
|
138
|
-
writeLine(pc.cyan(` 1. Building your LinkApp (this may take a few minutes):`));
|
|
139
|
-
writeLine(pc.dim(` ${buildUrl}`));
|
|
140
|
-
writeLine();
|
|
141
|
-
}
|
|
142
|
-
// Step 2: Add to page (only after build completes)
|
|
143
|
-
const createUrl = options.qa
|
|
144
|
-
? `https://qa.linktr.ee/admin?action=create-link&linkType=${result.linkType.linkTypeId}`
|
|
145
|
-
: `https://linktr.ee/admin?action=create-link&linkType=${result.linkType.linkTypeId}`;
|
|
146
|
-
writeLine(pc.cyan(` 2. Once the build completes, add it to your page:`));
|
|
147
|
-
writeLine(pc.dim(` ${createUrl}`));
|
|
148
|
-
writeLine();
|
|
19
|
+
const context = await initializeDeployment(options);
|
|
20
|
+
await runPreflightChecks(context);
|
|
21
|
+
const artifacts = await prepareDeploymentArtifacts(context);
|
|
22
|
+
await confirmDeployment(context, artifacts);
|
|
23
|
+
const result = await executeDeployment(context, artifacts);
|
|
24
|
+
displayDeploymentSuccess(context, result);
|
|
149
25
|
}
|
|
150
26
|
catch (error) {
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
writeLine();
|
|
155
|
-
// Check if this is our structured error with API details
|
|
156
|
-
if (error && typeof error === 'object' && 'statusCode' in error && 'messages' in error) {
|
|
157
|
-
const structuredError = error;
|
|
158
|
-
writeLine(pc.bold('Error Details:'));
|
|
159
|
-
writeLine(pc.red(` Status: ${structuredError.statusCode}`));
|
|
160
|
-
if (Array.isArray(structuredError.messages) && structuredError.messages.length > 0) {
|
|
161
|
-
writeLine();
|
|
162
|
-
writeLine(pc.bold(' Validation Errors:'));
|
|
163
|
-
for (const msg of structuredError.messages) {
|
|
164
|
-
writeLine(pc.red(` • ${msg}`));
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
if (structuredError.responseData?.error) {
|
|
168
|
-
writeLine();
|
|
169
|
-
writeLine(pc.bold(' Error Type:'));
|
|
170
|
-
writeLine(pc.red(` ${structuredError.responseData.error}`));
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
else if (error instanceof Error) {
|
|
174
|
-
writeLine(pc.red(` ${error.message}`));
|
|
27
|
+
if (error instanceof DeploymentCancelledError) {
|
|
28
|
+
displayDeploymentError(error);
|
|
29
|
+
return;
|
|
175
30
|
}
|
|
176
|
-
|
|
177
|
-
writeLine(pc.red(` ${String(error)}`));
|
|
178
|
-
}
|
|
179
|
-
writeLine(); // Empty line
|
|
31
|
+
displayDeploymentError(error);
|
|
180
32
|
process.exit(1);
|
|
181
33
|
}
|
|
182
34
|
}
|
|
183
|
-
async function getLinkAppId(configPath) {
|
|
184
|
-
// Load the TypeScript config and derive ID from manifest name (kebab-case)
|
|
185
|
-
const { createJiti } = await import('jiti');
|
|
186
|
-
const jiti = createJiti(import.meta.url, {
|
|
187
|
-
interopDefault: true,
|
|
188
|
-
moduleCache: false,
|
|
189
|
-
});
|
|
190
|
-
try {
|
|
191
|
-
const config = jiti(configPath);
|
|
192
|
-
if (!config?.manifest?.name) {
|
|
193
|
-
throw new Error('manifest.name is required in configuration');
|
|
194
|
-
}
|
|
195
|
-
// Derive ID from name using kebab-case (matches backend behavior)
|
|
196
|
-
return config.manifest.name
|
|
197
|
-
.toLowerCase()
|
|
198
|
-
.replace(/[^a-z0-9]+/g, '-')
|
|
199
|
-
.replace(/^-+|-+$/g, ''); // Remove leading/trailing hyphens
|
|
200
|
-
}
|
|
201
|
-
catch (error) {
|
|
202
|
-
if (error instanceof Error && error.message.includes('manifest.name is required')) {
|
|
203
|
-
throw error;
|
|
204
|
-
}
|
|
205
|
-
throw new Error(`Failed to load manifest.name from config: ${error instanceof Error ? error.message : error}`);
|
|
206
|
-
}
|
|
207
|
-
}
|
|
208
35
|
//# sourceMappingURL=deploy.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deploy.js","sourceRoot":"","sources":["../../src/commands/deploy.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"deploy.js","sourceRoot":"","sources":["../../src/commands/deploy.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oBAAoB,EACpB,kBAAkB,EAClB,0BAA0B,EAC1B,iBAAiB,EACjB,iBAAiB,GAElB,MAAM,gCAAgC,CAAA;AACvC,OAAO,EACL,wBAAwB,EACxB,sBAAsB,GACvB,MAAM,gCAAgC,CAAA;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAA;AAIxE;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,KAAK,UAAU,aAAa,CAAC,OAAsB;IACxD,IAAI,CAAC;QACH,MAAM,OAAO,GAAG,MAAM,oBAAoB,CAAC,OAAO,CAAC,CAAA;QACnD,MAAM,kBAAkB,CAAC,OAAO,CAAC,CAAA;QACjC,MAAM,SAAS,GAAG,MAAM,0BAA0B,CAAC,OAAO,CAAC,CAAA;QAC3D,MAAM,iBAAiB,CAAC,OAAO,EAAE,SAAS,CAAC,CAAA;QAC3C,MAAM,MAAM,GAAG,MAAM,iBAAiB,CAAC,OAAO,EAAE,SAAS,CAAC,CAAA;QAC1D,wBAAwB,CAAC,OAAO,EAAE,MAAM,CAAC,CAAA;IAC3C,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,KAAK,YAAY,wBAAwB,EAAE,CAAC;YAC9C,sBAAsB,CAAC,KAAK,CAAC,CAAA;YAC7B,OAAM;QACR,CAAC;QACD,sBAAsB,CAAC,KAAK,CAAC,CAAA;QAC7B,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;IACjB,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Resolves the path to linkapp.config.ts in a project.
|
|
3
|
+
* Checks both root directory and .config directory for backward compatibility.
|
|
4
|
+
*
|
|
5
|
+
* @param projectPath - The root directory of the LinkApp project
|
|
6
|
+
* @returns The absolute path to linkapp.config.ts
|
|
7
|
+
* @throws Error if config file is not found
|
|
8
|
+
*/
|
|
9
|
+
export declare function resolveConfigPath(projectPath: string): string;
|
|
10
|
+
/**
|
|
11
|
+
* Extracts the LinkApp ID from a configuration file.
|
|
12
|
+
* The ID is derived from manifest.name using kebab-case conversion.
|
|
13
|
+
*
|
|
14
|
+
* @param configPath - Absolute path to linkapp.config.ts
|
|
15
|
+
* @returns The LinkApp ID (kebab-cased manifest name)
|
|
16
|
+
* @throws Error if config cannot be loaded or manifest.name is missing
|
|
17
|
+
*/
|
|
18
|
+
export declare function getLinkAppIdFromConfig(configPath: string): Promise<string>;
|
|
19
|
+
//# sourceMappingURL=resolve-config-path.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolve-config-path.d.ts","sourceRoot":"","sources":["../../../src/lib/config/resolve-config-path.ts"],"names":[],"mappings":"AAGA;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAe7D;AAED;;;;;;;GAOG;AACH,wBAAsB,sBAAsB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CA2BhF"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { existsSync } from 'node:fs';
|
|
2
|
+
import { join } from 'node:path';
|
|
3
|
+
/**
|
|
4
|
+
* Resolves the path to linkapp.config.ts in a project.
|
|
5
|
+
* Checks both root directory and .config directory for backward compatibility.
|
|
6
|
+
*
|
|
7
|
+
* @param projectPath - The root directory of the LinkApp project
|
|
8
|
+
* @returns The absolute path to linkapp.config.ts
|
|
9
|
+
* @throws Error if config file is not found
|
|
10
|
+
*/
|
|
11
|
+
export function resolveConfigPath(projectPath) {
|
|
12
|
+
const rootConfigPath = join(projectPath, 'linkapp.config.ts');
|
|
13
|
+
const nestedConfigPath = join(projectPath, '.config', 'linkapp.config.ts');
|
|
14
|
+
if (existsSync(rootConfigPath)) {
|
|
15
|
+
return rootConfigPath;
|
|
16
|
+
}
|
|
17
|
+
if (existsSync(nestedConfigPath)) {
|
|
18
|
+
return nestedConfigPath;
|
|
19
|
+
}
|
|
20
|
+
throw new Error('Configuration file not found. Expected linkapp.config.ts in project root or .config directory.');
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Extracts the LinkApp ID from a configuration file.
|
|
24
|
+
* The ID is derived from manifest.name using kebab-case conversion.
|
|
25
|
+
*
|
|
26
|
+
* @param configPath - Absolute path to linkapp.config.ts
|
|
27
|
+
* @returns The LinkApp ID (kebab-cased manifest name)
|
|
28
|
+
* @throws Error if config cannot be loaded or manifest.name is missing
|
|
29
|
+
*/
|
|
30
|
+
export async function getLinkAppIdFromConfig(configPath) {
|
|
31
|
+
const { createJiti } = await import('jiti');
|
|
32
|
+
const jiti = createJiti(import.meta.url, {
|
|
33
|
+
interopDefault: true,
|
|
34
|
+
moduleCache: false,
|
|
35
|
+
});
|
|
36
|
+
try {
|
|
37
|
+
const config = jiti(configPath);
|
|
38
|
+
if (!config?.manifest?.name) {
|
|
39
|
+
throw new Error('manifest.name is required in linkapp.config.ts');
|
|
40
|
+
}
|
|
41
|
+
// Derive ID from name using kebab-case (matches backend behavior)
|
|
42
|
+
return config.manifest.name
|
|
43
|
+
.toLowerCase()
|
|
44
|
+
.replace(/[^a-z0-9]+/g, '-')
|
|
45
|
+
.replace(/^-+|-+$/g, ''); // Remove leading/trailing hyphens
|
|
46
|
+
}
|
|
47
|
+
catch (error) {
|
|
48
|
+
if (error instanceof Error && error.message.includes('manifest.name is required')) {
|
|
49
|
+
throw error;
|
|
50
|
+
}
|
|
51
|
+
throw new Error(`Failed to load linkapp.config.ts: ${error instanceof Error ? error.message : String(error)}`);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
//# sourceMappingURL=resolve-config-path.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolve-config-path.js","sourceRoot":"","sources":["../../../src/lib/config/resolve-config-path.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AACpC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAEhC;;;;;;;GAOG;AACH,MAAM,UAAU,iBAAiB,CAAC,WAAmB;IACnD,MAAM,cAAc,GAAG,IAAI,CAAC,WAAW,EAAE,mBAAmB,CAAC,CAAA;IAC7D,MAAM,gBAAgB,GAAG,IAAI,CAAC,WAAW,EAAE,SAAS,EAAE,mBAAmB,CAAC,CAAA;IAE1E,IAAI,UAAU,CAAC,cAAc,CAAC,EAAE,CAAC;QAC/B,OAAO,cAAc,CAAA;IACvB,CAAC;IAED,IAAI,UAAU,CAAC,gBAAgB,CAAC,EAAE,CAAC;QACjC,OAAO,gBAAgB,CAAA;IACzB,CAAC;IAED,MAAM,IAAI,KAAK,CACb,gGAAgG,CACjG,CAAA;AACH,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,CAAC,KAAK,UAAU,sBAAsB,CAAC,UAAkB;IAC7D,MAAM,EAAE,UAAU,EAAE,GAAG,MAAM,MAAM,CAAC,MAAM,CAAC,CAAA;IAC3C,MAAM,IAAI,GAAG,UAAU,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE;QACvC,cAAc,EAAE,IAAI;QACpB,WAAW,EAAE,KAAK;KACnB,CAAC,CAAA;IAEF,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,IAAI,CAAC,UAAU,CAAC,CAAA;QAE/B,IAAI,CAAC,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;YAC5B,MAAM,IAAI,KAAK,CAAC,gDAAgD,CAAC,CAAA;QACnE,CAAC;QAED,kEAAkE;QAClE,OAAO,MAAM,CAAC,QAAQ,CAAC,IAAI;aACxB,WAAW,EAAE;aACb,OAAO,CAAC,aAAa,EAAE,GAAG,CAAC;aAC3B,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC,CAAA,CAAC,kCAAkC;IAC/D,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,KAAK,YAAY,KAAK,IAAI,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,2BAA2B,CAAC,EAAE,CAAC;YAClF,MAAM,KAAK,CAAA;QACb,CAAC;QACD,MAAM,IAAI,KAAK,CACb,qCAAqC,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAC9F,CAAA;IACH,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { DeploymentContext } from './context.js';
|
|
2
|
+
/**
|
|
3
|
+
* Result of artifact preparation
|
|
4
|
+
*/
|
|
5
|
+
export interface ArtifactPreparationResult {
|
|
6
|
+
/** List of packed file paths */
|
|
7
|
+
packedFiles: string[];
|
|
8
|
+
/** Whether the LinkApp already exists on the platform */
|
|
9
|
+
exists: boolean;
|
|
10
|
+
/** API URL for deployment */
|
|
11
|
+
apiUrl: string;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Prepares all deployment artifacts including manifests and packed files.
|
|
15
|
+
* Also checks if the LinkApp already exists on the platform.
|
|
16
|
+
*
|
|
17
|
+
* @param context - Deployment context
|
|
18
|
+
* @returns Artifact preparation result
|
|
19
|
+
*/
|
|
20
|
+
export declare function prepareDeploymentArtifacts(context: DeploymentContext): Promise<ArtifactPreparationResult>;
|
|
21
|
+
//# sourceMappingURL=artifacts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"artifacts.d.ts","sourceRoot":"","sources":["../../../src/lib/deploy/artifacts.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAA;AAErD;;GAEG;AACH,MAAM,WAAW,yBAAyB;IACxC,gCAAgC;IAChC,WAAW,EAAE,MAAM,EAAE,CAAA;IACrB,yDAAyD;IACzD,MAAM,EAAE,OAAO,CAAA;IACf,6BAA6B;IAC7B,MAAM,EAAE,MAAM,CAAA;CACf;AAED;;;;;;GAMG;AACH,wBAAsB,0BAA0B,CAC9C,OAAO,EAAE,iBAAiB,GACzB,OAAO,CAAC,yBAAyB,CAAC,CA0BpC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import * as p from '@clack/prompts';
|
|
2
|
+
import { generateManifestFiles } from './generate-manifest-files.js';
|
|
3
|
+
import { packProject } from './pack-project.js';
|
|
4
|
+
import { checkLinkAppExists } from './upload.js';
|
|
5
|
+
import { pluralize } from '../utils/formatters.js';
|
|
6
|
+
/**
|
|
7
|
+
* Prepares all deployment artifacts including manifests and packed files.
|
|
8
|
+
* Also checks if the LinkApp already exists on the platform.
|
|
9
|
+
*
|
|
10
|
+
* @param context - Deployment context
|
|
11
|
+
* @returns Artifact preparation result
|
|
12
|
+
*/
|
|
13
|
+
export async function prepareDeploymentArtifacts(context) {
|
|
14
|
+
const s = p.spinner();
|
|
15
|
+
// Generate manifest files from config
|
|
16
|
+
s.start('Generating manifest files');
|
|
17
|
+
await generateManifestFiles(context.projectPath);
|
|
18
|
+
s.stop('Manifest files generated');
|
|
19
|
+
// Check if LinkApp exists
|
|
20
|
+
s.start('Checking LinkApp status');
|
|
21
|
+
const apiUrl = context.options.endpoint ?? `${context.config.link_types_url}/link-types`;
|
|
22
|
+
const exists = await checkLinkAppExists(apiUrl, context.linkAppId, context.accessToken);
|
|
23
|
+
const action = exists ? 'Updating existing LinkApp' : 'Creating new LinkApp';
|
|
24
|
+
s.stop(action);
|
|
25
|
+
// Pack project files
|
|
26
|
+
s.start('Packing project files');
|
|
27
|
+
const packedFiles = await packProject({ projectPath: context.projectPath });
|
|
28
|
+
s.stop(`Packed ${pluralize(packedFiles.length, 'item')}`);
|
|
29
|
+
return {
|
|
30
|
+
packedFiles,
|
|
31
|
+
exists,
|
|
32
|
+
apiUrl,
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=artifacts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"artifacts.js","sourceRoot":"","sources":["../../../src/lib/deploy/artifacts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,gBAAgB,CAAA;AACnC,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAA;AACpE,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAC/C,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAA;AAChD,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAA;AAelD;;;;;;GAMG;AACH,MAAM,CAAC,KAAK,UAAU,0BAA0B,CAC9C,OAA0B;IAE1B,MAAM,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,CAAA;IAErB,sCAAsC;IACtC,CAAC,CAAC,KAAK,CAAC,2BAA2B,CAAC,CAAA;IACpC,MAAM,qBAAqB,CAAC,OAAO,CAAC,WAAW,CAAC,CAAA;IAChD,CAAC,CAAC,IAAI,CAAC,0BAA0B,CAAC,CAAA;IAElC,0BAA0B;IAC1B,CAAC,CAAC,KAAK,CAAC,yBAAyB,CAAC,CAAA;IAClC,MAAM,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,QAAQ,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,cAAc,aAAa,CAAA;IACxF,MAAM,MAAM,GAAG,MAAM,kBAAkB,CAAC,MAAM,EAAE,OAAO,CAAC,SAAS,EAAE,OAAO,CAAC,WAAW,CAAC,CAAA;IAEvF,MAAM,MAAM,GAAG,MAAM,CAAC,CAAC,CAAC,2BAA2B,CAAC,CAAC,CAAC,sBAAsB,CAAA;IAC5E,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;IAEd,qBAAqB;IACrB,CAAC,CAAC,KAAK,CAAC,uBAAuB,CAAC,CAAA;IAChC,MAAM,WAAW,GAAG,MAAM,WAAW,CAAC,EAAE,WAAW,EAAE,OAAO,CAAC,WAAW,EAAE,CAAC,CAAA;IAC3E,CAAC,CAAC,IAAI,CAAC,UAAU,SAAS,CAAC,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,CAAC,CAAA;IAEzD,OAAO;QACL,WAAW;QACX,MAAM;QACN,MAAM;KACP,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { DeploymentContext } from './context.js';
|
|
2
|
+
import type { ArtifactPreparationResult } from './artifacts.js';
|
|
3
|
+
/**
|
|
4
|
+
* Displays the files that will be uploaded and prompts the user for confirmation.
|
|
5
|
+
*
|
|
6
|
+
* @param context - Deployment context
|
|
7
|
+
* @param artifacts - Prepared artifacts
|
|
8
|
+
* @returns true if user confirms, false otherwise
|
|
9
|
+
* @throws DeploymentCancelledError if user cancels deployment
|
|
10
|
+
*/
|
|
11
|
+
export declare function confirmDeployment(context: DeploymentContext, artifacts: ArtifactPreparationResult): Promise<void>;
|
|
12
|
+
//# sourceMappingURL=confirmation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"confirmation.d.ts","sourceRoot":"","sources":["../../../src/lib/deploy/confirmation.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAA;AACrD,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,gBAAgB,CAAA;AAE/D;;;;;;;GAOG;AACH,wBAAsB,iBAAiB,CACrC,OAAO,EAAE,iBAAiB,EAC1B,SAAS,EAAE,yBAAyB,GACnC,OAAO,CAAC,IAAI,CAAC,CAmBf"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import * as p from '@clack/prompts';
|
|
2
|
+
import { DeploymentCancelledError } from '../utils/errors.js';
|
|
3
|
+
import { displayFileList } from '../utils/formatters.js';
|
|
4
|
+
import { writeLine } from '../utils/output.js';
|
|
5
|
+
/**
|
|
6
|
+
* Displays the files that will be uploaded and prompts the user for confirmation.
|
|
7
|
+
*
|
|
8
|
+
* @param context - Deployment context
|
|
9
|
+
* @param artifacts - Prepared artifacts
|
|
10
|
+
* @returns true if user confirms, false otherwise
|
|
11
|
+
* @throws DeploymentCancelledError if user cancels deployment
|
|
12
|
+
*/
|
|
13
|
+
export async function confirmDeployment(context, artifacts) {
|
|
14
|
+
// Skip confirmation if requested
|
|
15
|
+
if (context.options.skipConfirm) {
|
|
16
|
+
return;
|
|
17
|
+
}
|
|
18
|
+
// Show files to upload
|
|
19
|
+
displayFileList(artifacts.packedFiles, 'Files to upload:');
|
|
20
|
+
// Prompt for confirmation
|
|
21
|
+
writeLine();
|
|
22
|
+
const shouldDeploy = await p.confirm({
|
|
23
|
+
message: `Deploy to ${context.env}?`,
|
|
24
|
+
initialValue: true,
|
|
25
|
+
});
|
|
26
|
+
if (p.isCancel(shouldDeploy) || !shouldDeploy) {
|
|
27
|
+
throw new DeploymentCancelledError();
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=confirmation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"confirmation.js","sourceRoot":"","sources":["../../../src/lib/deploy/confirmation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,gBAAgB,CAAA;AACnC,OAAO,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAA;AAC7D,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAA;AACxD,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAA;AAI9C;;;;;;;GAOG;AACH,MAAM,CAAC,KAAK,UAAU,iBAAiB,CACrC,OAA0B,EAC1B,SAAoC;IAEpC,iCAAiC;IACjC,IAAI,OAAO,CAAC,OAAO,CAAC,WAAW,EAAE,CAAC;QAChC,OAAM;IACR,CAAC;IAED,uBAAuB;IACvB,eAAe,CAAC,SAAS,CAAC,WAAW,EAAE,kBAAkB,CAAC,CAAA;IAE1D,0BAA0B;IAC1B,SAAS,EAAE,CAAA;IACX,MAAM,YAAY,GAAG,MAAM,CAAC,CAAC,OAAO,CAAC;QACnC,OAAO,EAAE,aAAa,OAAO,CAAC,GAAG,GAAG;QACpC,YAAY,EAAE,IAAI;KACnB,CAAC,CAAA;IAEF,IAAI,CAAC,CAAC,QAAQ,CAAC,YAAY,CAAC,IAAI,CAAC,YAAY,EAAE,CAAC;QAC9C,MAAM,IAAI,wBAAwB,EAAE,CAAA;IACtC,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type { AppConfig } from '../../types.js';
|
|
2
|
+
export type Environment = 'production' | 'qa';
|
|
3
|
+
/**
|
|
4
|
+
* Options for the deploy command
|
|
5
|
+
*/
|
|
6
|
+
export interface DeployOptions {
|
|
7
|
+
path?: string;
|
|
8
|
+
endpoint?: string;
|
|
9
|
+
qa?: boolean;
|
|
10
|
+
skipBuild?: boolean;
|
|
11
|
+
skipChecks?: boolean;
|
|
12
|
+
force?: boolean;
|
|
13
|
+
skipConfirm?: boolean;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Deployment context containing all necessary information for deployment
|
|
17
|
+
*/
|
|
18
|
+
export interface DeploymentContext {
|
|
19
|
+
/** Environment to deploy to */
|
|
20
|
+
env: Environment;
|
|
21
|
+
/** App configuration (auth, URLs, etc.) */
|
|
22
|
+
config: AppConfig;
|
|
23
|
+
/** Absolute path to the LinkApp project */
|
|
24
|
+
projectPath: string;
|
|
25
|
+
/** LinkApp ID (kebab-cased manifest name) */
|
|
26
|
+
linkAppId: string;
|
|
27
|
+
/** OAuth access token */
|
|
28
|
+
accessToken: string;
|
|
29
|
+
/** Deployment start timestamp */
|
|
30
|
+
startTime: number;
|
|
31
|
+
/** Original deploy command options */
|
|
32
|
+
options: DeployOptions;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Initializes the deployment context by loading configuration,
|
|
36
|
+
* authenticating, and preparing all necessary information.
|
|
37
|
+
*
|
|
38
|
+
* @param options - Deploy command options
|
|
39
|
+
* @returns Deployment context
|
|
40
|
+
* @throws AuthenticationError if not authenticated
|
|
41
|
+
* @throws Error if configuration loading fails
|
|
42
|
+
*/
|
|
43
|
+
export declare function initializeDeployment(options: DeployOptions): Promise<DeploymentContext>;
|
|
44
|
+
//# sourceMappingURL=context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../src/lib/deploy/context.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAM/C,MAAM,MAAM,WAAW,GAAG,YAAY,GAAG,IAAI,CAAA;AAE7C;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,EAAE,CAAC,EAAE,OAAO,CAAA;IACZ,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,WAAW,CAAC,EAAE,OAAO,CAAA;CACtB;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,+BAA+B;IAC/B,GAAG,EAAE,WAAW,CAAA;IAChB,2CAA2C;IAC3C,MAAM,EAAE,SAAS,CAAA;IACjB,2CAA2C;IAC3C,WAAW,EAAE,MAAM,CAAA;IACnB,6CAA6C;IAC7C,SAAS,EAAE,MAAM,CAAA;IACjB,yBAAyB;IACzB,WAAW,EAAE,MAAM,CAAA;IACnB,iCAAiC;IACjC,SAAS,EAAE,MAAM,CAAA;IACjB,sCAAsC;IACtC,OAAO,EAAE,aAAa,CAAA;CACvB;AAED;;;;;;;;GAQG;AACH,wBAAsB,oBAAoB,CACxC,OAAO,EAAE,aAAa,GACrB,OAAO,CAAC,iBAAiB,CAAC,CA2B5B"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { getAppConfig } from '../auth/config.js';
|
|
2
|
+
import { getToken } from '../auth/token-storage.js';
|
|
3
|
+
import { resolveConfigPath, getLinkAppIdFromConfig } from '../config/resolve-config-path.js';
|
|
4
|
+
import { AuthenticationError } from '../utils/errors.js';
|
|
5
|
+
import { writeSection } from '../utils/output.js';
|
|
6
|
+
/**
|
|
7
|
+
* Initializes the deployment context by loading configuration,
|
|
8
|
+
* authenticating, and preparing all necessary information.
|
|
9
|
+
*
|
|
10
|
+
* @param options - Deploy command options
|
|
11
|
+
* @returns Deployment context
|
|
12
|
+
* @throws AuthenticationError if not authenticated
|
|
13
|
+
* @throws Error if configuration loading fails
|
|
14
|
+
*/
|
|
15
|
+
export async function initializeDeployment(options) {
|
|
16
|
+
const env = options.qa ? 'qa' : 'production';
|
|
17
|
+
const config = await getAppConfig(env);
|
|
18
|
+
const projectPath = options.path ?? process.cwd();
|
|
19
|
+
// Resolve config path and extract LinkApp ID
|
|
20
|
+
const configPath = resolveConfigPath(projectPath);
|
|
21
|
+
const linkAppId = await getLinkAppIdFromConfig(configPath);
|
|
22
|
+
// Display deployment header
|
|
23
|
+
writeSection(`Deploying ${linkAppId} to ${env}`);
|
|
24
|
+
// Check authentication
|
|
25
|
+
const accessToken = getToken(config.auth.audience);
|
|
26
|
+
if (!accessToken) {
|
|
27
|
+
throw new AuthenticationError(env);
|
|
28
|
+
}
|
|
29
|
+
return {
|
|
30
|
+
env,
|
|
31
|
+
config,
|
|
32
|
+
projectPath,
|
|
33
|
+
linkAppId,
|
|
34
|
+
accessToken,
|
|
35
|
+
startTime: Date.now(),
|
|
36
|
+
options,
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.js","sourceRoot":"","sources":["../../../src/lib/deploy/context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAEhD,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAA;AACnD,OAAO,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,MAAM,kCAAkC,CAAA;AAC5F,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAA;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAqCjD;;;;;;;;GAQG;AACH,MAAM,CAAC,KAAK,UAAU,oBAAoB,CACxC,OAAsB;IAEtB,MAAM,GAAG,GAAgB,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,YAAY,CAAA;IACzD,MAAM,MAAM,GAAG,MAAM,YAAY,CAAC,GAAG,CAAC,CAAA;IACtC,MAAM,WAAW,GAAG,OAAO,CAAC,IAAI,IAAI,OAAO,CAAC,GAAG,EAAE,CAAA;IAEjD,6CAA6C;IAC7C,MAAM,UAAU,GAAG,iBAAiB,CAAC,WAAW,CAAC,CAAA;IACjD,MAAM,SAAS,GAAG,MAAM,sBAAsB,CAAC,UAAU,CAAC,CAAA;IAE1D,4BAA4B;IAC5B,YAAY,CAAC,aAAa,SAAS,OAAO,GAAG,EAAE,CAAC,CAAA;IAEhD,uBAAuB;IACvB,MAAM,WAAW,GAAG,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAA;IAClD,IAAI,CAAC,WAAW,EAAE,CAAC;QACjB,MAAM,IAAI,mBAAmB,CAAC,GAAG,CAAC,CAAA;IACpC,CAAC;IAED,OAAO;QACL,GAAG;QACH,MAAM;QACN,WAAW;QACX,SAAS;QACT,WAAW;QACX,SAAS,EAAE,IAAI,CAAC,GAAG,EAAE;QACrB,OAAO;KACR,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { DeploymentContext, UploadResult } from './deploy-phases.js';
|
|
2
|
+
/**
|
|
3
|
+
* Displays successful deployment results.
|
|
4
|
+
*/
|
|
5
|
+
export declare function displayDeploymentSuccess(context: DeploymentContext, result: UploadResult): void;
|
|
6
|
+
/**
|
|
7
|
+
* Displays deployment error information.
|
|
8
|
+
*/
|
|
9
|
+
export declare function displayDeploymentError(error: unknown): void;
|
|
10
|
+
//# sourceMappingURL=deploy-output.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deploy-output.d.ts","sourceRoot":"","sources":["../../../src/lib/deploy/deploy-output.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAEzE;;GAEG;AACH,wBAAgB,wBAAwB,CACtC,OAAO,EAAE,iBAAiB,EAC1B,MAAM,EAAE,YAAY,GACnB,IAAI,CAoCN;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI,CA+C3D"}
|