@linktr.ee/linkapp 0.0.38 → 0.0.40
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
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Writes a line to stdout with a newline.
|
|
3
|
+
* @param message - The message to write (defaults to empty line)
|
|
4
|
+
*/
|
|
5
|
+
export declare function writeLine(message?: string): void;
|
|
6
|
+
/**
|
|
7
|
+
* Writes a section header with title and separator line.
|
|
8
|
+
* @param title - The section title
|
|
9
|
+
* @param length - Length of the separator line (default: 50)
|
|
10
|
+
*/
|
|
11
|
+
export declare function writeSection(title: string, length?: number): void;
|
|
12
|
+
/**
|
|
13
|
+
* Writes an error message in red with an ✗ symbol.
|
|
14
|
+
* @param message - The error message
|
|
15
|
+
*/
|
|
16
|
+
export declare function writeError(message: string): void;
|
|
17
|
+
/**
|
|
18
|
+
* Writes a success message in green with a ✓ symbol.
|
|
19
|
+
* @param message - The success message
|
|
20
|
+
*/
|
|
21
|
+
export declare function writeSuccess(message: string): void;
|
|
22
|
+
/**
|
|
23
|
+
* Writes a warning message in yellow with a ⚠ symbol.
|
|
24
|
+
* @param message - The warning message
|
|
25
|
+
*/
|
|
26
|
+
export declare function writeWarning(message: string): void;
|
|
27
|
+
/**
|
|
28
|
+
* Writes a horizontal separator line.
|
|
29
|
+
* @param length - Length of the separator (default: 50)
|
|
30
|
+
* @param char - Character to use for separator (default: '─')
|
|
31
|
+
*/
|
|
32
|
+
export declare function writeSeparator(length?: number, char?: string): void;
|
|
33
|
+
/**
|
|
34
|
+
* Writes an indented message with dimmed styling.
|
|
35
|
+
* @param message - The message to write
|
|
36
|
+
* @param indent - Number of spaces to indent (default: 2)
|
|
37
|
+
*/
|
|
38
|
+
export declare function writeIndented(message: string, indent?: number): void;
|
|
39
|
+
/**
|
|
40
|
+
* Writes a labeled value pair (e.g., "ID: my-linkapp").
|
|
41
|
+
* @param label - The label text
|
|
42
|
+
* @param value - The value text
|
|
43
|
+
* @param indent - Number of spaces to indent (default: 2)
|
|
44
|
+
*/
|
|
45
|
+
export declare function writeLabelValue(label: string, value: string, indent?: number): void;
|
|
46
|
+
//# sourceMappingURL=output.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"output.d.ts","sourceRoot":"","sources":["../../../src/lib/utils/output.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,wBAAgB,SAAS,CAAC,OAAO,SAAK,GAAG,IAAI,CAE5C;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,SAAK,GAAG,IAAI,CAI7D;AAED;;;GAGG;AACH,wBAAgB,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAEhD;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAElD;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAElD;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,MAAM,SAAK,EAAE,IAAI,SAAM,GAAG,IAAI,CAE5D;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,SAAI,GAAG,IAAI,CAE/D;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,SAAI,GAAG,IAAI,CAG9E"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import pc from 'picocolors';
|
|
2
|
+
/**
|
|
3
|
+
* Writes a line to stdout with a newline.
|
|
4
|
+
* @param message - The message to write (defaults to empty line)
|
|
5
|
+
*/
|
|
6
|
+
export function writeLine(message = '') {
|
|
7
|
+
process.stdout.write(`${message}\n`);
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Writes a section header with title and separator line.
|
|
11
|
+
* @param title - The section title
|
|
12
|
+
* @param length - Length of the separator line (default: 50)
|
|
13
|
+
*/
|
|
14
|
+
export function writeSection(title, length = 50) {
|
|
15
|
+
writeLine(pc.bold(pc.cyan(`\n→ ${title}`)));
|
|
16
|
+
writeLine(pc.dim('─'.repeat(length)));
|
|
17
|
+
writeLine();
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Writes an error message in red with an ✗ symbol.
|
|
21
|
+
* @param message - The error message
|
|
22
|
+
*/
|
|
23
|
+
export function writeError(message) {
|
|
24
|
+
writeLine(pc.red(pc.bold(`✗ ${message}`)));
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Writes a success message in green with a ✓ symbol.
|
|
28
|
+
* @param message - The success message
|
|
29
|
+
*/
|
|
30
|
+
export function writeSuccess(message) {
|
|
31
|
+
writeLine(pc.green(pc.bold(`✓ ${message}`)));
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Writes a warning message in yellow with a ⚠ symbol.
|
|
35
|
+
* @param message - The warning message
|
|
36
|
+
*/
|
|
37
|
+
export function writeWarning(message) {
|
|
38
|
+
writeLine(pc.yellow(pc.bold(`⚠ ${message}`)));
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Writes a horizontal separator line.
|
|
42
|
+
* @param length - Length of the separator (default: 50)
|
|
43
|
+
* @param char - Character to use for separator (default: '─')
|
|
44
|
+
*/
|
|
45
|
+
export function writeSeparator(length = 50, char = '─') {
|
|
46
|
+
writeLine(pc.dim(char.repeat(length)));
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Writes an indented message with dimmed styling.
|
|
50
|
+
* @param message - The message to write
|
|
51
|
+
* @param indent - Number of spaces to indent (default: 2)
|
|
52
|
+
*/
|
|
53
|
+
export function writeIndented(message, indent = 2) {
|
|
54
|
+
writeLine(pc.dim(' '.repeat(indent) + message));
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Writes a labeled value pair (e.g., "ID: my-linkapp").
|
|
58
|
+
* @param label - The label text
|
|
59
|
+
* @param value - The value text
|
|
60
|
+
* @param indent - Number of spaces to indent (default: 2)
|
|
61
|
+
*/
|
|
62
|
+
export function writeLabelValue(label, value, indent = 2) {
|
|
63
|
+
const padding = ' '.repeat(indent);
|
|
64
|
+
writeLine(pc.dim(`${padding}${label}: ${value}`));
|
|
65
|
+
}
|
|
66
|
+
//# sourceMappingURL=output.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"output.js","sourceRoot":"","sources":["../../../src/lib/utils/output.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,YAAY,CAAA;AAE3B;;;GAGG;AACH,MAAM,UAAU,SAAS,CAAC,OAAO,GAAG,EAAE;IACpC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,OAAO,IAAI,CAAC,CAAA;AACtC,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,YAAY,CAAC,KAAa,EAAE,MAAM,GAAG,EAAE;IACrD,SAAS,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,OAAO,KAAK,EAAE,CAAC,CAAC,CAAC,CAAA;IAC3C,SAAS,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAA;IACrC,SAAS,EAAE,CAAA;AACb,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,UAAU,CAAC,OAAe;IACxC,SAAS,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,KAAK,OAAO,EAAE,CAAC,CAAC,CAAC,CAAA;AAC5C,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,YAAY,CAAC,OAAe;IAC1C,SAAS,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC,IAAI,CAAC,KAAK,OAAO,EAAE,CAAC,CAAC,CAAC,CAAA;AAC9C,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,YAAY,CAAC,OAAe;IAC1C,SAAS,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE,CAAC,IAAI,CAAC,KAAK,OAAO,EAAE,CAAC,CAAC,CAAC,CAAA;AAC/C,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,cAAc,CAAC,MAAM,GAAG,EAAE,EAAE,IAAI,GAAG,GAAG;IACpD,SAAS,CAAC,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAA;AACxC,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,aAAa,CAAC,OAAe,EAAE,MAAM,GAAG,CAAC;IACvD,SAAS,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,OAAO,CAAC,CAAC,CAAA;AACjD,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,eAAe,CAAC,KAAa,EAAE,KAAa,EAAE,MAAM,GAAG,CAAC;IACtE,MAAM,OAAO,GAAG,GAAG,CAAC,MAAM,CAAC,MAAM,CAAC,CAAA;IAClC,SAAS,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,OAAO,GAAG,KAAK,KAAK,KAAK,EAAE,CAAC,CAAC,CAAA;AACnD,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Hook to open a popup/modal in the parent Linktree window
|
|
3
|
+
*
|
|
4
|
+
* @returns A callback function to trigger the popup with optional data
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* ```tsx
|
|
8
|
+
* function FeaturedLayout() {
|
|
9
|
+
* const openPopup = useOpenPopup()
|
|
10
|
+
*
|
|
11
|
+
* return (
|
|
12
|
+
* <button onClick={() => openPopup({ itemId: '123', view: 'details' })}>
|
|
13
|
+
* View More
|
|
14
|
+
* </button>
|
|
15
|
+
* )
|
|
16
|
+
* }
|
|
17
|
+
* ```
|
|
18
|
+
*
|
|
19
|
+
* Note: This only works when the LinkApp is embedded in Linktree.
|
|
20
|
+
* The parent window identifies the LinkApp from the iframe's event.source.
|
|
21
|
+
*/
|
|
22
|
+
export declare function useOpenPopup(): (data?: Record<string, unknown>) => void;
|
|
23
|
+
//# sourceMappingURL=use-open-popup.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-open-popup.d.ts","sourceRoot":"","sources":["../../src/sdk/use-open-popup.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,YAAY,YACC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,UAGnD"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { useCallback } from 'react';
|
|
2
|
+
import { sendMessage } from './send-message.js';
|
|
3
|
+
/**
|
|
4
|
+
* Hook to open a popup/modal in the parent Linktree window
|
|
5
|
+
*
|
|
6
|
+
* @returns A callback function to trigger the popup with optional data
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```tsx
|
|
10
|
+
* function FeaturedLayout() {
|
|
11
|
+
* const openPopup = useOpenPopup()
|
|
12
|
+
*
|
|
13
|
+
* return (
|
|
14
|
+
* <button onClick={() => openPopup({ itemId: '123', view: 'details' })}>
|
|
15
|
+
* View More
|
|
16
|
+
* </button>
|
|
17
|
+
* )
|
|
18
|
+
* }
|
|
19
|
+
* ```
|
|
20
|
+
*
|
|
21
|
+
* Note: This only works when the LinkApp is embedded in Linktree.
|
|
22
|
+
* The parent window identifies the LinkApp from the iframe's event.source.
|
|
23
|
+
*/
|
|
24
|
+
export function useOpenPopup() {
|
|
25
|
+
return useCallback((data) => {
|
|
26
|
+
sendMessage('OPEN_POPUP', { data });
|
|
27
|
+
}, []);
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=use-open-popup.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-open-popup.js","sourceRoot":"","sources":["../../src/sdk/use-open-popup.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAA;AACnC,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAE/C;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,UAAU,YAAY;IAC1B,OAAO,WAAW,CAAC,CAAC,IAA8B,EAAE,EAAE;QACpD,WAAW,CAAC,YAAY,EAAE,EAAE,IAAI,EAAE,CAAC,CAAA;IACrC,CAAC,EAAE,EAAE,CAAC,CAAA;AACR,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@linktr.ee/linkapp",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.40",
|
|
4
4
|
"description": "Development, build, and deployment tooling for LinkApps",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -39,53 +39,28 @@
|
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
41
|
"@clack/prompts": "^0.8.2",
|
|
42
|
-
"@ngrok/ngrok": "^1.4.1",
|
|
43
|
-
"@radix-ui/react-dialog": "^1.1.15",
|
|
44
|
-
"@radix-ui/react-tabs": "^1.1.7",
|
|
45
42
|
"@rsbuild/core": "^1.6.6",
|
|
46
43
|
"@rsbuild/plugin-react": "^1.4.2",
|
|
47
|
-
"@tailwindcss/postcss": "^4.1.14",
|
|
48
44
|
"archiver": "^7.0.1",
|
|
49
45
|
"axios": "^1.7.9",
|
|
50
46
|
"cac": "^6.7.14",
|
|
51
47
|
"chokidar": "^3.6.0",
|
|
52
|
-
"class-variance-authority": "^0.7.1",
|
|
53
|
-
"clsx": "^2.1.1",
|
|
54
|
-
"connect": "^3.7.0",
|
|
55
48
|
"detect-port": "^2.1.0",
|
|
56
49
|
"form-data": "^4.0.1",
|
|
57
|
-
"fs-extra": "^11.2.0",
|
|
58
|
-
"iframe-resizer-react": "^1.1.1",
|
|
59
50
|
"jiti": "^2.6.1",
|
|
60
51
|
"jsonwebtoken": "^9.0.2",
|
|
61
|
-
"lucide-react": "^0.545.0",
|
|
62
|
-
"netrc-parser": "^3.1.6",
|
|
63
52
|
"open": "^10.1.0",
|
|
64
53
|
"openid-client": "^5.7.1",
|
|
65
54
|
"picocolors": "^1.1.1",
|
|
66
55
|
"postcss": "^8.5.6",
|
|
67
|
-
"prop-types": "^15.8.1",
|
|
68
56
|
"react": "^19.1.0",
|
|
69
|
-
"react-dom": "^19.1.0",
|
|
70
|
-
"tailwind-merge": "^3.3.1",
|
|
71
|
-
"warning": "^4.0.3",
|
|
72
57
|
"zod": "^4.1.12"
|
|
73
58
|
},
|
|
74
|
-
"overrides": {
|
|
75
|
-
"iframe-resizer-react": {
|
|
76
|
-
"react": "$react",
|
|
77
|
-
"react-dom": "$react-dom"
|
|
78
|
-
}
|
|
79
|
-
},
|
|
80
59
|
"devDependencies": {
|
|
81
|
-
"@biomejs/biome": "^1.9.4",
|
|
82
60
|
"@types/archiver": "^6.0.2",
|
|
83
|
-
"@types/connect": "^3.4.38",
|
|
84
|
-
"@types/fs-extra": "^11.0.4",
|
|
85
61
|
"@types/jsonwebtoken": "^9.0.7",
|
|
86
62
|
"@types/node": "^20.17.6",
|
|
87
63
|
"@types/react": "^19.2.2",
|
|
88
|
-
"@types/react-dom": "^19",
|
|
89
64
|
"typescript": "^5.7.2",
|
|
90
65
|
"vitest": "^2.1.9"
|
|
91
66
|
},
|
package/runtime/index.html
CHANGED
|
File without changes
|