@electroplix/adapter 0.1.0 → 0.1.1
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/index.esm.js +37 -41
- package/dist/src/lib/logger.d.ts +9 -8
- package/dist/src/lib/logger.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -101,10 +101,6 @@ function checkVersionStability(version) {
|
|
|
101
101
|
return 'unknown';
|
|
102
102
|
}
|
|
103
103
|
|
|
104
|
-
/* ------------------------------------------------------------------ */
|
|
105
|
-
/* Simple coloured logger – zero dependencies */
|
|
106
|
-
/* ------------------------------------------------------------------ */
|
|
107
|
-
|
|
108
104
|
const RESET = '\x1b[0m';
|
|
109
105
|
const BOLD = '\x1b[1m';
|
|
110
106
|
const GREEN = '\x1b[32m';
|
|
@@ -113,47 +109,47 @@ const RED = '\x1b[31m';
|
|
|
113
109
|
const CYAN = '\x1b[36m';
|
|
114
110
|
const DIM = '\x1b[2m';
|
|
115
111
|
const ORANGE = '\x1b[38;5;208m';
|
|
116
|
-
|
|
117
|
-
info(
|
|
118
|
-
console.log(`${CYAN}
|
|
119
|
-
}
|
|
120
|
-
success(
|
|
121
|
-
console.log(`${GREEN}
|
|
122
|
-
}
|
|
123
|
-
warn(
|
|
124
|
-
console.log(`${YELLOW}
|
|
125
|
-
}
|
|
126
|
-
error(
|
|
127
|
-
console.
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
console.log(
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
console.log(
|
|
134
|
-
}
|
|
112
|
+
class Logger {
|
|
113
|
+
info(message) {
|
|
114
|
+
console.log(`${CYAN}ℹ ${RESET}${message}`);
|
|
115
|
+
}
|
|
116
|
+
success(message) {
|
|
117
|
+
console.log(`${GREEN}✓ ${RESET}${message}`);
|
|
118
|
+
}
|
|
119
|
+
warn(message) {
|
|
120
|
+
console.log(`${YELLOW}⚠ ${RESET}${message}`);
|
|
121
|
+
}
|
|
122
|
+
error(message) {
|
|
123
|
+
console.log(`${RED}✖ ${RESET}${message}`);
|
|
124
|
+
}
|
|
125
|
+
debug(message) {
|
|
126
|
+
console.log(`${DIM}⋯ ${message}${RESET}`);
|
|
127
|
+
}
|
|
128
|
+
newline() {
|
|
129
|
+
console.log('');
|
|
130
|
+
}
|
|
135
131
|
banner() {
|
|
136
132
|
console.log('');
|
|
137
|
-
console.log(`${BOLD}${CYAN}
|
|
138
|
-
console.log(`${BOLD}${CYAN} ║${RESET}
|
|
139
|
-
console.log(`${BOLD}${CYAN} ║${RESET}
|
|
140
|
-
console.log(`${BOLD}${CYAN} ║${RESET}
|
|
141
|
-
console.log(`${BOLD}${CYAN} ║${RESET}
|
|
142
|
-
console.log(`${BOLD}${CYAN} ║${RESET} ${
|
|
143
|
-
console.log(`${BOLD}${CYAN} ║${RESET}
|
|
144
|
-
console.log(`${BOLD}${CYAN} ║${RESET}
|
|
145
|
-
console.log(`${BOLD}${CYAN} ║${RESET}
|
|
146
|
-
console.log(`${BOLD}${CYAN} ║${RESET}
|
|
147
|
-
console.log(`${BOLD}${CYAN} ║${RESET}
|
|
148
|
-
console.log(`${BOLD}${CYAN} ║${RESET}
|
|
149
|
-
console.log(`${BOLD}${CYAN} ║${RESET}
|
|
150
|
-
console.log(`${BOLD}${CYAN} ║${RESET} ${
|
|
151
|
-
console.log(`${BOLD}${CYAN} ║${RESET}
|
|
152
|
-
console.log(`${BOLD}${CYAN}
|
|
153
|
-
console.log(`${BOLD}${CYAN} ╚═══════════════════════════════════════════════════════════╝${RESET}`);
|
|
133
|
+
console.log(`${BOLD}${CYAN} ╔════════════════════════════════════════════════════════╗${RESET}`);
|
|
134
|
+
console.log(`${BOLD}${CYAN} ║${RESET} ${DIM}___${RESET} ${BOLD}${CYAN}║${RESET}`);
|
|
135
|
+
console.log(`${BOLD}${CYAN} ║${RESET} ${DIM}[${RESET}${YELLOW}o${RESET}${DIM}]${RESET} ${BOLD}${CYAN}║${RESET}`);
|
|
136
|
+
console.log(`${BOLD}${CYAN} ║${RESET} ${ORANGE}.-"""${YELLOW}⚡${ORANGE}"""""--.${RESET} ${BOLD}${CYAN}║${RESET}`);
|
|
137
|
+
console.log(`${BOLD}${CYAN} ║${RESET} ${ORANGE}.' ${YELLOW}⚡${RESET} ${ORANGE}\\ '.${RESET} ${BOLD}${CYAN}║${RESET}`);
|
|
138
|
+
console.log(`${BOLD}${CYAN} ║${RESET} ${ORANGE}/ ${YELLOW}⚡${RESET} ${ORANGE}\\ ; \\${RESET} ${BOLD}${CYAN}║${RESET}`);
|
|
139
|
+
console.log(`${BOLD}${CYAN} ║${RESET} ${ORANGE}|${RESET}${YELLOW} ⚡${RESET} ${ORANGE}=====${RESET} ${ORANGE}'; |${RESET} ${BOLD}${CYAN}║${RESET}`);
|
|
140
|
+
console.log(`${BOLD}${CYAN} ║${RESET} ${ORANGE}\\ ${YELLOW}⚡${RESET} ${ORANGE}/ .' /${RESET} ${BOLD}${CYAN}║${RESET}`);
|
|
141
|
+
console.log(`${BOLD}${CYAN} ║${RESET} ${ORANGE}'-..__..--' ${DIM}_.~"~.${RESET} ${BOLD}${CYAN}║${RESET}`);
|
|
142
|
+
console.log(`${BOLD}${CYAN} ║${RESET} ${DIM}_.~" ~._.~" ${RESET}${DIM} ~._.~"~.${RESET} ${BOLD}${CYAN}║${RESET}`);
|
|
143
|
+
console.log(`${BOLD}${CYAN} ║${RESET} ${DIM}~" ~._.~" ~._.~" ~.${RESET} ${BOLD}${CYAN}║${RESET}`);
|
|
144
|
+
console.log(`${BOLD}${CYAN} ║${RESET} ${BOLD}${CYAN}║${RESET}`);
|
|
145
|
+
console.log(`${BOLD}${CYAN} ║${RESET} ${BOLD}${YELLOW}⚡ Electroplix Deploy Adapter${RESET} ${BOLD}${CYAN}║${RESET}`);
|
|
146
|
+
console.log(`${BOLD}${CYAN} ║${RESET} ${DIM}Cloudflare Workers deploy for Next.js${RESET} ${BOLD}${CYAN}║${RESET}`);
|
|
147
|
+
console.log(`${BOLD}${CYAN} ║${RESET} ${BOLD}${CYAN}║${RESET}`);
|
|
148
|
+
console.log(`${BOLD}${CYAN} ╚════════════════════════════════════════════════════════╝${RESET}`);
|
|
154
149
|
console.log('');
|
|
155
150
|
}
|
|
156
|
-
}
|
|
151
|
+
}
|
|
152
|
+
const logger = new Logger();
|
|
157
153
|
|
|
158
154
|
/* ------------------------------------------------------------------ */
|
|
159
155
|
/* Install/uninstall packages via detected package manager */
|
package/dist/src/lib/logger.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
export declare
|
|
2
|
-
info(
|
|
3
|
-
success(
|
|
4
|
-
warn(
|
|
5
|
-
error(
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
export declare class Logger {
|
|
2
|
+
info(message: string): void;
|
|
3
|
+
success(message: string): void;
|
|
4
|
+
warn(message: string): void;
|
|
5
|
+
error(message: string): void;
|
|
6
|
+
debug(message: string): void;
|
|
7
|
+
newline(): void;
|
|
8
8
|
banner(): void;
|
|
9
|
-
}
|
|
9
|
+
}
|
|
10
|
+
export declare const logger: Logger;
|
|
10
11
|
//# sourceMappingURL=logger.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../../../../packages/adapter/src/lib/logger.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../../../../packages/adapter/src/lib/logger.ts"],"names":[],"mappings":"AASA,qBAAa,MAAM;IACjB,IAAI,CAAC,OAAO,EAAE,MAAM;IAIpB,OAAO,CAAC,OAAO,EAAE,MAAM;IAIvB,IAAI,CAAC,OAAO,EAAE,MAAM;IAIpB,KAAK,CAAC,OAAO,EAAE,MAAM;IAIrB,KAAK,CAAC,OAAO,EAAE,MAAM;IAIrB,OAAO;IAIP,MAAM;CAoBP;AAED,eAAO,MAAM,MAAM,QAAe,CAAC"}
|